31 #ifndef DW_FRAMEWORK_CHANNEL_HPP_ 32 #define DW_FRAMEWORK_CHANNEL_HPP_ 37 #include <dw/core/context/Context.h> 39 #include <dw/core/language/Function.hpp> 40 #include <dw/core/container/BaseString.hpp> 71 virtual void getSyncObjs(dw::core::span<NvSciSyncObj>& syncObjs) = 0;
87 virtual void getWaitFences(
void* data, dw::core::span<NvSciSyncFence>& waitFences) = 0;
101 virtual void setSignalFences(
void* data, dw::core::span<const NvSciSyncFence> postFences) = 0;
109 auto* waiter =
dynamic_cast<SyncWaiter*
>(
this);
110 if (waiter ==
nullptr)
112 throw Exception(DW_BAD_CAST,
"ChannelObject::PacketPool: not a SyncWaiter");
120 if (signaler ==
nullptr)
122 throw Exception(DW_BAD_CAST,
"ChannelObject::PacketPool: not a SyncSignaler");
136 virtual dwStatus wait(dwTime_t timeout) = 0;
167 virtual dwStatus send(
void* data) = 0;
197 virtual dwStatus release(
void* data) = 0;
245 virtual dwStatus
connect(dwTime_t timeout) = 0;
256 #endif // DW_FRAMEWORK_CHANNEL_HPP_ SyncWaiter & getSyncWaiter()
static constexpr dwTime_t CHN_WAIT_TIMEOUT_US
virtual Producer * getProducer(GenericDataReference ref)=0
Register a producer client.
virtual bool isConnected() const =0
Query if the channel and its client interfaces are connected to downstream/upstream channels and are ...
Child interface to consume packets on the channel.
virtual Consumer * getConsumer(GenericDataReference ref)=0
Register a consumer client.
virtual bool hasClients() const =0
Query if the channel has any clients.
SyncSignaler & getSyncSignaler()
virtual ~ChannelObject()=default
virtual void getSyncObjs(dw::core::span< NvSciSyncObj > &syncObjs)=0
Retrieve the NvSciSyncObjs allocated by the channel.
dw::core::Function< void()> OnDataReady
virtual const ChannelParams & getParams() const =0
Get the parameters for this channel.
Child interface to produce packets on the channel.
virtual dwStatus connect(dwTime_t timeout)=0
Establish connection over the channel's protocol.