Alarm#
This module includes the platform abstraction for the alarm service.
Functions#
Set the alarm to fire at aDt
microseconds after aT0
.
Stop the alarm.
Get the current time.
Signal that the alarm has fired.
Set the alarm to fire at aDt
milliseconds after aT0
.
Stop the alarm.
Get the current time.
Signal that the alarm has fired.
Signal diagnostics module that the alarm has fired.
Function Documentation#
otPlatAlarmMicroStartAt#
void otPlatAlarmMicroStartAt (otInstance * aInstance, uint32_t aT0, uint32_t aDt)
Set the alarm to fire at aDt
microseconds after aT0
.
[in] | aInstance | The OpenThread instance structure. |
[in] | aT0 | The reference time. |
[in] | aDt | The time delay in microseconds from |
For aT0
, the platform MUST support all values in [0, 2^32-1]. For aDt
, the platform MUST support all values in [0, 2^31-1].
62
of file include/openthread/platform/alarm-micro.h
otPlatAlarmMicroStop#
void otPlatAlarmMicroStop (otInstance * aInstance)
Stop the alarm.
[in] | aInstance | The OpenThread instance structure. |
69
of file include/openthread/platform/alarm-micro.h
otPlatAlarmMicroGetNow#
uint32_t otPlatAlarmMicroGetNow (void )
Get the current time.
N/A |
The current time MUST represent a free-running timer. When maintaining current time, the time value MUST utilize the entire range [0, 2^32-1] and MUST NOT wrap before 2^32.
Returns
The current time in microseconds.
79
of file include/openthread/platform/alarm-micro.h
otPlatAlarmMicroFired#
void otPlatAlarmMicroFired (otInstance * aInstance)
Signal that the alarm has fired.
[in] | aInstance | The OpenThread instance structure. |
86
of file include/openthread/platform/alarm-micro.h
otPlatAlarmMilliStartAt#
void otPlatAlarmMilliStartAt (otInstance * aInstance, uint32_t aT0, uint32_t aDt)
Set the alarm to fire at aDt
milliseconds after aT0
.
[in] | aInstance | The OpenThread instance structure. |
[in] | aT0 | The reference time. |
[in] | aDt | The time delay in milliseconds from |
For aT0
the platform MUST support all values in [0, 2^32-1]. For aDt
, the platform MUST support all values in [0, 2^31-1].
65
of file include/openthread/platform/alarm-milli.h
otPlatAlarmMilliStop#
void otPlatAlarmMilliStop (otInstance * aInstance)
Stop the alarm.
[in] | aInstance | The OpenThread instance structure. |
72
of file include/openthread/platform/alarm-milli.h
otPlatAlarmMilliGetNow#
uint32_t otPlatAlarmMilliGetNow (void )
Get the current time.
N/A |
The current time MUST represent a free-running timer. When maintaining current time, the time value MUST utilize the entire range [0, 2^32-1] and MUST NOT wrap before 2^32.
Returns
The current time in milliseconds.
82
of file include/openthread/platform/alarm-milli.h
otPlatAlarmMilliFired#
void otPlatAlarmMilliFired (otInstance * aInstance)
Signal that the alarm has fired.
[in] | aInstance | The OpenThread instance structure. |
89
of file include/openthread/platform/alarm-milli.h
otPlatDiagAlarmFired#
void otPlatDiagAlarmFired (otInstance * aInstance)
Signal diagnostics module that the alarm has fired.
[in] | aInstance | The OpenThread instance structure. |
96
of file include/openthread/platform/alarm-milli.h