rogue
Loading...
Searching...
No Matches
Public Member Functions | List of all members
rogue::interfaces::stream::SlaveWrap Class Reference

Internal Boost.Python wrapper for rogue::interfaces::stream::Slave. Enables Python subclasses to override virtual methods. More...

#include <Slave.h>

Inheritance diagram for rogue::interfaces::stream::SlaveWrap:
rogue::interfaces::stream::Slave rogue::interfaces::stream::Pool rogue::EnableSharedFromThis< rogue::interfaces::stream::Slave > rogue::EnableSharedFromThis< rogue::interfaces::stream::Pool > rogue::EnableSharedFromThisBase rogue::EnableSharedFromThisBase

Public Member Functions

void acceptFrame (std::shared_ptr< rogue::interfaces::stream::Frame > frame)
 Accepts a frame from an upstream master.
 
void defAcceptFrame (std::shared_ptr< rogue::interfaces::stream::Frame > frame)
 Calls the base-class acceptFrame() implementation.
 
- Public Member Functions inherited from rogue::interfaces::stream::Slave
 Slave ()
 Constructs a stream slave.
 
virtual ~Slave ()
 Destroys the stream slave.
 
virtual void stop ()
 Shuts down threads associated with this object.
 
void setDebug (uint32_t debug, std::string name)
 Sets debug message verbosity and logger name.
 
uint64_t getFrameCount ()
 Returns frame counter.
 
uint64_t getByteCount ()
 Returns byte counter.
 
bool ensureSingleBuffer (std::shared_ptr< rogue::interfaces::stream::Frame > &frame, bool reqEn)
 Ensures frame is backed by a single buffer.
 
std::shared_ptr< rogue::interfaces::stream::FramereqLocalFrame (uint32_t size, bool zeroCopyEn)
 Services a local frame allocation request through this object's pool interface.
 
boost::python::object lshiftPy (boost::python::object p)
 Supports << operator usage from Python.
 
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.
 
- Public Member Functions inherited from rogue::interfaces::stream::Pool
 Pool ()
 Constructs a pool with default allocation behavior enabled.
 
virtual ~Pool ()
 Destroys the pool and releases any cached buffer storage.
 
uint32_t getAllocBytes ()
 Returns total currently allocated bytes.
 
uint32_t getAllocCount ()
 Returns total currently allocated buffer count.
 
virtual std::shared_ptr< rogue::interfaces::stream::FrameacceptReq (uint32_t size, bool zeroCopyEn)
 Services a frame allocation request from a master.
 
virtual void retBuffer (uint8_t *data, uint32_t meta, uint32_t size)
 Returns buffer data to the allocator.
 
void setFixedSize (uint32_t size)
 Sets fixed-size mode.
 
uint32_t getFixedSize ()
 Returns fixed-size allocation setting.
 
void setPoolSize (uint32_t size)
 Sets buffer pool size.
 
uint32_t getPoolSize ()
 Returns configured maximum number of cached pool entries.
 
- Public Member Functions inherited from rogue::EnableSharedFromThis< rogue::interfaces::stream::Pool >
std::shared_ptr< rogue::interfaces::stream::Poolshared_from_this ()
 Returns a shared_ptr<T> for this instance.
 
- Public Member Functions inherited from rogue::EnableSharedFromThisBase
virtual ~EnableSharedFromThisBase ()
 Virtual destructor for polymorphic base usage.
 
- Public Member Functions inherited from rogue::EnableSharedFromThis< rogue::interfaces::stream::Slave >
std::shared_ptr< rogue::interfaces::stream::Slaveshared_from_this ()
 Returns a shared_ptr<T> for this instance.
 

Additional Inherited Members

- Static Public Member Functions inherited from rogue::interfaces::stream::Slave
static std::shared_ptr< rogue::interfaces::stream::Slavecreate ()
 Creates a new stream slave.
 
static void setup_python ()
 Registers this type with Python bindings.
 
- Static Public Member Functions inherited from rogue::interfaces::stream::Pool
static void setup_python ()
 Registers this type with Python bindings.
 
- Protected Member Functions inherited from rogue::interfaces::stream::Pool
std::shared_ptr< rogue::interfaces::stream::BufferallocBuffer (uint32_t size, uint32_t *total)
 Allocate a buffer passed size.
 
std::shared_ptr< rogue::interfaces::stream::BuffercreateBuffer (void *data, uint32_t meta, uint32_t size, uint32_t alloc)
 Creates a Buffer with a pre-allocated data block.
 
void decCounter (uint32_t alloc)
 Decrements allocation counter.
 

Detailed Description

Internal Boost.Python wrapper for rogue::interfaces::stream::Slave. Enables Python subclasses to override virtual methods.

This wrapper is an internal binding adapter and not a primary C++ API surface. It is registered by setup_python() under the base class name.

Definition at line 245 of file Slave.h.

Member Function Documentation

◆ acceptFrame()

void rogue::interfaces::stream::SlaveWrap::acceptFrame ( std::shared_ptr< rogue::interfaces::stream::Frame frame)
virtual

Accepts a frame from an upstream master.

Accept frame.

Invokes the Python override when provided.

Parameters
frameFrame received from the stream path.

Reimplemented from rogue::interfaces::stream::Slave.

Definition at line 110 of file Slave.cpp.

◆ defAcceptFrame()

void rogue::interfaces::stream::SlaveWrap::defAcceptFrame ( std::shared_ptr< rogue::interfaces::stream::Frame frame)

Calls the base-class acceptFrame() implementation.

Default accept frame call.

Used as the fallback when no Python override is present.

Parameters
frameFrame received from the stream path.

Definition at line 127 of file Slave.cpp.


The documentation for this class was generated from the following files: