Compute Graph Framework SDK Reference  5.18
dw::framework::ManagedPortInput< T > Class Template Reference

Detailed Description

template<typename T>
class dw::framework::ManagedPortInput< T >

Derived ManagedPortInput<T> provides type-specific interfaces for accessing buffers.

Definition at line 467 of file ManagedPort.hpp.

Inheritance diagram for dw::framework::ManagedPortInput< T >:
Collaboration diagram for dw::framework::ManagedPortInput< T >:

Classes

struct  iterable
 

Public Types

using UniquePacketPtr = std::unique_ptr< T, PacketDeleter >
 
- Public Types inherited from dw::framework::ManagedPortInputBase
using RingBuffer = dw::core::RingBuffer< GenericData >
 

Public Member Functions

detail::vectorIterable< T > getAllBufferIter ()
 
auto getBuffer () -> T *
 
auto getBufferIfAvailableAndValid () -> T *
 
iterable getBufferIter ()
 
auto getOptionalBuffer () -> T *
 
 ManagedPortInput (const dw::core::StringView &name)
 
 ManagedPortInput (const dw::core::StringView &name, ConstructProperties props)
 
 ManagedPortInput (const dw::core::StringView &name, ConstructProperties props, SpecimenT specimen)
 
UniquePacketPtr takeOwnership ()
 
- Public Member Functions inherited from dw::framework::ManagedPortInputBase
void bindChannel (ChannelObject *channel) override
 
dw::core::VectorFixed< GenericDatagetAllBuffers ()
 
const ChannelMetadatagetMetadata ()
 
const PropertiesgetProperties () const noexcept
 
bool isBound () const noexcept override
 
bool isBufferAvailable () const noexcept
 
void recv ()
 
void release ()
 
void reset () override
 
void sendAdvTimestamp ()
 
void setCallbackAfterRecv (dw::core::Function< dwStatus()> callback)
 
- Public Member Functions inherited from dw::framework::ManagedPortBase
virtual void bindChannel (ChannelObject *channel)=0
 
void bindLockstepSyncClient (dw::framework::lockstep::ILockstepSyncClient *syncClient)
 
ChannelObjectgetChannel ()
 
const dw::core::StringView & getName () const
 Get the name of the port. More...
 
const dw::core::StringView & getNodeName () const
 Get the name of the node this port belongs to. More...
 
virtual bool isBound () const noexcept=0
 
 ManagedPortBase (const dw::core::StringView &name)
 
 ManagedPortBase (const ManagedPortBase &other)=delete
 
 ManagedPortBase (ManagedPortBase &&other)=delete
 
ManagedPortBaseoperator= (const ManagedPortBase &other)=delete
 
ManagedPortBaseoperator= (ManagedPortBase &&other)=delete
 
virtual void reset ()
 
void setCycleCount (uint32_t cycleCount)
 
virtual void setNodeName (const dw::core::StringView &nodeName) noexcept
 Set the name of the node this port belongs to. More...
 
void setPeriod (uint32_t period)
 
virtual ~ManagedPortBase ()=default
 
- Public Member Functions inherited from dw::framework::PortBase
virtual ~PortBase ()=default
 

Additional Inherited Members

- Protected Member Functions inherited from dw::framework::ManagedPortInputBase
GenericData getBufferGeneric () const
 
 ManagedPortInputBase (const dw::core::StringView &name, ConstructProperties props, GenericDataReference &&ref)
 
GenericData popBufferGeneric ()
 
void releaseToChannel (void *data)
 
- Protected Member Functions inherited from dw::framework::ManagedPortBase
 FI_DECLARE_INSTANCE_SET_HANDLE (m_fiHandle)
 
- Protected Attributes inherited from dw::framework::ManagedPortInputBase
RingBuffer m_buffers
 
GenericData m_stashedFuturePacket
 
bool m_stashValid
 
- Protected Attributes inherited from dw::framework::ManagedPortBase
ChannelObjectm_channel
 
uint32_t m_cycleCount
 
dw::framework::lockstep::ILockstepSyncClientm_lockstepSyncClient
 
dw::core::StringView m_name
 The unique name within set of ports with the same direction. More...
 
dw::core::StringView m_nodeName
 The name of the node this port belongs to. More...
 
uint32_t m_period
 

Member Typedef Documentation

◆ UniquePacketPtr

template<typename T >
using dw::framework::ManagedPortInput< T >::UniquePacketPtr = std::unique_ptr<T, PacketDeleter>

Definition at line 560 of file ManagedPort.hpp.

Constructor & Destructor Documentation

◆ ManagedPortInput() [1/3]

template<typename T >
dw::framework::ManagedPortInput< T >::ManagedPortInput ( const dw::core::StringView &  name,
ConstructProperties  props 
)
inline
Parameters
[in]namethe name of the input Port.
[in]propsthe properties of the input Port.

Definition at line 485 of file ManagedPort.hpp.

◆ ManagedPortInput() [2/3]

template<typename T >
dw::framework::ManagedPortInput< T >::ManagedPortInput ( const dw::core::StringView &  name)
inline

Definition at line 490 of file ManagedPort.hpp.

◆ ManagedPortInput() [3/3]

template<typename T >
dw::framework::ManagedPortInput< T >::ManagedPortInput ( const dw::core::StringView &  name,
ConstructProperties  props,
SpecimenT  specimen 
)
inline

Definition at line 495 of file ManagedPort.hpp.

Member Function Documentation

◆ getAllBufferIter()

template<typename T >
detail::vectorIterable< T > dw::framework::ManagedPortInput< T >::getAllBufferIter ( )
inline

iterable for all the buffers in the output channel pool.

Definition at line 503 of file ManagedPort.hpp.

◆ getBuffer()

template<typename T >
auto dw::framework::ManagedPortInput< T >::getBuffer ( ) -> T*
inline

Get a pointer to the first received buffer.

Note
returned pointer is never nullptr
Exceptions
whenthe buffer cannot be cast to T.

Definition at line 523 of file ManagedPort.hpp.

◆ getBufferIfAvailableAndValid()

template<typename T >
auto dw::framework::ManagedPortInput< T >::getBufferIfAvailableAndValid ( ) -> T*
inline

For bind value if it is valid Get a pointer to the first received buffer if the buffer is valid or validity is not set. Otherwise return nullptr.

Definition at line 533 of file ManagedPort.hpp.

References dw::framework::getValidityStatus().

◆ getBufferIter()

template<typename T >
iterable dw::framework::ManagedPortInput< T >::getBufferIter ( )
inline

Get iterator over received buffers

Note
returned pointers are never nullptr
iterator access throws if buffer cannot be cast to T.

Definition at line 513 of file ManagedPort.hpp.

◆ getOptionalBuffer()

template<typename T >
auto dw::framework::ManagedPortInput< T >::getOptionalBuffer ( ) -> T*
inline

For bind optional and buffer optional case Get a pointer to the first received buffer if the buffer available. Otherwise return nullptr.

Exceptions
whenthe buffer cannot be cast to T.

Definition at line 555 of file ManagedPort.hpp.

◆ takeOwnership()

template<typename T >
UniquePacketPtr dw::framework::ManagedPortInput< T >::takeOwnership ( )
inline

Definition at line 562 of file ManagedPort.hpp.

References dw::framework::GenericData::getPointer().


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