Encapsulates the GenTL event functionality associated with one GenTL EVENT_HANDLE.
More...
#include <peak/event/peak_event_controller.hpp>
Encapsulates the GenTL event functionality associated with one GenTL EVENT_HANDLE.
This class is returned by EventSupportingModule::EnableEvents() and acts as a controller for events of the type given to EventSupportingModule::EnableEvents().
- Note
- When the EventController is destroyed, the EventType corresponding to the GenTL EVENT_HANDLE will be unregistered. This causes all waiting WaitForEvent calls to be aborted and pending events, including KillWaits, to be discarded.
◆ EventController() [1/3]
| peak::core::EventController::EventController |
( |
| ) |
|
|
delete |
◆ ~EventController()
| peak::core::EventController::~EventController |
( |
| ) |
|
|
inline |
◆ EventController() [2/3]
| peak::core::EventController::EventController |
( |
const EventController & | other | ) |
|
|
delete |
◆ EventController() [3/3]
◆ ControlledEventType()
| EventType peak::core::EventController::ControlledEventType |
( |
| ) |
const |
|
inline |
Returns the controlled event type.
- Returns
- Controlled event type
- Since
- 1.0
◆ EventDataMaxSize()
| size_t peak::core::EventController::EventDataMaxSize |
( |
| ) |
const |
|
inline |
Returns the maximum size of the data of an event in bytes.
- Returns
- Maximum size of the data of an event in bytes.
- Since
- 1.0
- Exceptions
-
◆ EventMaxSize()
| size_t peak::core::EventController::EventMaxSize |
( |
| ) |
const |
|
inline |
Returns the maximum size of an event in bytes.
- Returns
- Maximum size of an event in bytes.
- Since
- 1.0
- Exceptions
-
◆ FlushEvents()
| void peak::core::EventController::FlushEvents |
( |
| ) |
|
|
inline |
Discards all events in queue.
- Since
- 1.0
- Exceptions
-
◆ FlushPendingKillWaits()
| void peak::core::EventController::FlushPendingKillWaits |
( |
| ) |
|
|
inline |
◆ Info()
| RawInformation peak::core::EventController::Info |
( |
int32_t | infoCommand | ) |
const |
|
inline |
Delivers information based on the given GenTL info command.
- Parameters
-
| [in] | infoCommand | The GenTL info command. |
This function can be used to query information going beyond the predefined info functions, based on the GenTL info commands of the corresponding module.
Example (error handling is omitted):
auto info = object->Info(GenTL::XX_INFO_XX);
if (info.dataType == GenTL::INFO_DATATYPE_UINT64)
{
uint64_t uint64Var = *reinterpret_cast<const uint64_t*>(info.data.data());
}
else if (infoDataTypeVar == GenTL::INFO_DATATYPE_INT64)
{
...
}
...
- Returns
- Raw information according to the passed info command
- Since
- 1.0
- Exceptions
-
◆ KillWait()
| void peak::core::EventController::KillWait |
( |
| ) |
|
|
inline |
◆ NumEventsFired()
| uint64_t peak::core::EventController::NumEventsFired |
( |
| ) |
const |
|
inline |
Returns the number of fired events.
- Returns
- Number of fired events
- Since
- 1.0
- Exceptions
-
◆ NumEventsInQueue()
| size_t peak::core::EventController::NumEventsInQueue |
( |
| ) |
const |
|
inline |
Returns the number of events in queue.
- Returns
- Number of events in queue
- Since
- 1.0
- Exceptions
-
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ WaitForEvent()
| std::unique_ptr< Event > peak::core::EventController::WaitForEvent |
( |
Timeout | timeout_ms | ) |
|
|
inline |
Blocking wait for an event.
A call to WaitForEvent can be aborted immediately and at any time by calling KillWait from another thread, resulting in an AbortedException being thrown. This is especially useful when using INFINITE_TIMEOUT.
- Parameters
-
| [in] | timeout_ms | The maximum waiting time in milliseconds. When called with Timeout::INFINITE_TIMEOUT, the function will only return if the event is triggered or KillWait() is called. |
- Returns
- Event
- Since
- 1.0
- Exceptions
-
The documentation for this class was generated from the following file: