GNU Radio 2.x: gr_sync_block Class Reference

Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

# gr_sync_block Class Reference
[Signal Processing Blocks]

`#include <gr_sync_block.h>`

Inheritance diagram for gr_sync_block:

[legend]
Collaboration diagram for gr_sync_block:

[legend]
List of all members.

## Detailed Description

synchronous 1:1 input to output with history

Override work to provide the signal processing implementation.

## 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)

## Constructor & Destructor Documentation

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.

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_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, and gr_sync_interpolator.

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_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
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_fft_filter_ccc, gr_fft_filter_fff, gr_filter_delay_fc, 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_hilbert_fc, gr_iir_filter_ffd, 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_single_pole_iir_filter_ff, gr_add_cc, gr_add_const_cc, gr_add_const_ff, gr_add_const_ii, gr_add_const_sf, gr_add_const_ss, gr_add_ff, gr_add_ii, gr_add_ss, gr_bytes_to_syms, gr_check_counting_s, gr_check_lfsr_32k_s, gr_complex_to_float, gr_complex_to_real, gr_complex_to_imag, gr_complex_to_mag, gr_complex_to_arg, gr_conjugate_cc, gr_deinterleave, gr_divide_cc, gr_divide_ff, gr_divide_ii, gr_divide_ss, gr_fake_channel_encoder_pp, gr_fake_channel_decoder_pp, gr_fft_vcc, gr_fft_vfc, gr_float_to_char, gr_float_to_complex, gr_float_to_short, gr_float_to_uchar, gr_frequency_modulator_fc, gr_head, gr_interleave, gr_interleaved_short_to_complex, gr_lfsr_32k_source_s, gr_lms_dfe_ff, gr_multiply_cc, gr_multiply_const_cc, gr_multiply_const_ff, gr_multiply_const_ii, gr_multiply_const_ss, gr_multiply_ff, gr_multiply_ii, gr_multiply_ss, gr_mute_cc, gr_mute_ff, gr_mute_ii, gr_mute_ss, gr_nlog10_ff, gr_noise_source_c, gr_noise_source_f, gr_noise_source_i, gr_noise_source_s, gr_null_sink, gr_null_source, gr_packet_sink, gr_parallel_to_serial, gr_probe_avg_mag_sqrd_c, gr_probe_avg_mag_sqrd_f, gr_probe_signal_f, gr_quadrature_demod_cf, gr_rms_cf, gr_rms_ff, gr_serial_to_parallel, gr_short_to_float, gr_sig_source_c, gr_sig_source_f, gr_sig_source_i, gr_sig_source_s, gr_simple_squelch_cc, gr_stream_to_streams, gr_streams_to_stream, gr_streams_to_vector, gr_sub_cc, gr_sub_ff, gr_sub_ii, gr_sub_ss, gr_threshold_ff, gr_throttle, gr_vco_f, 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_vector_to_streams, gr_file_descriptor_sink, gr_file_descriptor_source, gr_file_sink, gr_file_source, gr_message_sink, gr_message_source, and gr_oscope_sink_f.

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

- gr_sync_block.h
- gr_sync_block.cc