11 #ifndef INCLUDED_RUNTIME_BLOCK_GATEWAY_H
12 #define INCLUDED_RUNTIME_BLOCK_GATEWAY_H
18 #include <pybind11/pybind11.h>
19 #include <pybind11/stl.h>
20 namespace py = pybind11;
39 py::handle d_py_handle;
43 typedef std::shared_ptr<block_gateway>
sptr;
54 const std::string& name,
78 std::vector<gr::tag_t> tags;
88 std::vector<gr::tag_t> tags;
96 std::vector<gr::tag_t> tags;
106 std::vector<gr::tag_t> tags;
112 std::string& handler_name) = 0;
Definition: block_gateway.h:37
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)
Definition: block_gateway.h:65
virtual void set_msg_handler_pybind(pmt::pmt_t which_port, std::string &handler_name)=0
std::vector< tag_t > _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:83
void dispatch_msg(pmt::pmt_t which_port, pmt::pmt_t msg) override=0
void _add_item_tag(unsigned int which_output, const tag_t &tag)
Definition: block_gateway.h:60
bool has_msg_handler(pmt::pmt_t which_port) override=0
Tests if there is a handler attached to port which_port.
std::vector< tag_t > _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:101
std::shared_ptr< block_gateway > sptr
Definition: block_gateway.h:43
std::vector< tag_t > _get_tags_in_window(unsigned int which_input, uint64_t rel_start, uint64_t rel_end)
Definition: block_gateway.h:94
static sptr make(const py::object &py_handle, const std::string &name, gr::io_signature::sptr in_sig, gr::io_signature::sptr out_sig)
std::vector< tag_t > _get_tags_in_range(unsigned int which_input, uint64_t abs_start, uint64_t abs_end)
Definition: block_gateway.h:76
The abstract base class for all 'terminal' processing blocks.
Definition: gnuradio-runtime/include/gnuradio/block.h:60
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: gnuradio-runtime/include/gnuradio/block.h:771
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 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.
std::shared_ptr< io_signature > sptr
Definition: io_signature.h:34
#define GR_RUNTIME_API
Definition: gnuradio-runtime/include/gnuradio/api.h:18
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition: basic_block.h:29
gw_block_t
Definition: block_gateway.h:29
@ GW_BLOCK_INTERP
Definition: block_gateway.h:33
@ GW_BLOCK_GENERAL
Definition: block_gateway.h:30
@ GW_BLOCK_DECIM
Definition: block_gateway.h:32
@ GW_BLOCK_SYNC
Definition: block_gateway.h:31
std::shared_ptr< pmt_base > pmt_t
typedef for shared pointer (transparent reference counting).
Definition: pmt.h:84
#define PMT_F
Definition: pmt.h:124