GNU Radio v3.6.2-149-ga6d285d9 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>

Inheritance diagram for gr_sync_block:
gr_block gr_basic_block gr_msg_accepter gruel::msg_accepter 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 audio_source comedi_sink_s comedi_source_s digital_additive_scrambler_bb digital_binary_slicer_fb digital_correlate_access_code_bb digital_correlate_access_code_tag_bb digital_costas_loop_cc digital_descrambler_bb digital_diff_decoder_bb digital_diff_encoder_bb digital_diff_phasor_cc digital_fll_band_edge_cc digital_framer_sink_1 digital_glfsr_source_b digital_glfsr_source_f digital_map_bb digital_mpsk_snr_est_cc digital_ofdm_frame_sink digital_ofdm_mapper_bcv digital_packet_sink digital_probe_density_b digital_probe_mpsk_snr_est_c digital_scrambler_bb gr::analog::agc2_cc gr::analog::agc2_ff gr::analog::agc_cc gr::analog::agc_ff gr::analog::dpll_bb gr::analog::feedforward_agc_cc gr::analog::fmdet_cf gr::analog::frequency_modulator_fc gr::analog::phase_modulator_fc gr::analog::pll_carriertracking_cc gr::analog::pll_freqdet_cf gr::analog::pll_refout_cc gr::analog::probe_avg_mag_sqrd_c gr::analog::probe_avg_mag_sqrd_cf gr::analog::probe_avg_mag_sqrd_f gr::analog::quadrature_demod_cf gr::analog::rail_ff gr::analog::simple_squelch_cc gr::blocks::add_ff gr::blocks::char_to_float gr::blocks::char_to_short gr::blocks::complex_to_arg gr::blocks::complex_to_float gr::blocks::complex_to_imag gr::blocks::complex_to_mag gr::blocks::complex_to_mag_squared gr::blocks::complex_to_real gr::blocks::conjugate_cc gr::blocks::file_source gr::blocks::float_to_char gr::blocks::float_to_complex gr::blocks::float_to_int gr::blocks::float_to_short gr::blocks::float_to_uchar gr::blocks::int_to_float gr::blocks::multiply_cc gr::blocks::multiply_conjugate_cc gr::blocks::multiply_const_cc gr::blocks::multiply_const_ff gr::blocks::multiply_ff gr::blocks::nlog10_ff gr::blocks::short_to_char gr::blocks::short_to_float gr::blocks::streams_to_vector gr::blocks::uchar_to_float gr::blocks::vector_to_streams gr::fft::fft_vcc gr::fft::fft_vfc gr::filter::dc_blocker_cc gr::filter::dc_blocker_ff gr::filter::filter_delay_fc gr::filter::hilbert_fc gr::filter::iir_filter_ffd gr::filter::pfb_decimator_ccf gr::filter::single_pole_iir_filter_cc gr::filter::single_pole_iir_filter_ff gr_add_ff gr_additive_scrambler_bb gr_agc2_cc gr_agc2_ff gr_agc_cc gr_agc_ff gr_annotator_1to1 gr_annotator_alltoall gr_annotator_raw gr_bin_statistics_f gr_burst_tagger gr_char_to_float gr_char_to_short 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_descrambler_bb gr_diff_decoder_bb gr_diff_encoder_bb gr_diff_phasor_cc gr_dpll_bb gr_endian_swap 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_burst_source gr_message_sink gr_message_source gr_multiply_cc gr_multiply_conjugate_cc gr_multiply_const_cc gr_multiply_const_ff gr_multiply_ff 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_quadrature_demod_cf gr_rail_ff gr_regenerate_bb gr_rms_cf gr_rms_ff gr_scrambler_bb gr_short_to_char gr_short_to_float gr_simple_squelch_cc gr_single_pole_iir_filter_cc gr_single_pole_iir_filter_ff gr_streams_to_vector gr_stretch_ff gr_sync_decimator gr_sync_interpolator gr_tagged_file_sink gr_threshold_ff gr_throttle gr_transcendental gr_uchar_to_float gr_udp_sink gr_udp_source gr_vco_f gr_vector_map gr_vector_to_streams gr_wavfile_sink gr_wavfile_source noaa_hrpt_decoder noaa_hrpt_pll_cf pager_slicer_fb qtgui_time_sink_c qtgui_time_sink_f shd_smini_sink shd_smini_source tag_sink_demo tag_source_demo trellis_permutation uhd_usrp_sink uhd_usrp_source video_sdl_sink_s video_sdl_sink_uc vocoder_alaw_decode_bs vocoder_alaw_encode_sb vocoder_g721_decode_bs vocoder_g721_encode_sb vocoder_g723_24_decode_bs vocoder_g723_24_encode_sb vocoder_g723_40_decode_bs vocoder_g723_40_encode_sb vocoder_ulaw_decode_bs vocoder_ulaw_encode_sb wavelet_squash_ff wavelet_wavelet_ff wavelet_wvps_ff

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_interpolator, and gr_sync_decimator.

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_interpolator, and gr_sync_decimator.

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_interpolator, gr_sync_decimator, 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_interpolator, and gr_sync_decimator.

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 digital_fll_band_edge_cc, vocoder_cvsd_encode_sb, vocoder_cvsd_decode_bs, gr_complex_to_arg, gr_pfb_decimator_ccf, gr_pfb_synthesizer_ccf, gr_complex_to_mag_squared, gr_wavfile_sink, gr_pfb_interpolator_ccf, digital_ofdm_frame_sink, gr_complex_to_mag, digital_packet_sink, gr_ofdm_frame_sink2, digital_costas_loop_cc, gr_dc_blocker_ff, gr_udp_sink, gr_dc_blocker_cc, gr_udp_source, gr_framer_sink_1, gr_peak_detector2_fb, digital_framer_sink_1, gr_complex_to_imag, gr_packet_sink, qtgui_time_sink_c, gr_iir_filter_ffd, gr_bin_statistics_f, qtgui_time_sink_f, gr_check_lfsr_32k_s, digital_mpsk_snr_est_cc, digital_probe_mpsk_snr_est_c, gr_fake_channel_decoder_pp, video_sdl_sink_s, video_sdl_sink_uc, comedi_source_s, comedi_sink_s, gr_fft_filter_ccc, gr_fft_filter_fff, gr_single_pole_iir_filter_cc, gr_check_counting_s, audio_alsa_source, gr_single_pole_iir_filter_ff, gr_complex_to_real, digital_ofdm_mapper_bcv, audio_portaudio_sink, tag_source_demo, audio_alsa_sink, audio_osx_source, audio_portaudio_source, digital_correlate_access_code_tag_bb, gr::filter::pfb_synthesizer_ccf_impl, gr_correlate_access_code_tag_bb, gr_vector_map, audio_jack_sink, audio_jack_source, digital_correlate_access_code_bb, gr_decode_ccsds_27_fb, gr_wavfile_source, noaa_hrpt_decoder, gr_regenerate_bb, gr_vco_f, digital_glfsr_source_b, digital_glfsr_source_f, digital_probe_density_b, gr_probe_density_b, gr::analog::pll_carriertracking_cc_impl, audio_windows_sink, digital_additive_scrambler_bb, gr::filter::dc_blocker_cc_impl, gr::filter::dc_blocker_ff_impl, audio_osx_sink, gr_message_burst_source, gr_tagged_file_sink, gr_fft_vfc, digital_pn_correlator_cc, gr_char_to_float, gr_complex_to_float, gr_float_to_char, gr_float_to_int, gr_int_to_float, gr_short_to_float, gr_message_source, gr_additive_scrambler_bb, gr_float_to_short, gr_file_descriptor_source, gr_probe_avg_mag_sqrd_cf, gr::analog::pll_freqdet_cf_impl, gr_fft_vcc_fftw, gr::analog::pll_refout_cc_impl, gr_probe_avg_mag_sqrd_c, gr_probe_avg_mag_sqrd_f, gr_filter_delay_fc, gr_burst_tagger, gr_cpfsk_bc, gr_encode_ccsds_27_bb, gr_histo_sink_f, gr_glfsr_source_b, gr_glfsr_source_f, gr_pa_2x2_phase_combiner, gr_message_sink, gr_adaptive_fir_ccc, atsc_fpll, digital_bytes_to_syms, digital_descrambler_bb, digital_map_bb, digital_scrambler_bb, gr::filter::pfb_decimator_ccf_impl, gr_bytes_to_syms, gr_file_source, trellis_permutation, gr_descrambler_bb, gr_lfsr_32k_source_s, gr_pn_correlator_cc, gr_scrambler_bb, gr_stretch_ff, gr_oscope_sink_f, gr_adaptive_fir_ccf, gr_annotator_alltoall, gr_fake_channel_encoder_pp, gr_frequency_modulator_fc, gr_multiply_const_cc, gr_multiply_const_ff, gr_threshold_ff, gr::analog::fmdet_cf_impl, digital_diff_phasor_cc, gr_hilbert_fc, gr_annotator_1to1, gr_dpll_bb, gr_simple_squelch_cc, gr_file_descriptor_sink, gr_file_sink, gr::filter::adaptive_fir_ccc_impl, gr::filter::adaptive_fir_ccf_impl, gr::filter::fft_filter_ccc_impl, gr::filter::fft_filter_fff_impl, gr::filter::pfb_interpolator_ccf_impl, wavelet_squash_ff_impl, gr_goertzel_fc, gr_char_to_short, gr_feedforward_agc_cc, gr_rail_ff, gr_repeat, gr_rms_cf, gr_rms_ff, gr_short_to_char, gr::analog::probe_avg_mag_sqrd_c_impl, gr::analog::probe_avg_mag_sqrd_cf_impl, gr::analog::probe_avg_mag_sqrd_f_impl, audio_oss_source, audio_windows_source, digital_diff_encoder_bb, gr::fft::fft_vcc_fftw, gr_agc2_cc, gr_endian_swap, gr_kludge_copy, gr_multiply_conjugate_cc, gr_pack_k_bits_bb, gr_phase_modulator_fc, gr_quadrature_demod_cf, gr_stream_to_streams, gr_streams_to_stream, gr_unpack_k_bits_bb, gr::analog::agc2_cc_impl, gr::analog::agc2_ff_impl, gr::analog::simple_squelch_cc_impl, atsc_randomizer, digital_diff_decoder_bb, digital_ofdm_cyclic_prefixer, gr::fft::fft_vfc_fftw, gr::fft::goertzel_fc_impl, vocoder_alaw_decode_bs, vocoder_ulaw_decode_bs, gr_add_ff, gr_agc_cc, gr_agc_ff, gr_annotator_raw, gr_iqcomp_cc, gr_multiply_cc, gr_multiply_ff, gr_nlog10_ff, gr::analog::dpll_bb_impl, atsc_equalizer, audio_oss_sink, pager_flex_deinterleave, pager_slicer_fb, vocoder_alaw_encode_sb, vocoder_ulaw_encode_sb, wavelet_wavelet_ff_impl, gr_agc2_ff, gr_deinterleave, gr_diff_encoder_bb, gr_float_to_complex, gr_head, gr_interleave, gr_stream_to_vector, gr_streams_to_vector, gr_vector_to_stream, gr_vector_to_streams, gr::analog::rail_ff_impl, atsc_deinterleaver, atsc_derandomizer, atsc_fs_checker, atsc_rs_decoder, atsc_rs_encoder, atsc_trellis_encoder, atsc_viterbi_decoder, vocoder_gsm_fr_encode_sp, gr_diff_decoder_bb, gr_diff_phasor_cc, gr::analog::agc_cc_impl, gr::analog::agc_ff_impl, atsc_field_sync_mux, atsc_interleaver, atsc_pad, digital_binary_slicer_fb, gr::filter::filter_delay_fc_impl, gr::filter::iir_filter_ffd_impl, gr_complex_to_interleaved_short, gr_conjugate_cc, gr_interleaved_short_to_complex, gr_map_bb, gr_null_sink, gr::analog::phase_modulator_fc_impl, atsc_ds_to_softds, gr::filter::single_pole_iir_filter_cc_impl, noaa_hrpt_pll_cf, vocoder_gsm_fr_decode_ps, gr_float_to_uchar, gr_null_source, gr_uchar_to_float, gr::analog::cpfsk_bc_impl, atsc_depad, gr::filter::single_pole_iir_filter_ff_impl, vocoder_codec2_decode_ps, vocoder_codec2_encode_sp, gr::analog::frequency_modulator_fc_impl, gr::blocks::file_source_impl, gr::blocks::multiply_const_cc_impl, gr::blocks::multiply_const_ff_impl, gr::filter::hilbert_fc_impl, tag_sink_demo, gr::analog::quadrature_demod_cf_impl, gr::blocks::char_to_float_impl, gr::blocks::float_to_char_impl, gr::blocks::float_to_int_impl, gr::blocks::float_to_short_impl, gr::blocks::int_to_float_impl, gr::blocks::short_to_float_impl, gr::analog::feedforward_agc_cc_impl, gr::blocks::deinterleave_impl, gr::blocks::interleave_impl, gr::blocks::nlog10_ff_impl, gr::blocks::repeat_impl, wavelet_wvps_ff_impl, gr::blocks::add_ff_impl, gr::blocks::char_to_short_impl, gr::blocks::complex_to_arg_impl, gr::blocks::complex_to_float_impl, gr::blocks::complex_to_imag_impl, gr::blocks::complex_to_mag_impl, gr::blocks::complex_to_mag_squared_impl, gr::blocks::complex_to_real_impl, gr::blocks::float_to_complex_impl, gr::blocks::multiply_cc_impl, gr::blocks::multiply_conjugate_cc_impl, gr::blocks::multiply_ff_impl, gr::blocks::short_to_char_impl, gr::blocks::complex_to_interleaved_short_impl, gr::blocks::conjugate_cc_impl, gr::blocks::float_to_uchar_impl, gr::blocks::interleaved_short_to_complex_impl, gr::blocks::stream_to_streams_impl, gr::blocks::stream_to_vector_impl, gr::blocks::streams_to_stream_impl, gr::blocks::streams_to_vector_impl, gr::blocks::uchar_to_float_impl, gr::blocks::vector_to_stream_impl, and gr::blocks::vector_to_streams_impl.


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