RuntimeTimer defines the basic Application Interface (API) to the timer part of the run to completion (RTC) kernel.
More...
#include <Imt.Base.Dff.Runtime/RuntimeTimer.h>
RuntimeTimer defines the basic Application Interface (API) to the timer part of the run to completion (RTC) kernel.
Timer events are dispatched by the runtime in the same manner as any other event via the executable callback.
◆ TimerHandle
A TimerHandle is used to identify a timer with a unique number.
Invalid timers have the identifier TIMERHANDLE_INVALID. periodic timer identifiers have a range from 1..INT16_MAX, whereas one-shot timer identifiers have a range from -1..INT16_MIN
◆ getIsRunningState()
static bool imt::base::dff::runtime::RuntimeTimer::getIsRunningState |
( |
TimerHandle const |
timerHandle | ) |
|
|
static |
Returns if the timer is running.
- Parameters
-
timerHandle | Handle of the timer to check. |
- Returns
- bool state of the timer
◆ getTickCountMs()
static uint32_t imt::base::dff::runtime::RuntimeTimer::getTickCountMs |
( |
| ) |
|
|
static |
Returns the tick count in milliseconds elapsed since system start.
- Returns
- Tick count in milliseconds.
◆ initTimerModule()
static void imt::base::dff::runtime::RuntimeTimer::initTimerModule |
( |
| ) |
|
|
static |
Initialize software timer module.
◆ killTimer()
static void imt::base::dff::runtime::RuntimeTimer::killTimer |
( |
TimerHandle & |
timerToKill | ) |
|
|
static |
Kill an existing timer.
In case the timer is not active anymore, the timerHandle will be set to invalid.
- Parameters
-
timerToKill | Handle of the timer to kill. |
◆ process1msTick()
static void imt::base::dff::runtime::RuntimeTimer::process1msTick |
( |
| ) |
|
|
static |
Process the 1ms tick in order to fire active timers if they are expired.
This function is usually called by the hardware specific implementation of the runtime.
◆ startOneShotTimer()
Starts or restarts the given one shot timer.
In case of invalid parameters, timerToStart is set to an invalid time handle.
- Parameters
-
apHandle | Receiving activeObject. |
timerToStart | Handle of the timer to start. |
timerTicksMs | Timer delay in milliseconds. |
◆ startPeriodicTimer()
Starts a periodic timer.
In case of invalid parameters, an invalid time handle is returned.
- Parameters
-
apHandle | Receiving activeObject. |
timerToStart | Handle of the timer to start. |
intervalMs | Timer interval in milliseconds (has to be > 0). |
◆ updatePeriodicTimer()
static void imt::base::dff::runtime::RuntimeTimer::updatePeriodicTimer |
( |
TimerHandle const |
timerToUpdate, |
|
|
uint32_t const |
intervalMs |
|
) |
| |
|
static |
Update the intervalMs of an active periodic timer.
- Parameters
-
timerToUpdate | Handle of the Timer to start. |
intervalMs | Timer interval in milliseconds. |
◆ TIMERHANDLE_INVALID
TimerHandle const imt::base::dff::runtime::RuntimeTimer::TIMERHANDLE_INVALID = 0 |
|
static |
Constant which represents an invalid timer handle.
The documentation for this class was generated from the following file: