GNU Radio Manual and C++ API Reference  3.8.2.0
The Free & Open Software Radio Ecosystem
block_gateway.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2011-2013,2017 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * GNU Radio is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3, or (at your option)
10  * any later version.
11  *
12  * GNU Radio is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with GNU Radio; see the file COPYING. If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 #ifndef INCLUDED_RUNTIME_BLOCK_GATEWAY_H
24 #define INCLUDED_RUNTIME_BLOCK_GATEWAY_H
25 
26 #include <gnuradio/api.h>
27 #include <gnuradio/block.h>
28 #include <gnuradio/feval.h>
29 
30 namespace gr {
31 
32 /*!
33  * The work type enum tells the gateway what kind of block to
34  * implement. The choices are familiar gnuradio block overloads
35  * (sync, decim, interp).
36  */
42 };
43 
44 //! Magic return values from general_work, \ref gr::block::WORK_CALLED_PRODUCE
47  TPP_DONT = 0,
50  TPP_CUSTOM = 3
51 };
52 
53 /*!
54  * Shared message structure between python and gateway.
55  * Each action type represents a scheduler-called function.
56  */
58  enum action_type {
59  ACTION_GENERAL_WORK, // dispatch work
60  ACTION_WORK, // dispatch work
61  ACTION_FORECAST, // dispatch forecast
62  ACTION_START, // dispatch start
63  ACTION_STOP, // dispatch stop
64  };
65 
67 
70  std::vector<void*> general_work_args_input_items; // TODO this should be const void*,
71  // but swig can't int cast it right
72  std::vector<void*> general_work_args_output_items;
74 
77  std::vector<void*> work_args_input_items; // TODO this should be const void*, but swig
78  // can't int cast it right
79  std::vector<void*> work_args_output_items;
81 
84 
86 
88 };
89 
90 /*!
91  * The gateway block which performs all the magic.
92  *
93  * The gateway provides access to all the gr::block routines.
94  * The methods prefixed with gr::block__ are renamed
95  * to class methods without the prefix in python.
96  */
97 class GR_RUNTIME_API block_gateway : virtual public gr::block
98 {
99 public:
100  // gr::block_gateway::sptr
101  typedef boost::shared_ptr<block_gateway> sptr;
102 
103  /*!
104  * Make a new gateway block.
105  * \param handler the swig director object with callback
106  * \param name the name of the block (Ex: "Shirley")
107  * \param in_sig the input signature for this block
108  * \param out_sig the output signature for this block
109  * \param work_type the type of block overload to implement
110  * \param factor the decimation or interpolation factor
111  * \return a new gateway block
112  */
113  static sptr make(gr::feval_ll* handler,
114  const std::string& name,
115  gr::io_signature::sptr in_sig,
116  gr::io_signature::sptr out_sig,
117  const block_gw_work_type work_type,
118  const unsigned factor);
119 
120  //! Provide access to the shared message object
122 
123  long block__unique_id(void) const { return gr::block::unique_id(); }
124 
125  std::string block__name(void) const { return gr::block::name(); }
126 
127  unsigned block__history(void) const { return gr::block::history(); }
128 
129  void block__set_history(unsigned history) { return gr::block::set_history(history); }
130 
131  void block__set_block_alias(std::string alias)
132  {
133  return gr::block::set_block_alias(alias);
134  }
135 
136  std::string block__alias(void) const { return gr::block::alias(); }
137 
138  void block__set_processor_affinity(std::vector<int> mask)
139  {
141  }
142 
143  void block__set_fixed_rate(bool fixed_rate)
144  {
145  return gr::block::set_fixed_rate(fixed_rate);
146  }
147 
148  bool block__fixed_rate(void) const { return gr::block::fixed_rate(); }
149 
150  void block__set_output_multiple(int multiple)
151  {
152  return gr::block::set_output_multiple(multiple);
153  }
154 
155  void block__set_min_output_buffer(int port, long size)
156  {
157  return gr::block::set_min_output_buffer(port, size);
158  }
159 
161  {
163  }
164 
166 
167  void block__consume(int which_input, int how_many_items)
168  {
169  return gr::block::consume(which_input, how_many_items);
170  }
171 
172  void block__consume_each(int how_many_items)
173  {
174  return gr::block::consume_each(how_many_items);
175  }
176 
177  void block__produce(int which_output, int how_many_items)
178  {
179  return gr::block::produce(which_output, how_many_items);
180  }
181 
182  void block__set_relative_rate(double relative_rate)
183  {
184  return gr::block::set_relative_rate(relative_rate);
185  }
186 
187  void block__set_inverse_relative_rate(double inverse_relative_rate)
188  {
189  return gr::block::set_inverse_relative_rate(inverse_relative_rate);
190  }
191 
192  void block__set_relative_rate(uint64_t interpolation, uint64_t decimation)
193  {
194  return gr::block::set_relative_rate(interpolation, decimation);
195  }
196 
197  double block__relative_rate(void) const { return gr::block::relative_rate(); }
198 
199  uint64_t block__relative_rate_i(void) const { return gr::block::relative_rate_i(); }
200 
201  uint64_t block__relative_rate_d(void) const { return gr::block::relative_rate_d(); }
202 
203  uint64_t block__nitems_read(unsigned int which_input)
204  {
205  return gr::block::nitems_read(which_input);
206  }
207 
208  uint64_t block__nitems_written(unsigned int which_output)
209  {
210  return gr::block::nitems_written(which_output);
211  }
212 
214  {
216  }
217 
219  {
221  }
222 
223  void block__add_item_tag(unsigned int which_output, const tag_t& tag)
224  {
225  return gr::block::add_item_tag(which_output, tag);
226  }
227 
228  void block__add_item_tag(unsigned int which_output,
229  uint64_t abs_offset,
230  const pmt::pmt_t& key,
231  const pmt::pmt_t& value,
232  const pmt::pmt_t& srcid = pmt::PMT_F)
233  {
234  return gr::block::add_item_tag(which_output, abs_offset, key, value, srcid);
235  }
236 
237  std::vector<tag_t> block__get_tags_in_range(unsigned int which_input,
238  uint64_t abs_start,
239  uint64_t abs_end)
240  {
241  std::vector<gr::tag_t> tags;
242  gr::block::get_tags_in_range(tags, which_input, abs_start, abs_end);
243  return tags;
244  }
245 
246  std::vector<tag_t> block__get_tags_in_range(unsigned int which_input,
247  uint64_t abs_start,
248  uint64_t abs_end,
249  const pmt::pmt_t& key)
250  {
251  std::vector<gr::tag_t> tags;
252  gr::block::get_tags_in_range(tags, which_input, abs_start, abs_end, key);
253  return tags;
254  }
255 
256  std::vector<tag_t> block__get_tags_in_window(unsigned int which_input,
257  uint64_t rel_start,
258  uint64_t rel_end)
259  {
260  std::vector<gr::tag_t> tags;
261  gr::block::get_tags_in_window(tags, which_input, rel_start, rel_end);
262  return tags;
263  }
264 
265  std::vector<tag_t> block__get_tags_in_window(unsigned int which_input,
266  uint64_t rel_start,
267  uint64_t rel_end,
268  const pmt::pmt_t& key)
269  {
270  std::vector<gr::tag_t> tags;
271  gr::block::get_tags_in_window(tags, which_input, rel_start, rel_end, key);
272  return tags;
273  }
274 
275  /* Message passing interface */
277  {
279  }
280 
282  {
284  }
285 
287  {
288  gr::basic_block::message_port_pub(port_id, msg);
289  }
290 
292  {
293  gr::basic_block::message_port_sub(port_id, target);
294  }
295 
297  {
298  gr::basic_block::message_port_unsub(port_id, target);
299  }
300 
302  {
303  return gr::basic_block::message_subscribers(which_port);
304  }
305 
307 
309 
311  {
312  if (msg_queue.find(which_port) == msg_queue.end()) {
313  throw std::runtime_error(
314  "attempt to set_msg_handler_feval() on bad input message port!");
315  }
316  d_msg_handlers_feval[which_port] = msg_handler;
317  }
318 
319 protected:
320  typedef std::map<pmt::pmt_t, feval_p*, pmt::comparator> msg_handlers_feval_t;
322 
323  bool has_msg_handler(pmt::pmt_t which_port)
324  {
325  if (d_msg_handlers_feval.find(which_port) != d_msg_handlers_feval.end()) {
326  return true;
327  } else {
328  return gr::basic_block::has_msg_handler(which_port);
329  }
330  }
331 
332  void dispatch_msg(pmt::pmt_t which_port, pmt::pmt_t msg)
333  {
334  // Is there a handler?
335  if (d_msg_handlers_feval.find(which_port) != d_msg_handlers_feval.end()) {
336  d_msg_handlers_feval[which_port]->calleval(msg); // Yes, invoke it.
337  } else {
338  // Pass to generic dispatcher if not found
339  gr::basic_block::dispatch_msg(which_port, msg);
340  }
341  }
342 };
343 
344 } /* namespace gr */
345 
346 #endif /* INCLUDED_RUNTIME_BLOCK_GATEWAY_H */
gr::block::set_fixed_rate
void set_fixed_rate(bool fixed_rate)
Definition: block.h:771
block.h
gr::msg_handler
abstract class of message handlers
Definition: msg_handler.h:39
gr::basic_block::dispatch_msg
virtual void dispatch_msg(pmt::pmt_t which_port, pmt::pmt_t msg)
Definition: basic_block.h:130
gr::block_gw_message_type::ACTION_STOP
@ ACTION_STOP
Definition: block_gateway.h:63
gr::block::set_relative_rate
void set_relative_rate(double relative_rate)
Set the approximate output rate / input rate.
gr::basic_block::message_port_pub
void message_port_pub(pmt::pmt_t port_id, pmt::pmt_t msg)
gr::TPP_CUSTOM
@ TPP_CUSTOM
Definition: block_gateway.h:50
gr::block_gateway::block__get_tags_in_range
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:246
gr::block::set_processor_affinity
void set_processor_affinity(const std::vector< int > &mask)
Set the thread's affinity to processor core n.
gr::block::fixed_rate
bool fixed_rate() const
Return true if this block has a fixed input to output rate.
Definition: block.h:147
gr::block_gateway::make
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)
gr::block_gateway::block__tag_propagation_policy
block::tag_propagation_policy_t block__tag_propagation_policy(void)
Definition: block_gateway.h:213
gr::basic_block::name
std::string name() const
Definition: basic_block.h:148
gr::WORK_CALLED_PRODUCE
@ WORK_CALLED_PRODUCE
Definition: block_gateway.h:45
gr::block_gw_work_type
block_gw_work_type
Definition: block_gateway.h:37
gr::block_gateway::block__output_multiple
int block__output_multiple(void) const
Definition: block_gateway.h:165
gr::basic_block::has_msg_handler
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
gr::block_gw_message_type::ACTION_START
@ ACTION_START
Definition: block_gateway.h:62
gr::basic_block::message_subscribers
pmt::pmt_t message_subscribers(pmt::pmt_t port)
gr::basic_block::alias
std::string alias() const
Definition: basic_block.h:173
gr::block::consume_each
void consume_each(int how_many_items)
Tell the scheduler how_many_items were consumed on each input stream.
gr::basic_block::set_block_alias
void set_block_alias(std::string name)
gr::block::relative_rate_i
uint64_t relative_rate_i() const
return the numerator, or interpolation rate, of the approximate output rate / input rate
Definition: block.h:320
gr::tag_propagation_policy_t
tag_propagation_policy_t
Definition: block_gateway.h:46
gr::block_gateway::block__set_tag_propagation_policy
void block__set_tag_propagation_policy(block::tag_propagation_policy_t p)
Definition: block_gateway.h:218
gr::block::output_multiple
int output_multiple() const
Definition: block.h:219
gr::block_gateway::block__get_tags_in_window
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:265
gr::block_gateway::block__set_min_output_buffer
void block__set_min_output_buffer(int port, long size)
Definition: block_gateway.h:155
gr::block_gateway::block__nitems_read
uint64_t block__nitems_read(unsigned int which_input)
Definition: block_gateway.h:203
gr::block_gateway::block__history
unsigned block__history(void) const
Definition: block_gateway.h:127
gr::block_gateway::sptr
boost::shared_ptr< block_gateway > sptr
Definition: block_gateway.h:101
gr::block::set_history
void set_history(unsigned history)
gr::block_gateway::block__nitems_written
uint64_t block__nitems_written(unsigned int which_output)
Definition: block_gateway.h:208
gr::block_gateway::block__relative_rate
double block__relative_rate(void) const
Definition: block_gateway.h:197
gr::block_gateway::block__produce
void block__produce(int which_output, int how_many_items)
Definition: block_gateway.h:177
gr::block_gateway::block__set_output_multiple
void block__set_output_multiple(int multiple)
Definition: block_gateway.h:150
gr::block_gateway::block__unique_id
long block__unique_id(void) const
Definition: block_gateway.h:123
gr::block_gateway::block__fixed_rate
bool block__fixed_rate(void) const
Definition: block_gateway.h:148
gr::block_gw_message_type::work_args_input_items
std::vector< void * > work_args_input_items
Definition: block_gateway.h:77
gr::block::add_item_tag
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
gr::block_gw_message_type::general_work_args_output_items
std::vector< void * > general_work_args_output_items
Definition: block_gateway.h:72
gr::TPP_ALL_TO_ALL
@ TPP_ALL_TO_ALL
Definition: block_gateway.h:48
gr::block::set_min_output_buffer
void set_min_output_buffer(long min_output_buffer)
Request limit on the minimum buffer size on all output ports.
gr::block_gateway::has_msg_handler
bool has_msg_handler(pmt::pmt_t which_port)
Tests if there is a handler attached to port which_port.
Definition: block_gateway.h:323
gr::block_gateway::block__relative_rate_d
uint64_t block__relative_rate_d(void) const
Definition: block_gateway.h:201
pmt::pmt_t
boost::shared_ptr< pmt_base > pmt_t
typedef for shared pointer (transparent reference counting). See http://www.boost....
Definition: pmt.h:96
gr::feval_p
base class for evaluating a function: pmt -> void
Definition: feval.h:163
gr::feval_ll
base class for evaluating a function: long -> long
Definition: feval.h:105
gr::block::history
unsigned history() const
gr::block_gw_message_type::work_args_output_items
std::vector< void * > work_args_output_items
Definition: block_gateway.h:79
gr::block::tag_propagation_policy
tag_propagation_policy_t tag_propagation_policy()
Asks for the policy used by the scheduler to moved tags downstream.
gr::block_gw_message_type::forecast_args_noutput_items
int forecast_args_noutput_items
Definition: block_gateway.h:82
gr::block_gateway::block__set_fixed_rate
void block__set_fixed_rate(bool fixed_rate)
Definition: block_gateway.h:143
gr::block::nitems_written
uint64_t nitems_written(unsigned int which_output)
Return the number of items written on output stream which_output.
gr::block_gateway::d_msg_handlers_feval
msg_handlers_feval_t d_msg_handlers_feval
Definition: block_gateway.h:321
gr::block_gateway::block__message_subscribers
pmt::pmt_t block__message_subscribers(pmt::pmt_t which_port)
Definition: block_gateway.h:301
gr::block_gateway::block__get_tags_in_range
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:237
gr::block_gw_message_type::work_args_noutput_items
int work_args_noutput_items
Definition: block_gateway.h:76
gr::TPP_DONT
@ TPP_DONT
Definition: block_gateway.h:47
gr::block_gw_message_type::ACTION_GENERAL_WORK
@ ACTION_GENERAL_WORK
Definition: block_gateway.h:59
gr::basic_block::message_port_sub
void message_port_sub(pmt::pmt_t port_id, pmt::pmt_t target)
gr::block_gw_message_type::general_work_args_return_value
int general_work_args_return_value
Definition: block_gateway.h:73
gr::block_gateway::block__consume_each
void block__consume_each(int how_many_items)
Definition: block_gateway.h:172
gr::block_gateway::block_message
virtual block_gw_message_type & block_message(void)=0
Provide access to the shared message object.
gr::block_gateway::block__name
std::string block__name(void) const
Definition: block_gateway.h:125
gr::block_gateway::msg_handlers_feval_t
std::map< pmt::pmt_t, feval_p *, pmt::comparator > msg_handlers_feval_t
Definition: block_gateway.h:320
GR_RUNTIME_API
#define GR_RUNTIME_API
Definition: gnuradio-runtime/include/gnuradio/api.h:30
gr::block_gateway::block__set_min_output_buffer
void block__set_min_output_buffer(long size)
Definition: block_gateway.h:160
gr::block::set_output_multiple
void set_output_multiple(int multiple)
Constrain the noutput_items argument passed to forecast and general_work.
gr::block_gateway::block__add_item_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)
Definition: block_gateway.h:228
gr::io_signature::sptr
boost::shared_ptr< io_signature > sptr
Definition: io_signature.h:46
gr::block_gateway::block__set_inverse_relative_rate
void block__set_inverse_relative_rate(double inverse_relative_rate)
Definition: block_gateway.h:187
gr::basic_block::message_port_unsub
void message_port_unsub(pmt::pmt_t port_id, pmt::pmt_t target)
gr::block::set_tag_propagation_policy
void set_tag_propagation_policy(tag_propagation_policy_t p)
Set the policy by the scheduler to determine how tags are moved downstream.
gr::block::nitems_read
uint64_t nitems_read(unsigned int which_input)
Return the number of items read on input stream which_input.
gr::block_gw_message_type::general_work_args_ninput_items
std::vector< int > general_work_args_ninput_items
Definition: block_gateway.h:69
gr::block_gw_message_type::general_work_args_input_items
std::vector< void * > general_work_args_input_items
Definition: block_gateway.h:70
gr::block_gw_message_type::work_args_ninput_items
int work_args_ninput_items
Definition: block_gateway.h:75
gr::GR_BLOCK_GW_WORK_SYNC
@ GR_BLOCK_GW_WORK_SYNC
Definition: block_gateway.h:39
feval.h
gr::block_gw_message_type::start_args_return_value
bool start_args_return_value
Definition: block_gateway.h:85
gr::block::set_inverse_relative_rate
void set_inverse_relative_rate(double inverse_relative_rate)
Set the approximate output rate / input rate using its reciprocal.
gr::block
The abstract base class for all 'terminal' processing blocks.
Definition: block.h:72
gr::block::get_tags_in_window
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.
gr::basic_block::message_port_register_in
void message_port_register_in(pmt::pmt_t port_id)
gr::block_gateway::block__message_port_unsub
void block__message_port_unsub(pmt::pmt_t port_id, pmt::pmt_t target)
Definition: block_gateway.h:296
gr::block_gw_message_type
Definition: block_gateway.h:57
gr::block_gateway
Definition: block_gateway.h:98
gr::block_gateway::block__set_relative_rate
void block__set_relative_rate(uint64_t interpolation, uint64_t decimation)
Definition: block_gateway.h:192
gr::block_gw_message_type::action_type
action_type
Definition: block_gateway.h:58
gr::block_gw_message_type::work_args_return_value
int work_args_return_value
Definition: block_gateway.h:80
PMT_F
#define PMT_F
Definition: pmt.h:136
gr::block_gateway::block__relative_rate_i
uint64_t block__relative_rate_i(void) const
Definition: block_gateway.h:199
gr::block::consume
void consume(int which_input, int how_many_items)
Tell the scheduler how_many_items of input stream which_input were consumed.
gr::block_gw_work_return_type
block_gw_work_return_type
Magic return values from general_work, gr::block::WORK_CALLED_PRODUCE.
Definition: block_gateway.h:45
gr::tag_t
Definition: tags.h:31
gr::block_gateway::block__consume
void block__consume(int which_input, int how_many_items)
Definition: block_gateway.h:167
gr::block::get_tags_in_range
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.
gr::WORK_DONE
@ WORK_DONE
Definition: block_gateway.h:45
gr::GR_BLOCK_GW_WORK_INTERP
@ GR_BLOCK_GW_WORK_INTERP
Definition: block_gateway.h:41
gr::block_gateway::block__message_ports_out
pmt::pmt_t block__message_ports_out()
Definition: block_gateway.h:308
gr::basic_block::message_port_register_out
void message_port_register_out(pmt::pmt_t port_id)
gr::block_gw_message_type::action
action_type action
Definition: block_gateway.h:66
api.h
gr::block_gw_message_type::ACTION_FORECAST
@ ACTION_FORECAST
Definition: block_gateway.h:61
gr::TPP_ONE_TO_ONE
@ TPP_ONE_TO_ONE
Definition: block_gateway.h:49
gr::block::relative_rate_d
uint64_t relative_rate_d() const
return the denominator, or decimation rate, of the approximate output rate / input rate
Definition: block.h:329
gr
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition: basic_block.h:43
gr::block::tag_propagation_policy_t
tag_propagation_policy_t
enum to represent different tag propagation policies.
Definition: block.h:80
gr::block_gateway::block__message_ports_in
pmt::pmt_t block__message_ports_in()
Definition: block_gateway.h:306
gr::GR_BLOCK_GW_WORK_DECIM
@ GR_BLOCK_GW_WORK_DECIM
Definition: block_gateway.h:40
gr::block_gateway::block__add_item_tag
void block__add_item_tag(unsigned int which_output, const tag_t &tag)
Definition: block_gateway.h:223
gr::block_gateway::block__message_port_sub
void block__message_port_sub(pmt::pmt_t port_id, pmt::pmt_t target)
Definition: block_gateway.h:291
gr::block_gateway::block__set_history
void block__set_history(unsigned history)
Definition: block_gateway.h:129
gr::block::relative_rate
double relative_rate() const
return the approximate output rate / input rate
Definition: block.h:314
gr::block_gateway::block__message_port_register_in
void block__message_port_register_in(pmt::pmt_t port_id)
Definition: block_gateway.h:276
gr::GR_BLOCK_GW_WORK_GENERAL
@ GR_BLOCK_GW_WORK_GENERAL
Definition: block_gateway.h:38
gr::msg_queue
thread-safe message queue
Definition: msg_queue.h:37
gr::block_gw_message_type::ACTION_WORK
@ ACTION_WORK
Definition: block_gateway.h:60
gr::block_gw_message_type::forecast_args_ninput_items_required
std::vector< int > forecast_args_ninput_items_required
Definition: block_gateway.h:83
gr::block_gw_message_type::stop_args_return_value
bool stop_args_return_value
Definition: block_gateway.h:87
gr::block_gateway::block__get_tags_in_window
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:256
gr::block_gateway::set_msg_handler_feval
void set_msg_handler_feval(pmt::pmt_t which_port, gr::feval_p *msg_handler)
Definition: block_gateway.h:310
gr::block_gateway::block__message_port_register_out
void block__message_port_register_out(pmt::pmt_t port_id)
Definition: block_gateway.h:281
gr::block_gateway::block__alias
std::string block__alias(void) const
Definition: block_gateway.h:136
gr::block_gateway::dispatch_msg
void dispatch_msg(pmt::pmt_t which_port, pmt::pmt_t msg)
Definition: block_gateway.h:332
gr::block_gateway::block__set_block_alias
void block__set_block_alias(std::string alias)
Definition: block_gateway.h:131
gr::block_gateway::block__set_relative_rate
void block__set_relative_rate(double relative_rate)
Definition: block_gateway.h:182
gr::block_gw_message_type::general_work_args_noutput_items
int general_work_args_noutput_items
Definition: block_gateway.h:68
gr::block_gateway::block__message_port_pub
void block__message_port_pub(pmt::pmt_t port_id, pmt::pmt_t msg)
Definition: block_gateway.h:286
gr::basic_block::message_ports_out
pmt::pmt_t message_ports_out()
Get output message port names.
gr::block_gateway::block__set_processor_affinity
void block__set_processor_affinity(std::vector< int > mask)
Definition: block_gateway.h:138
gr::block::produce
void produce(int which_output, int how_many_items)
Tell the scheduler how_many_items were produced on output stream which_output.
gr::basic_block::message_ports_in
pmt::pmt_t message_ports_in()
Get input message port names.
gr::basic_block::unique_id
long unique_id() const
Definition: basic_block.h:144