Timeout manager¶
Timeout manager allows application to call specific function at desired time. It is used in middleware (and can be used by application too) to poll active connections.
Note
Callback function is called from processing thread. It is not allowed to call any blocking API function from it.
When application registers timeout, it needs to set timeout, callback function and optional user argument. When timeout elapses, GSM middleware will call timeout callback.
This feature can be considered as single-shot software timer.
-
group
LWGSM_TIMEOUT Timeout manager.
Typedefs
-
typedef void (*
lwgsm_timeout_fn)(void *arg)¶ Timeout callback function prototype.
- Parameters
[in] arg: Custom user argument
Functions
-
lwgsmr_t
lwgsm_timeout_add(uint32_t time, lwgsm_timeout_fn fn, void *arg)¶ Add new timeout to processing list.
-
lwgsmr_t
lwgsm_timeout_remove(lwgsm_timeout_fn fn)¶ Remove callback from timeout list.
-
typedef void (*