Shared allocator and context for Channels.
Definition at line 69 of file ChannelFactory.hpp.
◆ OnDispatchDataReady
◆ ChannelFactory()
dw::framework::ChannelFactory::ChannelFactory |
( |
dwContextHandle_t |
ctx = DW_NULL_HANDLE | ) |
|
Construct a new Channel Factory object.
- Parameters
-
ctx | the DriveWorks context |
◆ ~ChannelFactory()
virtual dw::framework::ChannelFactory::~ChannelFactory |
( |
| ) |
|
|
virtualdefault |
◆ getEvent()
bool dw::framework::ChannelFactory::getEvent |
( |
ChannelEvent & |
event, |
|
|
dwTime_t |
timeout |
|
) |
| |
Get the oldest event.
- Note
- this method is not thread-safe.
- Parameters
-
[out] | event | event to wait for |
[in] | timeout | timeout for the wait |
- Returns
- true if successful false if no event came
◆ getNvSciSyncModule()
NvSciSyncModule dw::framework::ChannelFactory::getNvSciSyncModule |
( |
| ) |
|
◆ getPacketFactory()
◆ makeChannel()
std::shared_ptr< ChannelObject > dw::framework::ChannelFactory::makeChannel |
( |
const char * |
channelParams | ) |
|
Create a Channel
- Parameters
-
channelParams | the parameters of the Channel |
- Returns
- std::shared_ptr<ChannelObject>
◆ registerPacketConstructor()
Register a packet constructor to the factory.
- Note
- A packet class must be registered to the ChannelFactory before a corresponding ChannelObject which the application intends to use with said packet class is created.
-
Thread-safe
-
init-time only
- Parameters
-
signature | The signature under chich to register the constructor. |
constructor | The constructor to register. |
◆ setOnDispatchDataReady()
void dw::framework::ChannelFactory::setOnDispatchDataReady |
( |
OnDispatchDataReady |
dispatchDataReady | ) |
|
◆ startServices()
void dw::framework::ChannelFactory::startServices |
( |
| ) |
|
Start the background services of the Channels.
- Note
- Until services are started, Channels may not properly connect or get notified when new data is ready.
-
Performance to create Channels will be very slow due to contention of background services. Hence it is recommended to create all Channels before starting services.
-
Not Yet Implemented.
◆ stopServices()
void dw::framework::ChannelFactory::stopServices |
( |
| ) |
|
Stop the background services of the Channels.
- Note
- While services are stopped, Channels may not properly be able to get notified when new data is ready.
-
Performance to delete Channels will be very slow due to contention of background services. Hence it is recommended to stop services before deleting any Channels.
◆ unregisterPacketConstructor()
Unregister a packet constructor from the factory.
- Note
- Thread-safe
-
deinit-time only
- Parameters
-
signature | The signature to unregister. |
The documentation for this class was generated from the following file: