 |
GNU Radio Manual and C++ API Reference
3.8.1.0
The Free & Open Software Radio Ecosystem
|
|
Go to the documentation of this file.
23 #ifndef INCLUDED_RUNTIME_BLOCK_GATEWAY_H
24 #define INCLUDED_RUNTIME_BLOCK_GATEWAY_H
101 typedef boost::shared_ptr<block_gateway>
sptr;
114 const std::string& name,
118 const unsigned factor);
229 std::vector<gr::tag_t> tags;
239 std::vector<gr::tag_t> tags;
248 std::vector<gr::tag_t> tags;
258 std::vector<gr::tag_t> tags;
301 throw std::runtime_error(
302 "attempt to set_msg_handler_feval() on bad input message port!");
313 if (d_msg_handlers_feval.find(which_port) != d_msg_handlers_feval.end()) {
323 if (d_msg_handlers_feval.find(which_port) != d_msg_handlers_feval.end()) {
324 d_msg_handlers_feval[which_port]->calleval(msg);
void set_fixed_rate(bool fixed_rate)
Definition: block.h:771
abstract class of message handlers
Definition: msg_handler.h:38
virtual void dispatch_msg(pmt::pmt_t which_port, pmt::pmt_t msg)
Definition: basic_block.h:130
Definition: block_gateway.h:63
void set_relative_rate(double relative_rate)
Set the approximate output rate / input rate.
void message_port_pub(pmt::pmt_t port_id, pmt::pmt_t msg)
Definition: block_gateway.h:50
std::vector< tag_t > block__get_tags_in_range(unsigned int which_input, uint64_t abs_start, uint64_t abs_end, const pmt::pmt_t &key)
Definition: block_gateway.h:234
bool fixed_rate() const
Return true if this block has a fixed input to output rate.
Definition: block.h:147
block::tag_propagation_policy_t block__tag_propagation_policy(void)
Definition: block_gateway.h:201
std::string name() const
Definition: basic_block.h:148
Definition: block_gateway.h:45
block_gw_work_type
Definition: block_gateway.h:37
int block__output_multiple(void) const
Definition: block_gateway.h:153
virtual bool has_msg_handler(pmt::pmt_t which_port)
Tests if there is a handler attached to port which_port.
Definition: basic_block.h:119
Definition: block_gateway.h:62
pmt::pmt_t message_subscribers(pmt::pmt_t port)
void consume_each(int how_many_items)
Tell the scheduler how_many_items were consumed on each input stream.
uint64_t relative_rate_i() const
return the numerator, or interpolation rate, of the approximate output rate / input rate
Definition: block.h:320
tag_propagation_policy_t
Definition: block_gateway.h:46
void block__set_tag_propagation_policy(block::tag_propagation_policy_t p)
Definition: block_gateway.h:206
int output_multiple() const
Definition: block.h:219
std::vector< tag_t > block__get_tags_in_window(unsigned int which_input, uint64_t rel_start, uint64_t rel_end, const pmt::pmt_t &key)
Definition: block_gateway.h:253
void block__set_min_output_buffer(int port, long size)
Definition: block_gateway.h:143
uint64_t block__nitems_read(unsigned int which_input)
Definition: block_gateway.h:191
unsigned block__history(void) const
Definition: block_gateway.h:127
boost::shared_ptr< block_gateway > sptr
Definition: block_gateway.h:101
void set_history(unsigned history)
uint64_t block__nitems_written(unsigned int which_output)
Definition: block_gateway.h:196
double block__relative_rate(void) const
Definition: block_gateway.h:185
void block__produce(int which_output, int how_many_items)
Definition: block_gateway.h:165
void block__set_output_multiple(int multiple)
Definition: block_gateway.h:138
long block__unique_id(void) const
Definition: block_gateway.h:123
bool block__fixed_rate(void) const
Definition: block_gateway.h:136
std::vector< void * > work_args_input_items
Definition: block_gateway.h:77
void 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)
Adds a new tag onto the given output buffer.
Definition: block.h:783
std::vector< void * > general_work_args_output_items
Definition: block_gateway.h:72
Definition: block_gateway.h:48
void set_min_output_buffer(long min_output_buffer)
Request limit on the minimum buffer size on all output ports.
bool has_msg_handler(pmt::pmt_t which_port)
Tests if there is a handler attached to port which_port.
Definition: block_gateway.h:311
uint64_t block__relative_rate_d(void) const
Definition: block_gateway.h:189
boost::shared_ptr< pmt_base > pmt_t
typedef for shared pointer (transparent reference counting). See http://www.boost....
Definition: pmt.h:96
base class for evaluating a function: pmt -> void
Definition: feval.h:162
base class for evaluating a function: long -> long
Definition: feval.h:104
std::vector< void * > work_args_output_items
Definition: block_gateway.h:79
tag_propagation_policy_t tag_propagation_policy()
Asks for the policy used by the scheduler to moved tags downstream.
int forecast_args_noutput_items
Definition: block_gateway.h:82
void block__set_fixed_rate(bool fixed_rate)
Definition: block_gateway.h:131
uint64_t nitems_written(unsigned int which_output)
Return the number of items written on output stream which_output.
msg_handlers_feval_t d_msg_handlers_feval
Definition: block_gateway.h:309
pmt::pmt_t block__message_subscribers(pmt::pmt_t which_port)
Definition: block_gateway.h:289
std::vector< tag_t > block__get_tags_in_range(unsigned int which_input, uint64_t abs_start, uint64_t abs_end)
Definition: block_gateway.h:225
int work_args_noutput_items
Definition: block_gateway.h:76
Definition: block_gateway.h:47
Definition: block_gateway.h:59
void message_port_sub(pmt::pmt_t port_id, pmt::pmt_t target)
int general_work_args_return_value
Definition: block_gateway.h:73
void block__consume_each(int how_many_items)
Definition: block_gateway.h:160
std::string block__name(void) const
Definition: block_gateway.h:125
std::map< pmt::pmt_t, feval_p *, pmt::comparator > msg_handlers_feval_t
Definition: block_gateway.h:308
#define GR_RUNTIME_API
Definition: gnuradio-runtime/include/gnuradio/api.h:30
void block__set_min_output_buffer(long size)
Definition: block_gateway.h:148
void set_output_multiple(int multiple)
Constrain the noutput_items argument passed to forecast and general_work.
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)
Definition: block_gateway.h:216
boost::shared_ptr< io_signature > sptr
Definition: io_signature.h:46
void block__set_inverse_relative_rate(double inverse_relative_rate)
Definition: block_gateway.h:175
void message_port_unsub(pmt::pmt_t port_id, pmt::pmt_t target)
void set_tag_propagation_policy(tag_propagation_policy_t p)
Set the policy by the scheduler to determine how tags are moved downstream.
uint64_t nitems_read(unsigned int which_input)
Return the number of items read on input stream which_input.
std::vector< int > general_work_args_ninput_items
Definition: block_gateway.h:69
std::vector< void * > general_work_args_input_items
Definition: block_gateway.h:70
int work_args_ninput_items
Definition: block_gateway.h:75
Definition: block_gateway.h:39
bool start_args_return_value
Definition: block_gateway.h:85
void set_inverse_relative_rate(double inverse_relative_rate)
Set the approximate output rate / input rate using its reciprocal.
The abstract base class for all 'terminal' processing blocks.
Definition: block.h:71
void get_tags_in_window(std::vector< tag_t > &v, unsigned int which_input, uint64_t rel_start, uint64_t rel_end)
Gets all tags within the relative window of the current call to work.
void message_port_register_in(pmt::pmt_t port_id)
void block__message_port_unsub(pmt::pmt_t port_id, pmt::pmt_t target)
Definition: block_gateway.h:284
Definition: block_gateway.h:57
Definition: block_gateway.h:97
void block__set_relative_rate(uint64_t interpolation, uint64_t decimation)
Definition: block_gateway.h:180
action_type
Definition: block_gateway.h:58
int work_args_return_value
Definition: block_gateway.h:80
#define PMT_F
Definition: pmt.h:136
uint64_t block__relative_rate_i(void) const
Definition: block_gateway.h:187
void consume(int which_input, int how_many_items)
Tell the scheduler how_many_items of input stream which_input were consumed.
block_gw_work_return_type
Magic return values from general_work, gr::block::WORK_CALLED_PRODUCE.
Definition: block_gateway.h:45
void block__consume(int which_input, int how_many_items)
Definition: block_gateway.h:155
void get_tags_in_range(std::vector< tag_t > &v, unsigned int which_input, uint64_t abs_start, uint64_t abs_end)
Given a [start,end), returns a vector of all tags in the range.
Definition: block_gateway.h:45
Definition: block_gateway.h:41
pmt::pmt_t block__message_ports_out()
Definition: block_gateway.h:296
void message_port_register_out(pmt::pmt_t port_id)
action_type action
Definition: block_gateway.h:66
Definition: block_gateway.h:61
Definition: block_gateway.h:49
uint64_t relative_rate_d() const
return the denominator, or decimation rate, of the approximate output rate / input rate
Definition: block.h:329
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition: basic_block.h:43
tag_propagation_policy_t
enum to represent different tag propagation policies.
Definition: block.h:80
pmt::pmt_t block__message_ports_in()
Definition: block_gateway.h:294
Definition: block_gateway.h:40
void block__add_item_tag(unsigned int which_output, const tag_t &tag)
Definition: block_gateway.h:211
void block__message_port_sub(pmt::pmt_t port_id, pmt::pmt_t target)
Definition: block_gateway.h:279
void block__set_history(unsigned history)
Definition: block_gateway.h:129
double relative_rate() const
return the approximate output rate / input rate
Definition: block.h:314
void block__message_port_register_in(pmt::pmt_t port_id)
Definition: block_gateway.h:264
Definition: block_gateway.h:38
thread-safe message queue
Definition: msg_queue.h:36
Definition: block_gateway.h:60
std::vector< int > forecast_args_ninput_items_required
Definition: block_gateway.h:83
bool stop_args_return_value
Definition: block_gateway.h:87
std::vector< tag_t > block__get_tags_in_window(unsigned int which_input, uint64_t rel_start, uint64_t rel_end)
Definition: block_gateway.h:244
void set_msg_handler_feval(pmt::pmt_t which_port, gr::feval_p *msg_handler)
Definition: block_gateway.h:298
void block__message_port_register_out(pmt::pmt_t port_id)
Definition: block_gateway.h:269
void dispatch_msg(pmt::pmt_t which_port, pmt::pmt_t msg)
Definition: block_gateway.h:320
void block__set_relative_rate(double relative_rate)
Definition: block_gateway.h:170
int general_work_args_noutput_items
Definition: block_gateway.h:68
void block__message_port_pub(pmt::pmt_t port_id, pmt::pmt_t msg)
Definition: block_gateway.h:274
pmt::pmt_t message_ports_out()
Get output message port names.
void produce(int which_output, int how_many_items)
Tell the scheduler how_many_items were produced on output stream which_output.
pmt::pmt_t message_ports_in()
Get input message port names.
long unique_id() const
Definition: basic_block.h:144