GNU Radio 3.5.1 C++ API
gr_sync_block Class Reference

synchronous 1:1 input to output with historyOverride work to provide the signal processing implementation. More...

#include <gr_sync_block.h>

Inherits gr_block.

Inherited by atsc_deinterleaver, atsc_derandomizer, atsc_ds_to_softds, atsc_equalizer, atsc_field_sync_mux, atsc_fpll, atsc_fs_checker, atsc_interleaver, atsc_randomizer, atsc_rs_decoder, atsc_rs_encoder, atsc_trellis_encoder, atsc_viterbi_decoder, audio_sink [virtual], audio_source [virtual], comedi_sink_s, comedi_source_s, digital_binary_slicer_fb, digital_correlate_access_code_bb, digital_costas_loop_cc, digital_fll_band_edge_cc, digital_mpsk_snr_est_cc, digital_ofdm_frame_sink, digital_ofdm_mapper_bcv, digital_probe_mpsk_snr_est_c, gr_additive_scrambler_bb, gr_agc2_cc, gr_agc2_ff, gr_agc_cc, gr_agc_ff, gr_annotator_1to1, gr_annotator_alltoall, gr_bin_statistics_f, gr_burst_tagger, gr_char_to_float, gr_check_counting_s, gr_check_lfsr_32k_s, gr_complex_to_arg, gr_complex_to_float, gr_complex_to_imag, gr_complex_to_mag, gr_complex_to_mag_squared, gr_complex_to_real, gr_conjugate_cc, gr_correlate_access_code_tag_bb, gr_dc_blocker_cc, gr_dc_blocker_ff, gr_delay, gr_descrambler_bb, gr_diff_decoder_bb, gr_diff_encoder_bb, gr_diff_phasor_cc, gr_dpll_bb, gr_fake_channel_decoder_pp, gr_fake_channel_encoder_pp, gr_feedforward_agc_cc, gr_fft_vcc, gr_fft_vfc, gr_file_descriptor_sink, gr_file_descriptor_source, gr_file_sink, gr_file_source, gr_filter_delay_fc, gr_float_to_char, gr_float_to_complex, gr_float_to_int, gr_float_to_short, gr_float_to_uchar, gr_fmdet_cf, gr_framer_sink_1, gr_frequency_modulator_fc, gr_glfsr_source_b, gr_glfsr_source_f, gr_head, gr_hilbert_fc, gr_histo_sink_f, gr_iir_filter_ffd, gr_int_to_float, gr_iqcomp_cc, gr_kludge_copy, gr_lfsr_32k_source_s, gr_map_bb, gr_message_sink, gr_message_source, gr_nlog10_ff, gr_null_sink, gr_null_source, gr_ofdm_frame_sink2, gr_oscope_sink_x, gr_pa_2x2_phase_combiner, gr_packet_sink, gr_peak_detector2_fb, gr_pfb_decimator_ccf, gr_phase_modulator_fc, gr_pll_carriertracking_cc, gr_pll_freqdet_cf, gr_pll_refout_cc, gr_probe_avg_mag_sqrd_c, gr_probe_avg_mag_sqrd_cf, gr_probe_avg_mag_sqrd_f, gr_probe_density_b, gr_probe_mpsk_snr_c, gr_probe_signal_f, gr_quadrature_demod_cf, gr_rail_ff, gr_regenerate_bb, gr_rms_cf, gr_rms_ff, gr_scrambler_bb, gr_short_to_float, gr_simple_squelch_cc, gr_single_pole_iir_filter_cc, gr_single_pole_iir_filter_ff, gr_squash_ff, gr_streams_to_vector, gr_stretch_ff, gr_sync_decimator, gr_sync_interpolator, gr_tagged_file_sink, gr_threshold_ff, gr_throttle [virtual], gr_transcendental [virtual], gr_uchar_to_float, gr_udp_sink, gr_udp_source, gr_vco_f, gr_vector_to_streams, gr_wavelet_ff, gr_wavfile_sink, gr_wavfile_source, gr_wvps_ff, howto_square2_ff, noaa_hrpt_decoder, noaa_hrpt_pll_cf, pager_flex_parse, pager_slicer_fb, qtgui_time_sink_c, qtgui_time_sink_f, shd_smini_sink [virtual], shd_smini_source [virtual], tag_sink_demo, tag_source_demo, trellis_permutation, uhd_usrp_sink [virtual], uhd_usrp_source [virtual], video_sdl_sink_s, video_sdl_sink_uc, vocoder_alaw_decode_bs, vocoder_alaw_encode_sb, vocoder_g721_decode_bs [virtual], vocoder_g721_encode_sb [virtual], vocoder_g723_24_decode_bs [virtual], vocoder_g723_24_encode_sb [virtual], vocoder_g723_40_decode_bs [virtual], vocoder_g723_40_encode_sb [virtual], vocoder_ulaw_decode_bs, and vocoder_ulaw_encode_sb.

