|
AWS IoT Embedded C Device SDK
|
Timer interface definition for MQTT client. More...
Go to the source code of this file.
Typedefs | |
| typedef struct Timer | Timer |
| Timer Type. More... | |
Functions | |
| bool | has_timer_expired (Timer *) |
| Check if a timer is expired. More... | |
| void | countdown_ms (Timer *, uint32_t) |
| Create a timer (milliseconds) More... | |
| void | countdown_sec (Timer *, uint32_t) |
| Create a timer (seconds) More... | |
| uint32_t | left_ms (Timer *) |
| Check the time remaining on a given timer. More... | |
| void | init_timer (Timer *) |
| Initialize a timer. More... | |
Defines an interface to timers that can be used by other system components. MQTT client requires timers to handle timeouts and MQTT keep alive. Starting point for porting the SDK to the timer hardware layer of a new platform.
The platform specific timer header that defines the Timer struct Forward declaration of a timer struct. The definition of this struct is platform dependent. When porting to a new platform add this definition in "timer_<platform>.h" and include that file above.
| void countdown_ms | ( | Timer * | , |
| uint32_t | |||
| ) |
Sets the timer to expire in a specified number of milliseconds.
| Timer | - pointer to the timer to be set to expire in milliseconds |
| uint32_t | - set the timer to expire in this number of milliseconds |
| void countdown_sec | ( | Timer * | , |
| uint32_t | |||
| ) |
Sets the timer to expire in a specified number of seconds.
| Timer | - pointer to the timer to be set to expire in seconds |
| uint32_t | - set the timer to expire in this number of seconds |
| bool has_timer_expired | ( | Timer * | ) |
Call this function passing in a timer to check if that timer has expired.
| Timer | - pointer to the timer to be checked for expiration |
| void init_timer | ( | Timer * | ) |
Performs any initialization required to the timer passed in.
| Timer | - pointer to the timer to be initialized |
1.8.10