GNU Radio 3.7.1 C++ API
|
synchronous 1:1 input to output with historyOverride work to provide the signal processing implementation. More...
#include <sync_block.h>
Inherits gr::block.
Inherited by atsc_deinterleaver, atsc_derandomizer, atsc_ds_to_softds, atsc_equalizer, atsc_fpll, atsc_fs_checker, atsc_interleaver, atsc_randomizer, atsc_rs_decoder, atsc_rs_encoder, atsc_trellis_encoder, atsc_viterbi_decoder, gr::analog::agc2_cc [virtual]
, gr::analog::agc2_ff [virtual]
, gr::analog::agc3_cc [virtual]
, gr::analog::agc_cc [virtual]
, gr::analog::agc_ff [virtual]
, gr::analog::dpll_bb [virtual]
, gr::analog::fastnoise_source_c [virtual]
, gr::analog::fastnoise_source_f [virtual]
, gr::analog::fastnoise_source_i [virtual]
, gr::analog::fastnoise_source_s [virtual]
, gr::analog::feedforward_agc_cc [virtual]
, gr::analog::fmdet_cf [virtual]
, gr::analog::frequency_modulator_fc [virtual]
, gr::analog::noise_source_c [virtual]
, gr::analog::noise_source_f [virtual]
, gr::analog::noise_source_i [virtual]
, gr::analog::noise_source_s [virtual]
, gr::analog::phase_modulator_fc [virtual]
, gr::analog::pll_carriertracking_cc [virtual]
, gr::analog::pll_freqdet_cf [virtual]
, gr::analog::pll_refout_cc [virtual]
, gr::analog::probe_avg_mag_sqrd_c [virtual]
, gr::analog::probe_avg_mag_sqrd_cf [virtual]
, gr::analog::probe_avg_mag_sqrd_f [virtual]
, gr::analog::quadrature_demod_cf [virtual]
, gr::analog::rail_ff [virtual]
, gr::analog::sig_source_c [virtual]
, gr::analog::sig_source_f [virtual]
, gr::analog::sig_source_i [virtual]
, gr::analog::sig_source_s [virtual]
, gr::analog::simple_squelch_cc [virtual]
, gr::audio::sink [virtual]
, gr::audio::source [virtual]
, gr::blocks::add_cc [virtual]
, gr::blocks::add_const_bb [virtual]
, gr::blocks::add_const_cc [virtual]
, gr::blocks::add_const_ff [virtual]
, gr::blocks::add_const_ii [virtual]
, gr::blocks::add_const_ss [virtual]
, gr::blocks::add_const_vbb [virtual]
, gr::blocks::add_const_vcc [virtual]
, gr::blocks::add_const_vff [virtual]
, gr::blocks::add_const_vii [virtual]
, gr::blocks::add_const_vss [virtual]
, gr::blocks::add_ff [virtual]
, gr::blocks::add_ii [virtual]
, gr::blocks::add_ss [virtual]
, gr::blocks::and_bb [virtual]
, gr::blocks::and_const_bb [virtual]
, gr::blocks::and_const_ii [virtual]
, gr::blocks::and_const_ss [virtual]
, gr::blocks::and_ii [virtual]
, gr::blocks::and_ss [virtual]
, gr::blocks::annotator_1to1 [virtual]
, gr::blocks::annotator_alltoall [virtual]
, gr::blocks::annotator_raw [virtual]
, gr::blocks::argmax_fs [virtual]
, gr::blocks::argmax_is [virtual]
, gr::blocks::argmax_ss [virtual]
, gr::blocks::bin_statistics_f [virtual]
, gr::blocks::burst_tagger [virtual]
, gr::blocks::char_to_float [virtual]
, gr::blocks::char_to_short [virtual]
, gr::blocks::check_lfsr_32k_s [virtual]
, gr::blocks::complex_to_arg [virtual]
, gr::blocks::complex_to_float [virtual]
, gr::blocks::complex_to_imag [virtual]
, gr::blocks::complex_to_mag [virtual]
, gr::blocks::complex_to_mag_squared [virtual]
, gr::blocks::complex_to_real [virtual]
, gr::blocks::conjugate_cc [virtual]
, gr::blocks::ctrlport_probe2_b [virtual]
, gr::blocks::ctrlport_probe2_c [virtual]
, gr::blocks::ctrlport_probe2_f [virtual]
, gr::blocks::ctrlport_probe2_i [virtual]
, gr::blocks::ctrlport_probe2_s [virtual]
, gr::blocks::ctrlport_probe_c [virtual]
, gr::blocks::divide_cc [virtual]
, gr::blocks::divide_ff [virtual]
, gr::blocks::divide_ii [virtual]
, gr::blocks::divide_ss [virtual]
, gr::blocks::endian_swap [virtual]
, gr::blocks::file_descriptor_sink [virtual]
, gr::blocks::file_descriptor_source [virtual]
, gr::blocks::file_meta_sink [virtual]
, gr::blocks::file_meta_source [virtual]
, gr::blocks::file_sink [virtual]
, gr::blocks::file_source [virtual]
, gr::blocks::float_to_char [virtual]
, gr::blocks::float_to_complex [virtual]
, gr::blocks::float_to_int [virtual]
, gr::blocks::float_to_short [virtual]
, gr::blocks::float_to_uchar [virtual]
, gr::blocks::head [virtual]
, gr::blocks::int_to_float [virtual]
, gr::blocks::lfsr_32k_source_s [virtual]
, gr::blocks::max_ff [virtual]
, gr::blocks::max_ii [virtual]
, gr::blocks::max_ss [virtual]
, gr::blocks::message_burst_source [virtual]
, gr::blocks::message_sink [virtual]
, gr::blocks::message_source [virtual]
, gr::blocks::moving_average_cc [virtual]
, gr::blocks::moving_average_ff [virtual]
, gr::blocks::moving_average_ii [virtual]
, gr::blocks::moving_average_ss [virtual]
, gr::blocks::multiply_cc [virtual]
, gr::blocks::multiply_conjugate_cc [virtual]
, gr::blocks::multiply_const_cc [virtual]
, gr::blocks::multiply_const_ff [virtual]
, gr::blocks::multiply_const_ii [virtual]
, gr::blocks::multiply_const_ss [virtual]
, gr::blocks::multiply_const_vcc [virtual]
, gr::blocks::multiply_const_vff [virtual]
, gr::blocks::multiply_const_vii [virtual]
, gr::blocks::multiply_const_vss [virtual]
, gr::blocks::multiply_ff [virtual]
, gr::blocks::multiply_ii [virtual]
, gr::blocks::multiply_ss [virtual]
, gr::blocks::mute_cc [virtual]
, gr::blocks::mute_ff [virtual]
, gr::blocks::mute_ii [virtual]
, gr::blocks::mute_ss [virtual]
, gr::blocks::nlog10_ff [virtual]
, gr::blocks::not_bb [virtual]
, gr::blocks::not_ii [virtual]
, gr::blocks::not_ss [virtual]
, gr::blocks::null_sink [virtual]
, gr::blocks::null_source [virtual]
, gr::blocks::or_bb [virtual]
, gr::blocks::or_ii [virtual]
, gr::blocks::or_ss [virtual]
, gr::blocks::pdu_to_tagged_stream [virtual]
, gr::blocks::peak_detector2_fb [virtual]
, gr::blocks::peak_detector_fb [virtual]
, gr::blocks::peak_detector_ib [virtual]
, gr::blocks::peak_detector_sb [virtual]
, gr::blocks::probe_rate [virtual]
, gr::blocks::probe_signal_b [virtual]
, gr::blocks::probe_signal_c [virtual]
, gr::blocks::probe_signal_f [virtual]
, gr::blocks::probe_signal_i [virtual]
, gr::blocks::probe_signal_s [virtual]
, gr::blocks::probe_signal_vb [virtual]
, gr::blocks::probe_signal_vc [virtual]
, gr::blocks::probe_signal_vf [virtual]
, gr::blocks::probe_signal_vi [virtual]
, gr::blocks::probe_signal_vs [virtual]
, gr::blocks::regenerate_bb [virtual]
, gr::blocks::rms_cf [virtual]
, gr::blocks::rms_ff [virtual]
, gr::blocks::sample_and_hold_bb [virtual]
, gr::blocks::sample_and_hold_ff [virtual]
, gr::blocks::sample_and_hold_ii [virtual]
, gr::blocks::sample_and_hold_ss [virtual]
, gr::blocks::short_to_char [virtual]
, gr::blocks::short_to_float [virtual]
, gr::blocks::streams_to_vector [virtual]
, gr::blocks::stretch_ff [virtual]
, gr::blocks::sub_cc [virtual]
, gr::blocks::sub_ff [virtual]
, gr::blocks::sub_ii [virtual]
, gr::blocks::sub_ss [virtual]
, gr::blocks::tag_debug [virtual]
, gr::blocks::tag_gate [virtual]
, gr::blocks::tagged_file_sink [virtual]
, gr::blocks::tagged_stream_to_pdu [virtual]
, gr::blocks::tags_strobe [virtual]
, gr::blocks::threshold_ff [virtual]
, gr::blocks::throttle [virtual]
, gr::blocks::transcendental [virtual]
, gr::blocks::uchar_to_float [virtual]
, gr::blocks::udp_sink [virtual]
, gr::blocks::udp_source [virtual]
, gr::blocks::vco_c [virtual]
, gr::blocks::vco_f [virtual]
, gr::blocks::vector_map [virtual]
, gr::blocks::vector_sink_b [virtual]
, gr::blocks::vector_sink_c [virtual]
, gr::blocks::vector_sink_f [virtual]
, gr::blocks::vector_sink_i [virtual]
, gr::blocks::vector_sink_s [virtual]
, gr::blocks::vector_source_b [virtual]
, gr::blocks::vector_source_c [virtual]
, gr::blocks::vector_source_f [virtual]
, gr::blocks::vector_source_i [virtual]
, gr::blocks::vector_source_s [virtual]
, gr::blocks::vector_to_streams [virtual]
, gr::blocks::wavfile_sink [virtual]
, gr::blocks::wavfile_source [virtual]
, gr::blocks::xor_bb [virtual]
, gr::blocks::xor_ii [virtual]
, gr::blocks::xor_ss [virtual]
, gr::channels::fading_model [virtual]
, gr::channels::selective_fading_model [virtual]
, gr::comedi::sink_s [virtual]
, gr::comedi::source_s [virtual]
, gr::digital::additive_scrambler_bb [virtual]
, gr::digital::binary_slicer_fb [virtual]
, gr::digital::correlate_access_code_bb [virtual]
, gr::digital::correlate_access_code_tag_bb [virtual]
, gr::digital::costas_loop_cc [virtual]
, gr::digital::descrambler_bb [virtual]
, gr::digital::diff_decoder_bb [virtual]
, gr::digital::diff_encoder_bb [virtual]
, gr::digital::diff_phasor_cc [virtual]
, gr::digital::fll_band_edge_cc [virtual]
, gr::digital::framer_sink_1 [virtual]
, gr::digital::glfsr_source_b [virtual]
, gr::digital::glfsr_source_f [virtual]
, gr::digital::map_bb [virtual]
, gr::digital::mpsk_snr_est_cc [virtual]
, gr::digital::ofdm_frame_sink [virtual]
, gr::digital::ofdm_mapper_bcv [virtual]
, gr::digital::packet_headerparser_b [virtual]
, gr::digital::packet_sink [virtual]
, gr::digital::probe_density_b [virtual]
, gr::digital::probe_mpsk_snr_est_c [virtual]
, gr::digital::scrambler_bb [virtual]
, gr::fft::ctrlport_probe_psd [virtual]
, gr::fft::fft_vcc [virtual]
, gr::fft::fft_vfc [virtual]
, gr::filter::dc_blocker_cc [virtual]
, gr::filter::dc_blocker_ff [virtual]
, gr::filter::filter_delay_fc [virtual]
, gr::filter::hilbert_fc [virtual]
, gr::filter::iir_filter_ffd [virtual]
, gr::filter::pfb_decimator_ccf [virtual]
, gr::filter::single_pole_iir_filter_cc [virtual]
, gr::filter::single_pole_iir_filter_ff [virtual]
, gr::noaa::hrpt_decoder [virtual]
, gr::noaa::hrpt_pll_cf [virtual]
, gr::pager::flex_parse [virtual]
, gr::pager::slicer_fb [virtual]
, gr::qtgui::const_sink_c [virtual]
, gr::qtgui::freq_sink_c [virtual]
, gr::qtgui::freq_sink_f [virtual]
, gr::qtgui::histogram_sink_f [virtual]
, gr::qtgui::time_raster_sink_b [virtual]
, gr::qtgui::time_raster_sink_f [virtual]
, gr::qtgui::time_sink_c [virtual]
, gr::qtgui::time_sink_f [virtual]
, gr::qtgui::waterfall_sink_c [virtual]
, gr::qtgui::waterfall_sink_f [virtual]
, gr::sync_decimator, gr::sync_interpolator, gr::trellis::encoder_bb [virtual]
, gr::trellis::encoder_bi [virtual]
, gr::trellis::encoder_bs [virtual]
, gr::trellis::encoder_ii [virtual]
, gr::trellis::encoder_si [virtual]
, gr::trellis::encoder_ss [virtual]
, gr::trellis::pccc_encoder_bb [virtual]
, gr::trellis::pccc_encoder_bi [virtual]
, gr::trellis::pccc_encoder_bs [virtual]
, gr::trellis::pccc_encoder_ii [virtual]
, gr::trellis::pccc_encoder_si [virtual]
, gr::trellis::pccc_encoder_ss [virtual]
, gr::trellis::permutation [virtual]
, gr::trellis::sccc_encoder_bb [virtual]
, gr::trellis::sccc_encoder_bi [virtual]
, gr::trellis::sccc_encoder_bs [virtual]
, gr::trellis::sccc_encoder_ii [virtual]
, gr::trellis::sccc_encoder_si [virtual]
, gr::trellis::sccc_encoder_ss [virtual]
, gr::uhd::usrp_sink [virtual]
, gr::uhd::usrp_source [virtual]
, gr::video_sdl::sink_s [virtual]
, gr::video_sdl::sink_uc [virtual]
, gr::vocoder::alaw_decode_bs [virtual]
, gr::vocoder::alaw_encode_sb [virtual]
, gr::vocoder::g721_decode_bs [virtual]
, gr::vocoder::g721_encode_sb [virtual]
, gr::vocoder::g723_24_decode_bs [virtual]
, gr::vocoder::g723_24_encode_sb [virtual]
, gr::vocoder::g723_40_decode_bs [virtual]
, gr::vocoder::g723_40_encode_sb [virtual]
, gr::vocoder::ulaw_decode_bs [virtual]
, gr::vocoder::ulaw_encode_sb [virtual]
, gr::wavelet::squash_ff [virtual]
, gr::wavelet::wavelet_ff [virtual]
, gr::wavelet::wvps_ff [virtual]
, gr::wxgui::histo_sink_f [virtual]
, gr::wxgui::oscope_sink_x, tag_sink_demo, and tag_source_demo.
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 | |
sync_block (void) | |
sync_block (const std::string &name, gr::io_signature::sptr input_signature, gr::io_signature::sptr output_signature) |
synchronous 1:1 input to output with history
Override work to provide the signal processing implementation.
gr::sync_block::sync_block | ( | void | ) | [inline, protected] |
gr::sync_block::sync_block | ( | const std::string & | name, |
gr::io_signature::sptr | input_signature, | ||
gr::io_signature::sptr | output_signature | ||
) | [protected] |
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.
noutput_items | number of output items to produce |
ninput_items_required | number 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, gr::fft::ctrlport_probe_psd_impl, atsc_equalizer, 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
noutput_items | number of output items to write on each output stream |
ninput_items | number of input items available on each input stream |
input_items | vector of pointers to the input items, one entry per input stream |
output_items | vector of pointers to the output items, one entry per output stream |
general_work must call consume or consume_each to indicate how many items were consumed on each input stream.
Reimplemented from 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 tag_source_demo, gr::wxgui::oscope_sink_x, atsc_fpll, gr::fft::ctrlport_probe_psd_impl, atsc_equalizer, atsc_randomizer, gr::fft::fft_vcc_fftw, gr::fft::fft_vfc_fftw, gr::fft::goertzel_fc_impl, atsc_deinterleaver, atsc_fs_checker, atsc_rs_decoder, atsc_rs_encoder, atsc_viterbi_decoder, atsc_derandomizer, atsc_interleaver, atsc_pad, atsc_trellis_encoder, atsc_ds_to_softds, atsc_depad, and tag_sink_demo.