Shared allocator and context for Channels.
Definition at line 56 of file ChannelFactory.hpp.
◆ OnDispatchDataReady
◆ ChannelFactory()
dw::framework::ChannelFactory::ChannelFactory |
( |
dwContextHandle_t |
ctx = DW_NULL_HANDLE | ) |
|
|
explicit |
Construct a new Channel Factory object.
- Parameters
-
ctx | the DriveWorks context |
◆ ~ChannelFactory()
virtual dw::framework::ChannelFactory::~ChannelFactory |
( |
| ) |
|
|
virtualdefault |
◆ 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>
◆ popError()
dw::core::Optional< ChannelError > dw::framework::ChannelFactory::popError |
( |
| ) |
|
Pop the oldest error
- Returns
- dw::core::Optional<ChannelError>
◆ popEvent()
dw::core::Optional< ChannelEvent > dw::framework::ChannelFactory::popEvent |
( |
dwTime_t |
timeout | ) |
|
Pop the oldest event.
- Note
- this method is not thread-safe.
- Parameters
-
[in] | timeout | timeout for the wait |
- Returns
- ChannelEvent if it came
◆ 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. |
◆ setAffinity()
void dw::framework::ChannelFactory::setAffinity |
( |
uint32_t |
affinity | ) |
|
Set affinity of services
- Parameters
-
[in] | affinity | affinity mask |
◆ setFsiComCreateOverrider()
void dw::framework::ChannelFactory::setFsiComCreateOverrider |
( |
std::function< std::shared_ptr< IChannelFsiCom >(uint8_t, const char *)> && |
overrider | ) |
|
Override a factory function to create IChannelFsiCom
- Parameters
-
overrider | a function pointer to a factory function for instantiating IChannelFsiCom |
◆ setOnDispatchDataReady()
void dw::framework::ChannelFactory::setOnDispatchDataReady |
( |
OnDispatchDataReady |
dispatchDataReady | ) |
|
◆ setPriority()
void dw::framework::ChannelFactory::setPriority |
( |
int32_t |
priority | ) |
|
Set priority of services
- Parameters
-
◆ 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.
◆ 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: