17#ifndef __ROGUE_INTERFACES_STREAM_SLAVE_H__
18#define __ROGUE_INTERFACES_STREAM_SLAVE_H__
32 #include <boost/python.hpp>
78 std::shared_ptr<rogue::Logging> log_;
96 static std::shared_ptr<rogue::interfaces::stream::Slave>
create();
137 void setDebug(uint32_t debug, std::string name);
156 virtual void acceptFrame(std::shared_ptr<rogue::interfaces::stream::Frame> frame);
199 bool ensureSingleBuffer(std::shared_ptr<rogue::interfaces::stream::Frame>& frame,
bool reqEn);
211 std::shared_ptr<rogue::interfaces::stream::Frame>
reqLocalFrame(uint32_t size,
bool zeroCopyEn);
220 boost::python::object
lshiftPy(boost::python::object p);
229 std::shared_ptr<rogue::interfaces::stream::Master>&
operator<<(
230 std::shared_ptr<rogue::interfaces::stream::Master>& other);
234typedef std::shared_ptr<rogue::interfaces::stream::Slave>
SlavePtr;
246 public boost::python::wrapper<rogue::interfaces::stream::Slave> {
256 void acceptFrame(std::shared_ptr<rogue::interfaces::stream::Frame> frame);
266 void defAcceptFrame(std::shared_ptr<rogue::interfaces::stream::Frame> frame);
269typedef std::shared_ptr<rogue::interfaces::stream::SlaveWrap>
SlaveWrapPtr;
Typed shared-from-this helper for Rogue classes.
Frame and buffer allocator for stream endpoints.
Internal Boost.Python wrapper for rogue::interfaces::stream::Slave. Enables Python subclasses to over...
void defAcceptFrame(std::shared_ptr< rogue::interfaces::stream::Frame > frame)
Calls the base-class acceptFrame() implementation.
void acceptFrame(std::shared_ptr< rogue::interfaces::stream::Frame > frame)
Accepts a frame from an upstream master.
Stream slave endpoint and default frame pool.
void setDebug(uint32_t debug, std::string name)
Sets debug message verbosity and logger name.
Slave()
Constructs a stream slave.
uint64_t getFrameCount()
Returns frame counter.
static std::shared_ptr< rogue::interfaces::stream::Slave > create()
Creates a new stream slave.
virtual ~Slave()
Destroys the stream slave.
static void setup_python()
Registers this type with Python bindings.
uint64_t getByteCount()
Returns byte counter.
boost::python::object lshiftPy(boost::python::object p)
Supports << operator usage from Python.
std::shared_ptr< rogue::interfaces::stream::Frame > reqLocalFrame(uint32_t size, bool zeroCopyEn)
Services a local frame allocation request through this object's pool interface.
std::shared_ptr< rogue::interfaces::stream::Master > & operator<<(std::shared_ptr< rogue::interfaces::stream::Master > &other)
Connects this slave to a master via stream chaining operator.
virtual void stop()
Shuts down threads associated with this object.
bool ensureSingleBuffer(std::shared_ptr< rogue::interfaces::stream::Frame > &frame, bool reqEn)
Ensures frame is backed by a single buffer.
virtual void acceptFrame(std::shared_ptr< rogue::interfaces::stream::Frame > frame)
Accepts a frame from a master.
std::shared_ptr< rogue::interfaces::stream::SlaveWrap > SlaveWrapPtr
std::shared_ptr< rogue::interfaces::stream::Slave > SlavePtr
Shared pointer alias for Slave.