23 #ifndef INCLUDED_RUNTIME_BLOCK_GATEWAY_H
24 #define INCLUDED_RUNTIME_BLOCK_GATEWAY_H
109 const std::string &
name,
113 const unsigned factor);
206 std::vector<gr::tag_t> tags;
216 std::vector<gr::tag_t> tags;
257 throw std::runtime_error(
"attempt to set_msg_handler_feval() on bad input message port!");
259 d_msg_handlers_feval[which_port] = msg_handler;
268 return (d_msg_handlers_feval.find(which_port) != d_msg_handlers_feval.end());
274 if(d_msg_handlers_feval.find(which_port) != d_msg_handlers_feval.end()) {
275 d_msg_handlers_feval[which_port]->calleval(msg);
int general_work_args_return_value
Definition: block_gateway.h:69
void produce(int which_output, int how_many_items)
Tell the scheduler how_many_items were produced on output stream which_output.
void dispatch_msg(pmt::pmt_t which_port, pmt::pmt_t msg)
Definition: block_gateway.h:271
bool stop_args_return_value
Definition: block_gateway.h:82
block::tag_propagation_policy_t block__tag_propagation_policy(void)
Definition: block_gateway.h:178
action_type action
Definition: block_gateway.h:63
Definition: block_gateway.h:60
Definition: block_gateway.h:41
pmt::pmt_t message_ports_out()
Get output message port names.
unsigned block__history(void) const
Definition: block_gateway.h:126
void block__set_tag_propagation_policy(block::tag_propagation_policy_t p)
Definition: block_gateway.h:182
void set_fixed_rate(bool fixed_rate)
Definition: block.h:593
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:605
Definition: block_gateway.h:59
bool block__fixed_rate(void) const
Definition: block_gateway.h:138
void set_relative_rate(double relative_rate)
Set the approximate output rate / input rate.
void set_history(unsigned history)
base class for evaluating a function: long -> longThis class is designed to be subclassed in Python or...
Definition: feval.h:104
tag_propagation_policy_t tag_propagation_policy()
Asks for the policy used by the scheduler to moved tags downstream.
long block__unique_id(void) const
Definition: block_gateway.h:118
block_gw_work_type
Definition: block_gateway.h:37
void message_port_pub(pmt::pmt_t port_id, pmt::pmt_t msg)
uint64_t block__nitems_read(unsigned int which_input)
Definition: block_gateway.h:170
Definition: block_gateway.h:38
std::vector< void * > work_args_input_items
Definition: block_gateway.h:73
std::vector< int > forecast_args_ninput_items_required
Definition: block_gateway.h:78
Definition: block_gateway.h:56
void block__set_output_multiple(int multiple)
Definition: block_gateway.h:142
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:202
bool has_msg_handler(pmt::pmt_t which_port)
Tests if there is a handler attached to port which_port.
Definition: block_gateway.h:266
std::string name() const
Definition: basic_block.h:147
int general_work_args_noutput_items
Definition: block_gateway.h:65
void message_port_unsub(pmt::pmt_t port_id, pmt::pmt_t target)
#define GR_RUNTIME_API
Definition: gnuradio-runtime/include/gnuradio/api.h:30
void set_tag_propagation_policy(tag_propagation_policy_t p)
Set the policy by the scheduler to determine how tags are moved downstream.
boost::shared_ptr< block_gateway > sptr
Definition: block_gateway.h:96
Definition: block_gateway.h:39
shared_ptr documentation stub
Definition: shared_ptr_docstub.h:15
uint64_t nitems_read(unsigned int which_input)
Return the number of items read on input stream which_input.
Definition: block_gateway.h:54
uint64_t block__nitems_written(unsigned int which_output)
Definition: block_gateway.h:174
void block__produce(int which_output, int how_many_items)
Definition: block_gateway.h:158
double block__relative_rate(void) const
Definition: block_gateway.h:166
msg_handlers_feval_t d_msg_handlers_feval
Definition: block_gateway.h:264
void message_port_register_in(pmt::pmt_t port_id)
long unique_id() const
Definition: basic_block.h:145
pmt::pmt_t block__message_subscribers(pmt::pmt_t which_port)
Definition: block_gateway.h:242
uint64_t nitems_written(unsigned int which_output)
Return the number of items written on output stream which_output.
Definition: block_gateway.h:46
thread-safe message queue
Definition: msg_queue.h:36
void block__consume_each(int how_many_items)
Definition: block_gateway.h:154
int work_args_return_value
Definition: block_gateway.h:75
void block__set_fixed_rate(bool fixed_rate)
Definition: block_gateway.h:134
void consume(int which_input, int how_many_items)
Tell the scheduler how_many_items of input stream which_input were consumed.
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:192
unsigned __int64 uint64_t
Definition: stdint.h:90
Definition: block_gateway.h:40
bool fixed_rate() const
Return true if this block has a fixed input to output rate.
Definition: block.h:130
void set_output_multiple(int multiple)
Constrain the noutput_items argument passed to forecast and general_work.
int forecast_args_noutput_items
Definition: block_gateway.h:77
int block__output_multiple(void) const
Definition: block_gateway.h:146
void block__consume(int which_input, int how_many_items)
Definition: block_gateway.h:150
std::map< pmt::pmt_t, feval_p *, pmt::comparator > msg_handlers_feval_t
Definition: block_gateway.h:263
void block__message_port_unsub(pmt::pmt_t port_id, pmt::pmt_t target)
Definition: block_gateway.h:238
std::vector< void * > general_work_args_output_items
Definition: block_gateway.h:68
Definition: block_gateway.h:58
tag_propagation_policy_t
Definition: block.h:70
void message_port_sub(pmt::pmt_t port_id, pmt::pmt_t target)
PMT_API const pmt_t PMT_F
std::vector< void * > general_work_args_input_items
Definition: block_gateway.h:67
Definition: block_gateway.h:57
int work_args_ninput_items
Definition: block_gateway.h:71
std::vector< int > general_work_args_ninput_items
Definition: block_gateway.h:66
Definition: block_gateway.h:45
pmt::pmt_t block__message_ports_out()
Definition: block_gateway.h:250
VOLK_API $kern pname $kern name
A function pointer to the dispatcher implementation.
pmt::pmt_t message_ports_in()
Get input message port names.
int work_args_noutput_items
Definition: block_gateway.h:72
base class for evaluating a function: pmt -> voidThis class is designed to be subclassed in Python or ...
Definition: feval.h:162
void set_msg_handler_feval(pmt::pmt_t which_port, gr::feval_p *msg_handler)
Definition: block_gateway.h:254
pmt::pmt_t block__message_ports_in()
Definition: block_gateway.h:246
Definition: block_gateway.h:47
void block__message_port_register_out(pmt::pmt_t port_id)
Definition: block_gateway.h:226
void block__add_item_tag(unsigned int which_output, const tag_t &tag)
Definition: block_gateway.h:186
action_type
Definition: block_gateway.h:55
double relative_rate() const
return the approximate output rate / input rate
Definition: block.h:257
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.
void block__set_history(unsigned history)
Definition: block_gateway.h:130
void block__message_port_pub(pmt::pmt_t port_id, pmt::pmt_t msg)
Definition: block_gateway.h:230
boost::intrusive_ptr< pmt_base > pmt_t
typedef for shared pointer (transparent reference counting). See http://www.boost.org/libs/smart_ptr/smart_ptr.htm
Definition: pmt.h:56
std::vector< void * > work_args_output_items
Definition: block_gateway.h:74
virtual void dispatch_msg(pmt::pmt_t which_port, pmt::pmt_t msg)
Definition: basic_block.h:131
The abstract base class for all 'terminal' processing blocks.A signal processing flow is constructed ...
Definition: block.h:60
tag_propagation_policy_t
Definition: block_gateway.h:44
bool start_args_return_value
Definition: block_gateway.h:80
std::string block__name(void) const
Definition: block_gateway.h:122
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:211
void block__message_port_sub(pmt::pmt_t port_id, pmt::pmt_t target)
Definition: block_gateway.h:234
void message_port_register_out(pmt::pmt_t port_id)
pmt::pmt_t message_subscribers(pmt::pmt_t port)
Definition: block_gateway.h:92
void consume_each(int how_many_items)
Tell the scheduler how_many_items were consumed on each input stream.
void block__set_relative_rate(double relative_rate)
Definition: block_gateway.h:162
void block__message_port_register_in(pmt::pmt_t port_id)
Definition: block_gateway.h:222
int output_multiple() const
Definition: block.h:194
abstract class of message handlers
Definition: msg_handler.h:38