S2OPC OPCUA Toolkit
|
An event timer manager which allow to associate an event to enqueue in an event dispatcher manager on timer expiration. More...
Go to the source code of this file.
Macros | |
#define | SOPC_TIMER_RESOLUTION_MS 50 |
Functions | |
void | SOPC_EventTimer_Initialize (void) |
Initialize the event timer manager (necessary to create timers) | |
void | SOPC_EventTimer_PreClear (void) |
PreClear the event timer manager: thread triggering timers is stopped. It might be called prior to SOPC_EventTimer_Clear to ensure no new timer is triggered until clearing memory. SOPC_EventTimer_Clear shall be called shortly to completely clear event timer data. | |
void | SOPC_EventTimer_Clear (void) |
Clear the event timer manager (cancel all timers not already triggered) SOPC_EventTimer_PreClear is automatically called if not called prior to this call. | |
uint32_t | SOPC_EventTimer_Create (SOPC_EventHandler *eventHandler, SOPC_LooperEvent event, uint64_t msDelay) |
Create a timer which will raise the given event parameters to the given event dispatch manager. | |
uint32_t | SOPC_EventTimer_CreatePeriodic (SOPC_EventHandler *eventHandler, SOPC_LooperEvent event, uint64_t msPeriod) |
Creates a periodic timer raising an event on a dispatch manager every msPeriod milliseconds. | |
bool | SOPC_EventTimer_ModifyPeriodic (uint32_t timerId, uint64_t msPeriod) |
Modifies an existing periodic timer period. | |
void | SOPC_EventTimer_Cancel (uint32_t timerId) |
Cancel a started timer. | |
An event timer manager which allow to associate an event to enqueue in an event dispatcher manager on timer expiration.
#define SOPC_TIMER_RESOLUTION_MS 50 |
Maximum resolution time for the event timers evaluation
void SOPC_EventTimer_Initialize | ( | void | ) |
Initialize the event timer manager (necessary to create timers)
void SOPC_EventTimer_PreClear | ( | void | ) |
PreClear the event timer manager: thread triggering timers is stopped. It might be called prior to SOPC_EventTimer_Clear to ensure no new timer is triggered until clearing memory. SOPC_EventTimer_Clear shall be called shortly to completely clear event timer data.
void SOPC_EventTimer_Clear | ( | void | ) |
Clear the event timer manager (cancel all timers not already triggered) SOPC_EventTimer_PreClear is automatically called if not called prior to this call.
uint32_t SOPC_EventTimer_Create | ( | SOPC_EventHandler * | eventHandler, |
SOPC_LooperEvent | event, | ||
uint64_t | msDelay ) |
Create a timer which will raise the given event parameters to the given event dispatch manager.
eventHandler | the event handler where to dispatch the event on timeout |
event | the event to dispatch on timeout |
msDelay | the delay from current time before timeout in milliseconds |
uint32_t SOPC_EventTimer_CreatePeriodic | ( | SOPC_EventHandler * | eventHandler, |
SOPC_LooperEvent | event, | ||
uint64_t | msPeriod ) |
Creates a periodic timer raising an event on a dispatch manager every msPeriod milliseconds.
eventHandler | the event handler where to dispatch the event on timeout |
event | the event to dispatch on timeout |
msPeriod | the period in milliseconds |
bool SOPC_EventTimer_ModifyPeriodic | ( | uint32_t | timerId, |
uint64_t | msPeriod ) |
Modifies an existing periodic timer period.
timerId | the identifier of the started periodic timer to modify |
msPeriod | the new period to apply in milliseconds |
void SOPC_EventTimer_Cancel | ( | uint32_t | timerId | ) |
Cancel a started timer.
timerId | the identifier of the started timer to cancel |