List of all members.

Public Member Functions

virtual int work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)=0
 just like gr_block::general_work, only this arranges to call consume_each for you
void forecast (int noutput_items, gr_vector_int &ninput_items_required)
 Estimate input requirements given output request.
int general_work (int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
 compute output items from input items
int fixed_rate_ninput_to_noutput (int ninput)
 Given ninput samples, return number of output samples that will be produced. N.B. this is only defined if fixed_rate returns true. Generally speaking, you don't need to override this.
int fixed_rate_noutput_to_ninput (int noutput)
 Given noutput samples, return number of input samples required to produce noutput. N.B. this is only defined if fixed_rate returns true. Generally speaking, you don't need to override this.

Protected Member Functions

 gr_sync_block (void)
 gr_sync_block (const std::string &name, gr_io_signature_sptr input_signature, gr_io_signature_sptr output_signature)

Detailed Description

synchronous 1:1 input to output with history

Override work to provide the signal processing implementation.


Constructor & Destructor Documentation

gr_sync_block::gr_sync_block ( void  ) [inline, protected]
gr_sync_block::gr_sync_block ( const std::string &  name,
gr_io_signature_sptr  input_signature,
gr_io_signature_sptr  output_signature 
) [protected]

Member Function Documentation

int gr_sync_block::fixed_rate_ninput_to_noutput ( int  ninput) [virtual]

Given ninput samples, return number of output samples that will be produced. N.B. this is only defined if fixed_rate returns true. Generally speaking, you don't need to override this.

Reimplemented from gr_block.

Reimplemented in gr_sync_decimator, and gr_sync_interpolator.

int gr_sync_block::fixed_rate_noutput_to_ninput ( int  noutput) [virtual]

Given noutput samples, return number of input samples required to produce noutput. N.B. this is only defined if fixed_rate returns true. Generally speaking, you don't need to override this.

Reimplemented from gr_block.

Reimplemented in gr_sync_decimator, and gr_sync_interpolator.

void gr_sync_block::forecast ( int  noutput_items,
gr_vector_int ninput_items_required 
) [virtual]

Estimate input requirements given output request.

Parameters:
noutput_itemsnumber of output items to produce
ninput_items_requirednumber of input items required on each input stream

Given a request to product noutput_items, estimate the number of data items required on each input stream. The estimate doesn't have to be exact, but should be close.

Reimplemented from gr_block.

Reimplemented in gr_sync_decimator, gr_sync_interpolator, atsc_equalizer, atsc_field_sync_mux, and atsc_pad.

int gr_sync_block::general_work ( int  noutput_items,
gr_vector_int ninput_items,
gr_vector_const_void_star input_items,
gr_vector_void_star output_items 
) [virtual]

compute output items from input items

Parameters:
noutput_itemsnumber of output items to write on each output stream
ninput_itemsnumber of input items available on each input stream
input_itemsvector of pointers to the input items, one entry per input stream
output_itemsvector of pointers to the output items, one entry per output stream
Returns:
number of items actually written to each output stream, or -1 on EOF. It is OK to return a value less than noutput_items. -1 <= return value <= noutput_items

general_work must call consume or consume_each to indicate how many items were consumed on each input stream.

Implements gr_block.

Reimplemented in gr_sync_decimator, and gr_sync_interpolator.

virtual int gr_sync_block::work ( int  noutput_items,
gr_vector_const_void_star input_items,
gr_vector_void_star output_items 
) [pure virtual]

just like gr_block::general_work, only this arranges to call consume_each for you

The user must override work to define the signal processing code

Implemented in gr_adaptive_fir_ccc, gr_adaptive_fir_ccf, gr_dc_blocker_cc, gr_dc_blocker_ff, gr_fft_filter_ccc, gr_fft_filter_fff, gr_filter_delay_fc, gr_goertzel_fc, gr_hilbert_fc, gr_iir_filter_ffd, gr_pfb_decimator_ccf, gr_pfb_interpolator_ccf, gr_pfb_synthesis_filterbank_ccf, gr_single_pole_iir_filter_cc, gr_single_pole_iir_filter_ff, gr_additive_scrambler_bb, gr_agc2_cc, gr_agc2_ff, gr_agc_cc, gr_agc_ff, gr_annotator_1to1, gr_annotator_alltoall, gr_bin_statistics_f, gr_burst_tagger, gr_bytes_to_syms, gr_char_to_float, gr_check_counting_s, gr_check_lfsr_32k_s, gr_complex_to_interleaved_short, gr_complex_to_float, gr_complex_to_real, gr_complex_to_imag, gr_complex_to_mag, gr_complex_to_mag_squared, gr_complex_to_arg, gr_conjugate_cc, gr_correlate_access_code_tag_bb, gr_cpfsk_bc, gr_decode_ccsds_27_fb, gr_deinterleave, gr_delay, gr_descrambler_bb, gr_diff_decoder_bb, gr_diff_encoder_bb, gr_diff_phasor_cc, gr_dpll_bb, gr_encode_ccsds_27_bb, gr_fake_channel_encoder_pp, gr_fake_channel_decoder_pp, gr_feedforward_agc_cc, gr_fft_vcc_fftw, gr_fft_vfc, gr_float_to_char, gr_float_to_complex, gr_float_to_int, gr_float_to_short, gr_float_to_uchar, gr_framer_sink_1, gr_frequency_modulator_fc, gr_glfsr_source_b, gr_glfsr_source_f, gr_head, gr_int_to_float, gr_interleave, gr_interleaved_short_to_complex, gr_iqcomp_cc, gr_kludge_copy, gr_lfsr_32k_source_s, gr_map_bb, gr_nlog10_ff, gr_null_sink, gr_null_source, gr_ofdm_frame_sink2, gr_pa_2x2_phase_combiner, gr_packet_sink, gr_peak_detector2_fb, gr_phase_modulator_fc, gr_pn_correlator_cc, gr_probe_avg_mag_sqrd_c, gr_probe_avg_mag_sqrd_cf, gr_probe_avg_mag_sqrd_f, gr_probe_density_b, gr_probe_mpsk_snr_c, gr_probe_signal_f, gr_quadrature_demod_cf, gr_rail_ff, gr_regenerate_bb, gr_repeat, gr_rms_cf, gr_rms_ff, gr_scrambler_bb, gr_short_to_float, gr_simple_squelch_cc, gr_squash_ff, gr_stream_to_streams, gr_stream_to_vector, gr_streams_to_stream, gr_streams_to_vector, gr_stretch_ff, gr_threshold_ff, gr_uchar_to_float, gr_unpack_k_bits_bb, gr_vco_f, gr_vector_to_stream, gr_vector_to_streams, gr_wavelet_ff, gr_wvps_ff, gr_file_descriptor_sink, gr_file_descriptor_source, gr_file_sink, gr_file_source, gr_histo_sink_f, gr_message_sink, gr_message_source, gr_oscope_sink_f, gr_tagged_file_sink, gr_udp_sink, gr_udp_source, gr_wavfile_sink, gr_wavfile_source, atsc_deinterleaver, atsc_depad, atsc_derandomizer, atsc_ds_to_softds, atsc_equalizer, atsc_field_sync_mux, atsc_fpll, atsc_fs_checker, atsc_interleaver, atsc_pad, atsc_randomizer, atsc_rs_decoder, atsc_rs_encoder, atsc_trellis_encoder, atsc_viterbi_decoder, audio_alsa_sink, audio_alsa_source, audio_jack_sink, audio_jack_source, audio_oss_sink, audio_oss_source, audio_osx_sink, audio_osx_source, audio_portaudio_sink, audio_portaudio_source, audio_windows_sink, audio_windows_source, comedi_sink_s, comedi_source_s, digital_binary_slicer_fb, digital_correlate_access_code_bb, digital_costas_loop_cc, digital_fll_band_edge_cc, digital_mpsk_snr_est_cc, digital_ofdm_cyclic_prefixer, digital_ofdm_frame_sink, digital_ofdm_mapper_bcv, digital_probe_mpsk_snr_est_c, howto_square2_ff, noaa_hrpt_decoder, noaa_hrpt_pll_cf, pager_flex_deinterleave, pager_slicer_fb, qtgui_time_sink_c, qtgui_time_sink_f, trellis_permutation, tag_sink_demo, tag_source_demo, video_sdl_sink_s, video_sdl_sink_uc, vocoder_alaw_decode_bs, vocoder_alaw_encode_sb, vocoder_codec2_decode_ps, vocoder_codec2_encode_sp, vocoder_cvsd_decode_bs, vocoder_cvsd_encode_sb, vocoder_gsm_fr_decode_ps, vocoder_gsm_fr_encode_sp, vocoder_ulaw_decode_bs, and vocoder_ulaw_encode_sb.


The documentation for this class was generated from the following file: