GNU Radio 3.6.5 C++ API
|
synchronous 1:1 input to output with historyOverride work to provide the signal processing implementation. More...
#include <gr_sync_block.h>
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) |
synchronous 1:1 input to output with history
Override work to provide the signal processing implementation.
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] |
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.
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_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
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_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_synthesizer_ccf, gr_single_pole_iir_filter_cc, gr_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_bytes_to_syms, gr_char_to_float, gr_char_to_short, 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_descrambler_bb, gr_diff_decoder_bb, gr_diff_encoder_bb, gr_diff_phasor_cc, gr_dpll_bb, gr_encode_ccsds_27_bb, gr_endian_swap, 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_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_pa_2x2_phase_combiner, gr_pack_k_bits_bb, 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_quadrature_demod_cf, gr_rail_ff, gr_regenerate_bb, gr_repeat, gr_rms_cf, gr_rms_ff, gr_scrambler_bb, gr_short_to_char, gr_short_to_float, gr_simple_squelch_cc, gr_stream_to_streams, gr_stream_to_vector, gr_streams_to_stream, gr_streams_to_vector, gr_stretch_ff, gr_tag_debug, gr_threshold_ff, gr_uchar_to_float, gr_unpack_k_bits_bb, gr_vco_f, gr_vector_map, gr_vector_to_stream, gr_vector_to_streams, gr_file_descriptor_sink, gr_file_descriptor_source, gr_file_sink, gr_file_source, gr_histo_sink_f, gr_message_burst_source, gr_message_sink, gr_message_source, gr_oscope_sink_f, gr_pdu_to_tagged_stream, gr_stream_pdu_base, gr_tagged_file_sink, gr_tagged_stream_to_pdu, gr_udp_sink, gr_udp_source, gr_wavfile_sink, gr_wavfile_source, gr::analog::agc2_cc_impl, gr::analog::agc2_ff_impl, gr::analog::agc_cc_impl, gr::analog::agc_ff_impl, gr::analog::cpfsk_bc_impl, gr::analog::dpll_bb_impl, gr::analog::feedforward_agc_cc_impl, gr::analog::fmdet_cf_impl, gr::analog::frequency_modulator_fc_impl, gr::analog::phase_modulator_fc_impl, gr::analog::plateau_detector_fb_impl, gr::analog::pll_carriertracking_cc_impl, gr::analog::pll_freqdet_cf_impl, gr::analog::pll_refout_cc_impl, gr::analog::probe_avg_mag_sqrd_c_impl, gr::analog::probe_avg_mag_sqrd_cf_impl, gr::analog::probe_avg_mag_sqrd_f_impl, gr::analog::quadrature_demod_cf_impl, gr::analog::rail_ff_impl, gr::analog::simple_squelch_cc_impl, 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, gr::blocks::add_ff_impl, gr::blocks::annotator_1to1_impl, gr::blocks::annotator_alltoall_impl, gr::blocks::annotator_raw_impl, gr::blocks::bin_statistics_f_impl, gr::blocks::burst_tagger_impl, gr::blocks::char_to_float_impl, gr::blocks::char_to_short_impl, gr::blocks::check_lfsr_32k_s_impl, gr::blocks::complex_to_arg_impl, gr::blocks::complex_to_float_impl, gr::blocks::complex_to_imag_impl, gr::blocks::complex_to_interleaved_short_impl, gr::blocks::complex_to_mag_impl, gr::blocks::complex_to_mag_squared_impl, gr::blocks::complex_to_real_impl, gr::blocks::conjugate_cc_impl, gr::blocks::deinterleave_impl, gr::blocks::endian_swap_impl, gr::blocks::file_descriptor_sink_impl, gr::blocks::file_descriptor_source_impl, gr::blocks::file_meta_sink_impl, gr::blocks::file_meta_source_impl, gr::blocks::file_sink_impl, gr::blocks::file_source_impl, gr::blocks::float_to_char_impl, gr::blocks::float_to_complex_impl, gr::blocks::float_to_int_impl, gr::blocks::float_to_short_impl, gr::blocks::float_to_uchar_impl, gr::blocks::head_impl, gr::blocks::int_to_float_impl, gr::blocks::interleave_impl, gr::blocks::interleaved_short_to_complex_impl, gr::blocks::lfsr_32k_source_s_impl, gr::blocks::message_burst_source_impl, gr::blocks::message_sink_impl, gr::blocks::message_source_impl, gr::blocks::multiply_cc_impl, gr::blocks::multiply_conjugate_cc_impl, gr::blocks::multiply_const_cc_impl, gr::blocks::multiply_const_ff_impl, gr::blocks::multiply_ff_impl, gr::blocks::nlog10_ff_impl, gr::blocks::null_sink_impl, gr::blocks::null_source_impl, gr::blocks::pack_k_bits_bb_impl, gr::blocks::pdu_to_tagged_stream_impl, gr::blocks::peak_detector2_fb_impl, gr::blocks::plateau_detector_fb_impl, gr::blocks::probe_rate_impl, gr::blocks::regenerate_bb_impl, gr::blocks::repeat_impl, gr::blocks::rms_cf_impl, gr::blocks::rms_ff_impl, gr::blocks::short_to_char_impl, gr::blocks::short_to_float_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::stretch_ff_impl, gr::blocks::tag_debug_impl, gr::blocks::tag_gate_impl, gr::blocks::tagged_file_sink_impl, gr::blocks::tagged_stream_to_pdu_impl, gr::blocks::threshold_ff_impl, gr::blocks::throttle_impl, gr::blocks::transcendental_impl, gr::blocks::uchar_to_float_impl, gr::blocks::udp_sink_impl, gr::blocks::udp_source_impl, gr::blocks::unpack_k_bits_bb_impl, gr::blocks::vco_f_impl, gr::blocks::vector_map_impl, gr::blocks::vector_to_stream_impl, gr::blocks::vector_to_streams_impl, gr::blocks::wavfile_sink_impl, gr::blocks::wavfile_source_impl, comedi_sink_s, comedi_source_s, digital_additive_scrambler_bb, digital_binary_slicer_fb, digital_bytes_to_syms, 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_pn_correlator_cc, digital_probe_density_b, digital_probe_mpsk_snr_est_c, digital_scrambler_bb, gr::digital::packet_headerparser_b_impl, gr::fft::fft_vcc_fftw, gr::fft::fft_vfc_fftw, gr::fft::goertzel_fc_impl, gr::filter::adaptive_fir_ccc_impl, gr::filter::adaptive_fir_ccf_impl, gr::filter::dc_blocker_cc_impl, gr::filter::dc_blocker_ff_impl, gr::filter::fft_filter_ccc_impl, gr::filter::fft_filter_fff_impl, gr::filter::filter_delay_fc_impl, gr::filter::hilbert_fc_impl, gr::filter::iir_filter_ffd_impl, gr::filter::pfb_decimator_ccf_impl, gr::filter::pfb_interpolator_ccf_impl, gr::filter::pfb_synthesizer_ccf_impl, gr::filter::single_pole_iir_filter_cc_impl, gr::filter::single_pole_iir_filter_ff_impl, noaa_hrpt_decoder, noaa_hrpt_pll_cf, pager_flex_deinterleave, pager_flex_parse, 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, vocoder_ulaw_encode_sb, wavelet_squash_ff_impl, wavelet_wavelet_ff_impl, wavelet_wvps_ff_impl, gr_fir_filter_ccc, gr_fir_filter_ccf, gr_fir_filter_fcc, gr_fir_filter_fff, gr_fir_filter_fsf, gr_fir_filter_scc, gr_freq_xlating_fir_filter_ccc, gr_freq_xlating_fir_filter_ccf, gr_freq_xlating_fir_filter_fcc, gr_freq_xlating_fir_filter_fcf, gr_freq_xlating_fir_filter_scc, gr_freq_xlating_fir_filter_scf, gr_interp_fir_filter_ccc, gr_interp_fir_filter_ccf, gr_interp_fir_filter_fcc, gr_interp_fir_filter_fff, gr_interp_fir_filter_fsf, gr_interp_fir_filter_scc, gr_add_cc, gr_add_const_bb, gr_add_const_cc, gr_add_const_ff, gr_add_const_ii, gr_add_const_sf, gr_add_const_ss, gr_add_const_vcc, gr_add_const_vff, gr_add_const_vii, gr_add_const_vss, gr_add_ii, gr_add_ss, gr_and_bb, gr_and_const_bb, gr_and_const_ii, gr_and_const_ss, gr_and_ii, gr_and_ss, gr_argmax_fs, gr_argmax_is, gr_argmax_ss, gr_chunks_to_symbols_bc, gr_chunks_to_symbols_bf, gr_chunks_to_symbols_ic, gr_chunks_to_symbols_if, gr_chunks_to_symbols_sc, gr_chunks_to_symbols_sf, gr_divide_cc, gr_divide_ff, gr_divide_ii, gr_divide_ss, gr_fastnoise_source_c, gr_fastnoise_source_f, gr_fastnoise_source_i, gr_fastnoise_source_s, gr_integrate_cc, gr_integrate_ff, gr_integrate_ii, gr_integrate_ss, gr_max_ff, gr_max_ii, gr_max_ss, gr_moving_average_cc, gr_moving_average_ff, gr_moving_average_ii, gr_moving_average_ss, gr_multiply_const_ii, gr_multiply_const_ss, gr_multiply_const_vcc, gr_multiply_const_vff, gr_multiply_const_vii, gr_multiply_const_vss, gr_multiply_ii, gr_multiply_ss, gr_mute_cc, gr_mute_ff, gr_mute_ii, gr_mute_ss, gr_noise_source_c, gr_noise_source_f, gr_noise_source_i, gr_noise_source_s, gr_not_bb, gr_not_ii, gr_not_ss, gr_or_bb, gr_or_ii, gr_or_ss, gr_peak_detector_fb, gr_peak_detector_ib, gr_peak_detector_sb, gr_probe_signal_b, gr_probe_signal_c, gr_probe_signal_f, gr_probe_signal_i, gr_probe_signal_s, gr_probe_signal_vb, gr_probe_signal_vc, gr_probe_signal_vf, gr_probe_signal_vi, gr_probe_signal_vs, gr_sample_and_hold_bb, gr_sample_and_hold_ff, gr_sample_and_hold_ii, gr_sample_and_hold_ss, gr_sig_source_c, gr_sig_source_f, gr_sig_source_i, gr_sig_source_s, gr_sub_cc, gr_sub_ff, gr_sub_ii, gr_sub_ss, gr_vector_sink_b, gr_vector_sink_c, gr_vector_sink_f, gr_vector_sink_i, gr_vector_sink_s, gr_vector_source_b, gr_vector_source_c, gr_vector_source_f, gr_vector_source_i, gr_vector_source_s, gr_xor_bb, gr_xor_ii, gr_xor_ss, gr::analog::noise_source_c_impl, gr::analog::noise_source_f_impl, gr::analog::noise_source_i_impl, gr::analog::noise_source_s_impl, gr::analog::sig_source_c_impl, gr::analog::sig_source_f_impl, gr::analog::sig_source_i_impl, gr::analog::sig_source_s_impl, gr::blocks::add_cc_impl, gr::blocks::add_const_cc_impl, gr::blocks::add_const_ff_impl, gr::blocks::add_const_ii_impl, gr::blocks::add_const_ss_impl, gr::blocks::add_const_vcc_impl, gr::blocks::add_const_vff_impl, gr::blocks::add_const_vii_impl, gr::blocks::add_const_vss_impl, gr::blocks::add_ii_impl, gr::blocks::add_ss_impl, gr::blocks::and_bb_impl, gr::blocks::and_const_bb_impl, gr::blocks::and_const_ii_impl, gr::blocks::and_const_ss_impl, gr::blocks::and_ii_impl, gr::blocks::and_ss_impl, gr::blocks::argmax_fs_impl, gr::blocks::argmax_is_impl, gr::blocks::argmax_ss_impl, gr::blocks::divide_cc_impl, gr::blocks::divide_ff_impl, gr::blocks::divide_ii_impl, gr::blocks::divide_ss_impl, gr::blocks::integrate_cc_impl, gr::blocks::integrate_ff_impl, gr::blocks::integrate_ii_impl, gr::blocks::integrate_ss_impl, gr::blocks::max_ff_impl, gr::blocks::max_ii_impl, gr::blocks::max_ss_impl, gr::blocks::moving_average_cc_impl, gr::blocks::moving_average_ff_impl, gr::blocks::moving_average_ii_impl, gr::blocks::moving_average_ss_impl, gr::blocks::multiply_const_ii_impl, gr::blocks::multiply_const_ss_impl, gr::blocks::multiply_const_vcc_impl, gr::blocks::multiply_const_vff_impl, gr::blocks::multiply_const_vii_impl, gr::blocks::multiply_const_vss_impl, gr::blocks::multiply_ii_impl, gr::blocks::multiply_ss_impl, gr::blocks::mute_cc_impl, gr::blocks::mute_ff_impl, gr::blocks::mute_ii_impl, gr::blocks::mute_ss_impl, gr::blocks::not_bb_impl, gr::blocks::not_ii_impl, gr::blocks::not_ss_impl, gr::blocks::or_bb_impl, gr::blocks::or_ii_impl, gr::blocks::or_ss_impl, gr::blocks::peak_detector_fb_impl, gr::blocks::peak_detector_ib_impl, gr::blocks::peak_detector_sb_impl, gr::blocks::probe_signal_b_impl, gr::blocks::probe_signal_c_impl, gr::blocks::probe_signal_f_impl, gr::blocks::probe_signal_i_impl, gr::blocks::probe_signal_s_impl, gr::blocks::probe_signal_vb_impl, gr::blocks::probe_signal_vc_impl, gr::blocks::probe_signal_vf_impl, gr::blocks::probe_signal_vi_impl, gr::blocks::probe_signal_vs_impl, gr::blocks::sample_and_hold_bb_impl, gr::blocks::sample_and_hold_ff_impl, gr::blocks::sample_and_hold_ii_impl, gr::blocks::sample_and_hold_ss_impl, gr::blocks::sub_cc_impl, gr::blocks::sub_ff_impl, gr::blocks::sub_ii_impl, gr::blocks::sub_ss_impl, gr::blocks::vector_sink_b_impl, gr::blocks::vector_sink_c_impl, gr::blocks::vector_sink_f_impl, gr::blocks::vector_sink_i_impl, gr::blocks::vector_sink_s_impl, gr::blocks::vector_source_b_impl, gr::blocks::vector_source_c_impl, gr::blocks::vector_source_f_impl, gr::blocks::vector_source_i_impl, gr::blocks::vector_source_s_impl, gr::blocks::xor_bb_impl, gr::blocks::xor_ii_impl, gr::blocks::xor_ss_impl, digital_chunks_to_symbols_bc, digital_chunks_to_symbols_bf, digital_chunks_to_symbols_ic, digital_chunks_to_symbols_if, digital_chunks_to_symbols_sc, digital_chunks_to_symbols_sf, gr::filter::fir_filter_ccc_impl, gr::filter::fir_filter_ccf_impl, gr::filter::fir_filter_fcc_impl, gr::filter::fir_filter_fff_impl, gr::filter::fir_filter_fsf_impl, gr::filter::fir_filter_scc_impl, gr::filter::freq_xlating_fir_filter_ccc_impl, gr::filter::freq_xlating_fir_filter_ccf_impl, gr::filter::freq_xlating_fir_filter_fcc_impl, gr::filter::freq_xlating_fir_filter_fcf_impl, gr::filter::freq_xlating_fir_filter_scc_impl, gr::filter::freq_xlating_fir_filter_scf_impl, gr::filter::interp_fir_filter_ccc_impl, gr::filter::interp_fir_filter_ccf_impl, gr::filter::interp_fir_filter_fcc_impl, gr::filter::interp_fir_filter_fff_impl, gr::filter::interp_fir_filter_fsf_impl, gr::filter::interp_fir_filter_scc_impl, trellis_encoder_bb, trellis_encoder_bi, trellis_encoder_bs, trellis_encoder_ii, trellis_encoder_si, trellis_encoder_ss, trellis_pccc_encoder_bb, trellis_pccc_encoder_bi, trellis_pccc_encoder_bs, trellis_pccc_encoder_ii, trellis_pccc_encoder_si, trellis_pccc_encoder_ss, trellis_sccc_encoder_bb, trellis_sccc_encoder_bi, trellis_sccc_encoder_bs, trellis_sccc_encoder_ii, trellis_sccc_encoder_si, and trellis_sccc_encoder_ss.