GNU Radio 3.6.3.1 C++ API
gr::filter::channel_model Class Reference

channel simulatorThis block implements a basic channel model simulator that can be used to help evaluate, design, and test various signals, waveforms, and algorithms. This model allows the user to set the voltage of an AWGN noise source, a (normalized) frequency offset, a sample timing offset, and a noise seed to randomize the AWGN noise source. More...

#include <channel_model.h>

Inheritance diagram for gr::filter::channel_model:
gr_hier_block2 gr_basic_block gr_msg_accepter gruel::msg_accepter gr::filter::channel_model_impl

Public Types

typedef boost::shared_ptr
< channel_model
sptr
- Public Types inherited from gr_hier_block2
typedef gr_basic_block_sptr opaque_self
 typedef for object returned from self().

Public Member Functions

virtual void set_noise_voltage (double noise_voltage)=0
virtual void set_frequency_offset (double frequency_offset)=0
virtual void set_taps (const std::vector< gr_complex > &taps)=0
virtual void set_timing_offset (double epsilon)=0
virtual double noise_voltage () const =0
virtual double frequency_offset () const =0
virtual std::vector< gr_complextaps () const =0
virtual double timing_offset () const =0
- Public Member Functions inherited from gr_hier_block2
virtual ~gr_hier_block2 ()
opaque_self self ()
 Return an object, representing the current block, which can be passed to connect.
void connect (gr_basic_block_sptr block)
 Add a stand-alone (possibly hierarchical) block to internal graph.
void connect (gr_basic_block_sptr src, int src_port, gr_basic_block_sptr dst, int dst_port)
 Add gr-blocks or hierarchical blocks to internal graph and wire together.
void msg_connect (gr_basic_block_sptr src, pmt::pmt_t srcport, gr_basic_block_sptr dst, pmt::pmt_t dstport)
 Add gr-blocks or hierarchical blocks to internal graph and wire together.
void msg_connect (gr_basic_block_sptr src, std::string srcport, gr_basic_block_sptr dst, std::string dstport)
void msg_disconnect (gr_basic_block_sptr src, pmt::pmt_t srcport, gr_basic_block_sptr dst, pmt::pmt_t dstport)
void msg_disconnect (gr_basic_block_sptr src, std::string srcport, gr_basic_block_sptr dst, std::string dstport)
void disconnect (gr_basic_block_sptr block)
 Remove a gr-block or hierarchical block from the internal flowgraph.
void disconnect (gr_basic_block_sptr src, int src_port, gr_basic_block_sptr dst, int dst_port)
 Disconnect a pair of gr-blocks or hierarchical blocks in internal flowgraph.
void disconnect_all ()
 Disconnect all connections in the internal flowgraph.
virtual void lock ()
virtual void unlock ()
gr_flat_flowgraph_sptr flatten () const
gr_hier_block2_sptr to_hier_block2 ()
bool has_msg_port (pmt::pmt_t which_port)
bool message_port_is_hier (pmt::pmt_t port_id)
bool message_port_is_hier_in (pmt::pmt_t port_id)
bool message_port_is_hier_out (pmt::pmt_t port_id)
void message_port_register_hier_in (pmt::pmt_t port_id)
void message_port_register_hier_out (pmt::pmt_t port_id)
- Public Member Functions inherited from gr_basic_block
virtual ~gr_basic_block ()
long unique_id () const
long symbolic_id () const
std::string name () const
std::string symbol_name () const
gr_io_signature_sptr input_signature () const
gr_io_signature_sptr output_signature () const
gr_basic_block_sptr to_basic_block ()
bool alias_set ()
std::string alias ()
pmt::pmt_t alias_pmt ()
void set_block_alias (std::string name)
void message_port_register_in (pmt::pmt_t port_id)
void message_port_register_out (pmt::pmt_t port_id)
void message_port_pub (pmt::pmt_t port_id, pmt::pmt_t msg)
void message_port_sub (pmt::pmt_t port_id, pmt::pmt_t target)
void message_port_unsub (pmt::pmt_t port_id, pmt::pmt_t target)
pmt::pmt_t message_ports_in ()
 Get input message port names.
pmt::pmt_t message_ports_out ()
 Get output message port names.
void _post (pmt::pmt_t which_port, pmt::pmt_t msg)
bool empty_p (pmt::pmt_t which_port)
 is the queue empty?
bool empty_p ()
void insert_tail (pmt::pmt_t which_port, pmt::pmt_t msg)
pmt::pmt_t delete_head_nowait (pmt::pmt_t which_port)
pmt::pmt_t delete_head_blocking (pmt::pmt_t which_port)
msg_queue_t::iterator get_iterator (pmt::pmt_t which_port)
void erase_msg (pmt::pmt_t which_port, msg_queue_t::iterator it)
virtual bool check_topology (int ninputs, int noutputs)
 Confirm that ninputs and noutputs is an acceptable combination.
template<typename T >
void set_msg_handler (pmt::pmt_t which_port, T msg_handler)
 Set the callback that is fired when messages are available.
- Public Member Functions inherited from gr_msg_accepter
 gr_msg_accepter ()
 ~gr_msg_accepter ()
void post (pmt::pmt_t which_port, pmt::pmt_t msg)
 send msg to msg_accepter on port which_port
- Public Member Functions inherited from gruel::msg_accepter
 msg_accepter ()
virtual ~msg_accepter ()

Static Public Member Functions

static sptr make (double noise_voltage=0.0, double frequency_offset=0.0, double epsilon=1.0, const std::vector< gr_complex > &taps=std::vector< gr_complex >(1, 1), double noise_seed=0)
 Build the channel simulator.

Additional Inherited Members

- Public Attributes inherited from gr_hier_block2
pmt::pmt_t hier_message_ports_in
pmt::pmt_t hier_message_ports_out
- Protected Types inherited from gr_basic_block
enum  vcolor { WHITE, GREY, BLACK }
- Protected Member Functions inherited from gr_hier_block2
 gr_hier_block2 (void)
 gr_hier_block2 (const std::string &name, gr_io_signature_sptr input_signature, gr_io_signature_sptr output_signature)
- Protected Attributes inherited from gr_basic_block
std::string d_name
gr_io_signature_sptr d_input_signature
gr_io_signature_sptr d_output_signature
long d_unique_id
long d_symbolic_id
std::string d_symbol_name
std::string d_symbol_alias
vcolor d_color
msg_queue_map_t msg_queue
pmt::pmt_t message_subscribers

Detailed Description

channel simulator

This block implements a basic channel model simulator that can be used to help evaluate, design, and test various signals, waveforms, and algorithms. This model allows the user to set the voltage of an AWGN noise source, a (normalized) frequency offset, a sample timing offset, and a noise seed to randomize the AWGN noise source.

Multipath can be approximated in this model by using a FIR filter representation of a multipath delay profile..

Member Typedef Documentation

Member Function Documentation

virtual double gr::filter::channel_model::frequency_offset ( ) const
pure virtual
static sptr gr::filter::channel_model::make ( double  noise_voltage = 0.0,
double  frequency_offset = 0.0,
double  epsilon = 1.0,
const std::vector< gr_complex > &  taps = std::vector< gr_complex >(1, 1),
double  noise_seed = 0 
)
static

Build the channel simulator.

Parameters
noise_voltageThe AWGN noise level as a voltage (to be calculated externally to meet, say, a desired SNR).
frequency_offsetThe normalized frequency offset. 0 is no offset; 0.25 would be, for a digital modem, one quarter of the symbol rate.
epsilonThe sample timing offset to emulate the different rates between the sample clocks of the transmitter and receiver. 1.0 is no difference.
tapsTaps of a FIR filter to emulate a multipath delay profile.
noise_seedA random number generator seed for the noise source.
virtual double gr::filter::channel_model::noise_voltage ( ) const
pure virtual
virtual void gr::filter::channel_model::set_frequency_offset ( double  frequency_offset)
pure virtual
virtual void gr::filter::channel_model::set_noise_voltage ( double  noise_voltage)
pure virtual
virtual void gr::filter::channel_model::set_taps ( const std::vector< gr_complex > &  taps)
pure virtual
virtual void gr::filter::channel_model::set_timing_offset ( double  epsilon)
pure virtual
virtual std::vector<gr_complex> gr::filter::channel_model::taps ( ) const
pure virtual
virtual double gr::filter::channel_model::timing_offset ( ) const
pure virtual

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