GNU Radio 3.7.1 C++ API
gr::block_gateway Class Reference

#include <block_gateway.h>

Inheritance diagram for gr::block_gateway:

List of all members.

Public Types

typedef boost::shared_ptr
< block_gateway
sptr

Public Member Functions

virtual block_gw_message_typeblock_message (void)=0
 Provide access to the shared message object.
long block__unique_id (void) const
std::string block__name (void) const
unsigned block__history (void) const
void block__set_history (unsigned history)
void block__set_fixed_rate (bool fixed_rate)
bool block__fixed_rate (void) const
void block__set_output_multiple (int multiple)
int block__output_multiple (void) const
void block__consume (int which_input, int how_many_items)
void block__consume_each (int how_many_items)
void block__produce (int which_output, int how_many_items)
void block__set_relative_rate (double relative_rate)
double block__relative_rate (void) const
uint64_t block__nitems_read (unsigned int which_input)
uint64_t block__nitems_written (unsigned int which_output)
block::tag_propagation_policy_t block__tag_propagation_policy (void)
void block__set_tag_propagation_policy (block::tag_propagation_policy_t p)
void block__add_item_tag (unsigned int which_output, const tag_t &tag)
void block__add_item_tag (unsigned int which_output, uint64_t abs_offset, const pmt::pmt_t &key, const pmt::pmt_t &value, const pmt::pmt_t &srcid=pmt::PMT_F)
std::vector< tag_tblock__get_tags_in_range (unsigned int which_input, uint64_t abs_start, uint64_t abs_end)
std::vector< tag_tblock__get_tags_in_range (unsigned int which_input, uint64_t abs_start, uint64_t abs_end, const pmt::pmt_t &key)
void block__message_port_register_in (pmt::pmt_t port_id)
void block__message_port_register_out (pmt::pmt_t port_id)
void block__message_port_pub (pmt::pmt_t port_id, pmt::pmt_t msg)
void block__message_port_sub (pmt::pmt_t port_id, pmt::pmt_t target)
void block__message_port_unsub (pmt::pmt_t port_id, pmt::pmt_t target)
pmt::pmt_t block__message_ports_in ()
pmt::pmt_t block__message_ports_out ()
void set_msg_handler_feval (pmt::pmt_t which_port, gr::feval_p *msg_handler)

Static Public Member Functions

static sptr make (gr::feval_ll *handler, const std::string &name, gr::io_signature::sptr in_sig, gr::io_signature::sptr out_sig, const block_gw_work_type work_type, const unsigned factor)

Protected Types

typedef std::map< pmt::pmt_t,
feval_p *, pmt::comperator
msg_handlers_feval_t

Protected Member Functions

bool has_msg_handler (pmt::pmt_t which_port)
 Tests if there is a handler attached to port which_port.
void dispatch_msg (pmt::pmt_t which_port, pmt::pmt_t msg)

Protected Attributes

msg_handlers_feval_t d_msg_handlers_feval

Detailed Description

The gateway block which performs all the magic.

The gateway provides access to all the gr::block routines. The methods prefixed with gr::block__ are renamed to class methods without the prefix in python.


Member Typedef Documentation


Member Function Documentation

void gr::block_gateway::block__add_item_tag ( unsigned int  which_output,
const tag_t tag 
) [inline]
void gr::block_gateway::block__add_item_tag ( unsigned int  which_output,
uint64_t  abs_offset,
const pmt::pmt_t key,
const pmt::pmt_t value,
const pmt::pmt_t srcid = pmt::PMT_F 
) [inline]
void gr::block_gateway::block__consume ( int  which_input,
int  how_many_items 
) [inline]

References gr::block::consume().

void gr::block_gateway::block__consume_each ( int  how_many_items) [inline]
std::vector<tag_t> gr::block_gateway::block__get_tags_in_range ( unsigned int  which_input,
uint64_t  abs_start,
uint64_t  abs_end 
) [inline]
std::vector<tag_t> gr::block_gateway::block__get_tags_in_range ( unsigned int  which_input,
uint64_t  abs_start,
uint64_t  abs_end,
const pmt::pmt_t key 
) [inline]
unsigned gr::block_gateway::block__history ( void  ) const [inline]

References gr::block::history().

std::string gr::block_gateway::block__name ( void  ) const [inline]
uint64_t gr::block_gateway::block__nitems_read ( unsigned int  which_input) [inline]
uint64_t gr::block_gateway::block__nitems_written ( unsigned int  which_output) [inline]
void gr::block_gateway::block__produce ( int  which_output,
int  how_many_items 
) [inline]

References gr::block::produce().

void gr::block_gateway::block__set_history ( unsigned  history) [inline]

Provide access to the shared message object.

void gr::block_gateway::dispatch_msg ( pmt::pmt_t  which_port,
pmt::pmt_t  msg 
) [inline, protected, virtual]

Reimplemented from gr::basic_block.

References gr::basic_block::dispatch_msg().

bool gr::block_gateway::has_msg_handler ( pmt::pmt_t  which_port) [inline, protected, virtual]

Tests if there is a handler attached to port which_port.

Reimplemented from gr::basic_block.

static sptr gr::block_gateway::make ( gr::feval_ll handler,
const std::string &  name,
gr::io_signature::sptr  in_sig,
gr::io_signature::sptr  out_sig,
const block_gw_work_type  work_type,
const unsigned  factor 
) [static]

Make a new gateway block.

Parameters:
handlerthe swig director object with callback
namethe name of the block (Ex: "Shirley")
in_sigthe input signature for this block
out_sigthe output signature for this block
work_typethe type of block overload to implement
factorthe decimation or interpolation factor
Returns:
a new gateway block
void gr::block_gateway::set_msg_handler_feval ( pmt::pmt_t  which_port,
gr::feval_p msg_handler 
) [inline]

Member Data Documentation


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