#include <gr_basic_block.h>
Basic blocks are the bare abstraction of an entity that has a name and a set of inputs and outputs. These are never instantiated directly; rather, this is the abstract parent class of both gr_hier_block, which is a recursive container, and gr_block, which implements actual signal processing functions.
Public Member Functions | |
virtual | ~gr_basic_block () |
long | unique_id () const |
std::string | name () const |
gr_io_signature_sptr | input_signature () const |
gr_io_signature_sptr | output_signature () const |
gr_basic_block_sptr | basic_block () |
virtual bool | check_topology (int ninputs, int noutputs) |
Confirm that ninputs and noutputs is an acceptable combination. | |
Protected Types | |
enum | vcolor { WHITE, GREY, BLACK } |
Protected Member Functions | |
gr_basic_block (const std::string &name, gr_io_signature_sptr input_signature, gr_io_signature_sptr output_signature) | |
Protected constructor prevents instantiation by non-derived classes. | |
void | set_input_signature (gr_io_signature_sptr iosig) |
may only be called during constructor | |
void | set_output_signature (gr_io_signature_sptr iosig) |
may only be called during constructor | |
void | set_color (vcolor color) |
Allow the flowgraph to set for sorting and partitioning. | |
vcolor | color () const |
Protected Attributes | |
std::string | d_name |
gr_io_signature_sptr | d_input_signature |
gr_io_signature_sptr | d_output_signature |
long | d_unique_id |
vcolor | d_color |
Friends | |
class | gr_flowgraph |
class | gr_flat_flowgraph |
enum gr_basic_block::vcolor [protected] |
gr_basic_block::gr_basic_block | ( | const std::string & | name, | |
gr_io_signature_sptr | input_signature, | |||
gr_io_signature_sptr | output_signature | |||
) | [protected] |
Protected constructor prevents instantiation by non-derived classes.
gr_basic_block::~gr_basic_block | ( | ) | [virtual] |
void gr_basic_block::set_input_signature | ( | gr_io_signature_sptr | iosig | ) | [inline, protected] |
may only be called during constructor
References d_input_signature.
Referenced by audio_alsa_sink::audio_alsa_sink(), audio_jack_sink::audio_jack_sink(), audio_osx_sink::audio_osx_sink(), and audio_portaudio_sink::audio_portaudio_sink().
void gr_basic_block::set_output_signature | ( | gr_io_signature_sptr | iosig | ) | [inline, protected] |
may only be called during constructor
References d_output_signature.
Referenced by audio_alsa_source::audio_alsa_source(), audio_jack_source::audio_jack_source(), audio_osx_source::audio_osx_source(), audio_portaudio_source::audio_portaudio_source(), comedi_sink_s::comedi_sink_s(), and comedi_source_s::comedi_source_s().
void gr_basic_block::set_color | ( | vcolor | color | ) | [inline, protected] |
long gr_basic_block::unique_id | ( | ) | const [inline] |
std::string gr_basic_block::name | ( | ) | const [inline] |
gr_io_signature_sptr gr_basic_block::input_signature | ( | ) | const [inline] |
References d_input_signature.
Referenced by gr_keep_one_in_n::general_work(), gr_streams_to_vector::work(), gr_head::work(), and gr_fft_vcc::work().
gr_io_signature_sptr gr_basic_block::output_signature | ( | ) | const [inline] |
References d_output_signature.
Referenced by gr_skiphead::general_work(), gr_align_on_samplenumbers_ss::general_work(), gr_vector_to_streams::work(), gr_vector_to_stream::work(), gr_streams_to_stream::work(), gr_stream_to_vector::work(), gr_stream_to_streams::work(), gr_null_source::work(), gr_multiply_vss::work(), gr_multiply_vii::work(), gr_multiply_vff::work(), gr_multiply_vcc::work(), gr_multiply_const_vss::work(), gr_multiply_const_vii::work(), gr_multiply_const_vff::work(), gr_multiply_const_vcc::work(), gr_fft_vfc::work(), gr_fft_vcc::work(), gr_add_vss::work(), gr_add_vii::work(), gr_add_vff::work(), gr_add_vcc::work(), gr_add_const_vss::work(), gr_add_const_vii::work(), gr_add_const_vff::work(), and gr_add_const_vcc::work().
gr_basic_block_sptr gr_basic_block::basic_block | ( | ) |
virtual bool gr_basic_block::check_topology | ( | int | ninputs, | |
int | noutputs | |||
) | [inline, virtual] |
Confirm that ninputs and noutputs is an acceptable combination.
ninputs | number of input streams connected | |
noutputs | number of output streams connected |
Reimplemented in gr_align_on_samplenumbers_ss, gr_deinterleave, gr_interleave, gr_kludge_copy, gr_test, 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_packed_to_unpacked_bb, gr_packed_to_unpacked_ii, gr_packed_to_unpacked_ss, gr_unpacked_to_packed_bb, gr_unpacked_to_packed_ii, gr_unpacked_to_packed_ss, gr_oscope_sink_f, audio_alsa_sink, audio_alsa_source, audio_jack_sink, audio_jack_source, audio_osx_source, audio_portaudio_sink, audio_portaudio_source, comedi_sink_s, and comedi_source_s.
friend class gr_flowgraph [friend] |
friend class gr_flat_flowgraph [friend] |
std::string gr_basic_block::d_name [protected] |
Referenced by name().
Referenced by input_signature(), and set_input_signature().
Referenced by output_signature(), and set_output_signature().
long gr_basic_block::d_unique_id [protected] |
Referenced by unique_id().
vcolor gr_basic_block::d_color [protected] |
Referenced by color(), and set_color().