Base class encapsulates ownership of buffers and interactions with channel in type-agnostic way.
Definition at line 158 of file ManagedPort.hpp.
Classes | |
struct | BoundProperties |
struct | ConstructProperties |
struct | Properties |
Public Types | |
using | RingBuffer = dw::core::RingBuffer< GenericData > |
Public Member Functions | |
void | bindChannel (ChannelObject *channel) override |
const Properties & | getProperties () const noexcept |
bool | isBound () const noexcept override |
bool | isBufferAvailable () const noexcept |
void | recv () |
void | release () |
void | reset () override |
![]() | |
virtual void | bindChannel (ChannelObject *channel)=0 |
virtual bool | isBound () const noexcept=0 |
ManagedPortBase () | |
ManagedPortBase (const ManagedPortBase &other)=delete | |
ManagedPortBase (ManagedPortBase &&other)=delete | |
ManagedPortBase & | operator= (const ManagedPortBase &other)=delete |
ManagedPortBase & | operator= (ManagedPortBase &&other)=delete |
virtual void | reset () |
void | setCycleCount (uint32_t cycleCount) |
virtual | ~ManagedPortBase ()=default |
![]() | |
virtual | ~PortBase ()=default |
Protected Member Functions | |
GenericData | getBufferGeneric () const |
ManagedPortInputBase (ConstructProperties props, GenericDataReference &&ref) | |
GenericData | popBufferGeneric () |
void | releaseToChannel (void *data) |
Protected Attributes | |
RingBuffer | m_buffers |
GenericData | m_stashedFuturePacket |
bool | m_stashValid |
![]() | |
uint32_t | m_cycleCount |
struct dw::framework::ManagedPortInputBase::BoundProperties |
Class Members | ||
---|---|---|
uint32_t | dataOffset |
Offset from when an incoming packet was produced to the current cycle that must elapse before a packet can be releaesd to a consumer. |
bool | enableReuse |
If all buffers have been released and there are no new buffers available on channel since recv() was last called, enableReuse will allow the last buffer acquired from the channel to be returned. Only 1 buffer will be re-usable in case multiple buffers were last acquired. TODO(chale): move this to ConstructProperties once properties are passed by node instead of via channel. |
bool | syncEnabled |
Whether this port is a sync port and will validate a packet's cycle counter. |
struct dw::framework::ManagedPortInputBase::ConstructProperties |
Class Members | ||
---|---|---|
uint32_t | maxBuffers |
The maximum number of buffers this port can acquire at once. |
dwTime_t | waitTime |
When recv() is called, calling thread will block at least waitTime number of us for a packet to arrive on the channel. TODO(chale): move to BoundProperties once it is supported. |
struct dw::framework::ManagedPortInputBase::Properties |
Class Members | ||
---|---|---|
BoundProperties | boundProperties |
Properties deduced once port is bound to channel. |
ConstructProperties | constructProperties |
Properties deduced when port is constructed. |
using dw::framework::ManagedPortInputBase::RingBuffer = dw::core::RingBuffer<GenericData> |
Definition at line 161 of file ManagedPort.hpp.
|
protected |
|
overridevirtual |
Implements dw::framework::ManagedPortBase.
|
protected |
|
noexcept |
|
overridevirtualnoexcept |
Implements dw::framework::ManagedPortBase.
|
noexcept |
|
protected |
void dw::framework::ManagedPortInputBase::recv | ( | ) |
Receive buffers from the channel
when | unexpected error is received from channel or when buffers were already received (and not released). |
void dw::framework::ManagedPortInputBase::release | ( | ) |
Release buffers to the channel
when | unexpected error is received from channel. |
|
protected |
|
overridevirtual |
Return all buffers to the channel as release() does, but also returns buffers held for re-use.
Reimplemented from dw::framework::ManagedPortBase.
|
protected |
Definition at line 272 of file ManagedPort.hpp.
|
protected |
Definition at line 273 of file ManagedPort.hpp.
|
protected |
Definition at line 274 of file ManagedPort.hpp.