GNU Radio 3.3.0 C++ API
|
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_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, gr_additive_scrambler_bb, gr_agc2_cc, gr_agc2_ff, gr_agc_cc, gr_agc_ff, gr_bin_statistics_f, gr_binary_slicer_fb, 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_constellation_decoder_cb, gr_correlate_access_code_bb, gr_costas_loop_cc, 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_fll_band_edge_cc, gr_float_to_char, gr_float_to_complex, 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_iqcomp_cc, gr_kludge_copy, gr_lfsr_32k_source_s, gr_lms_dfe_cc, gr_lms_dfe_ff, gr_map_bb, gr_message_sink, gr_message_source, gr_nlog10_ff, gr_null_sink, gr_null_source, gr_ofdm_frame_sink, gr_ofdm_mapper_bcv, 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_threshold_ff, gr_throttle, 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, msdd_rs_source_simple, msdd_source_simple, noaa_hrpt_decoder, noaa_hrpt_pll_cf, pager_flex_parse, pager_slicer_fb, trellis_permutation, usrp2_base, usrp_base, video_sdl_sink_s, and video_sdl_sink_uc.
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 (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 | ( | 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.
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_ccf, 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_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_bin_statistics_f, gr_binary_slicer_fb, 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_constellation_decoder_cb, gr_correlate_access_code_bb, gr_costas_loop_cc, 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_fll_band_edge_cc, gr_float_to_char, gr_float_to_complex, 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_interleave, gr_interleaved_short_to_complex, gr_iqcomp_cc, gr_kludge_copy, gr_lfsr_32k_source_s, gr_lms_dfe_cc, gr_lms_dfe_ff, gr_map_bb, gr_nlog10_ff, gr_null_sink, gr_null_source, gr_ofdm_cyclic_prefixer, gr_ofdm_frame_sink, gr_ofdm_mapper_bcv, 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_throttle, 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_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, cvsd_decode_bs, cvsd_encode_sb, gcell_fft_vcc, gsm_fr_decode_ps, gsm_fr_encode_sp, howto_square2_ff, msdd_rs_source_simple, msdd_source_simple, noaa_hrpt_decoder, noaa_hrpt_pll_cf, pager_flex_deinterleave, pager_slicer_fb, trellis_permutation, usrp_sink_base, usrp_source_base, usrp2_base, usrp2_sink_16sc, usrp2_sink_32fc, usrp2_source_16sc, usrp2_source_32fc, video_sdl_sink_s, and video_sdl_sink_uc.