10 #ifndef INCLUDED_BLOCK_GATEWAY_H
11 #define INCLUDED_BLOCK_GATEWAY_H
19 #include <pybind11/pybind11.h>
25 namespace py = pybind11;
43 const std::string&
name,
48 using sptr = std::shared_ptr<block_gateway>;
59 const std::string&
name,
75 std::vector<gr::tag_t>
83 std::vector<gr::tag_t>
110 py::handle d_py_handle;
113 using msg_handlers_pybind_t = std::map<pmt::pmt_t, std::string, pmt::comparator>;
114 msg_handlers_pybind_t d_msg_handlers_pybind;
116 bool has_msg_handler(
pmt::pmt_t which_port)
override;
enum { GW_BLOCK_GENERAL=0, GW_BLOCK_SYNC, GW_BLOCK_DECIM, GW_BLOCK_INTERP } gw_block_t
Definition: block_gateway.h:37
Definition: block_gateway.h:40
void set_msg_handler_pybind(const pmt::pmt_t &which_port, std::string &handler_name)
std::vector< gr::tag_t > _get_tags_in_window(unsigned int which_input, uint64_t rel_start, uint64_t rel_end, const pmt::pmt_t &key)
std::shared_ptr< block_gateway > sptr
Definition: block_gateway.h:48
std::vector< gr::tag_t > _get_tags_in_window(unsigned int which_input, uint64_t rel_start, uint64_t rel_end)
bool start() override
Called to enable drivers, etc for i/o devices.
gr::logger_ptr _get_logger() const
Definition: block_gateway.h:107
void forecast(int noutput_items, gr_vector_int &ninput_items_required) override
Estimate input requirements given output request.
bool stop() override
Called to disable drivers, etc for i/o devices.
block_gateway(const py::handle &py_handle, const std::string &name, gr::io_signature::sptr in_sig, gr::io_signature::sptr out_sig)
std::vector< gr::tag_t > _get_tags_in_range(unsigned int which_input, uint64_t abs_start, uint64_t abs_end, const pmt::pmt_t &key)
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< gr::tag_t > _get_tags_in_range(unsigned int which_input, uint64_t abs_start, uint64_t abs_end)
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)
void _add_item_tag(unsigned int which_output, const gr::tag_t &tag)
int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) override
compute output items from input items
gr::logger_ptr d_logger
Definition: basic_block.h:96
std::string name() const
Definition: basic_block.h:168
The abstract base class for all 'terminal' processing blocks.
Definition: gnuradio-runtime/include/gnuradio/block.h:63
std::shared_ptr< io_signature > sptr
Definition: io_signature.h:52
GR_RUNTIME_API const pmt::pmt_t msg()
std::shared_ptr< logger > logger_ptr
Definition: logger.h:250
std::shared_ptr< pmt_base > pmt_t
typedef for shared pointer (transparent reference counting).
Definition: pmt.h:83
std::vector< const void * > gr_vector_const_void_star
Definition: types.h:28
std::vector< void * > gr_vector_void_star
Definition: types.h:27
std::vector< int > gr_vector_int
Definition: types.h:23