Compute Graph Framework SDK Reference  5.8
dw::framework::ChannelObject::Consumer Class Referenceabstract

Detailed Description

Child interface to consume packets on the channel

Definition at line 174 of file Channel.hpp.

Inheritance diagram for dw::framework::ChannelObject::Consumer:
Collaboration diagram for dw::framework::ChannelObject::Consumer:

Public Member Functions

virtual dwStatus recv (GenericData *data)=0
 
virtual dwStatus release (void *data)=0
 
- Public Member Functions inherited from dw::framework::ChannelObject::PacketPool
SyncSignalergetSyncSignaler ()
 
SyncWaitergetSyncWaiter ()
 
virtual void setOnDataReady (void *opaque, OnDataReady onDataReady)=0
 
virtual dwStatus wait (dwTime_t timeout)=0
 

Additional Inherited Members

- Public Types inherited from dw::framework::ChannelObject::PacketPool
using OnDataReady = dw::core::Function< void()>
 

Member Function Documentation

◆ recv()

virtual dwStatus dw::framework::ChannelObject::Consumer::recv ( GenericData data)
pure virtual

Receive a read-only packet. Recv calls should be sequenced after wait calls. Calling recv without calling wait first may not result in packets being returned.

Parameters
[out]dataThe packet information is returned here on DW_SUCCESS.
Returns
DW_END_OF_STREAM Upstream producer disconnected, so no further packets will come. DW_NOT_AVAILABLE No packets available to return. DW_SUCCESS

Referenced by dw::framework::PortInput< T >::recv().

◆ release()

virtual dwStatus dw::framework::ChannelObject::Consumer::release ( void *  data)
pure virtual

Release a previously acquired packet

Parameters
[in]dataThe packet data to be released, must have come from recv() call to the same instance. On DW_SUCCESS, read access is relinquished.
Returns
DW_BUFFER_FULL A consumer's buffers are full and was unable to receive the packet. DW_SUCCESS

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