|
Unify Framework Lib 1.7.0
|
Attribute timeout/callback helper component. More...
Typedefs | |
| typedef void(* | attribute_timeout_callback_t) (attribute_store_node_t) |
| Function prototype callback functions. More... | |
Functions | |
| sl_status_t | attribute_timeout_set_callback (attribute_store_node_t node, clock_time_t duration, attribute_timeout_callback_t callback_function) |
| Sets a callback to be called after a duration for an attribute. More... | |
| bool | attribute_timeout_is_callback_active (attribute_store_node_t node, attribute_timeout_callback_t callback_function) |
| Checks if a node/callback pair is active. More... | |
| sl_status_t | attribute_timeout_cancel_callback (attribute_store_node_t node, attribute_timeout_callback_t callback_function) |
| Cancels a callback to be called after a duration for an attribute. More... | |
| sl_status_t | attribute_timeouts_init () |
| Initializes the Unify attribute timeouts component. More... | |
| int | attribute_timeouts_teardown () |
| Teardown the Unify attribute timeouts component. More... | |
Attribute timeout/callback helper component.
This module provides timers that invoke callbacks for a particular attribute in the Attribute Store.
| typedef void(* attribute_timeout_callback_t) (attribute_store_node_t) |
Function prototype callback functions.
| sl_status_t attribute_timeout_cancel_callback | ( | attribute_store_node_t | node, |
| attribute_timeout_callback_t | callback_function | ||
| ) |
Cancels a callback to be called after a duration for an attribute.
| node | The attribute store node to inspect after the duration. |
| callback_function | The function to invoke for the attribute node inspection. |
| bool attribute_timeout_is_callback_active | ( | attribute_store_node_t | node, |
| attribute_timeout_callback_t | callback_function | ||
| ) |
Checks if a node/callback pair is active.
| node | The attribute store node to inspect after the duration. |
| callback_function | The function to invoke for the attribute node inspection. |
| sl_status_t attribute_timeout_set_callback | ( | attribute_store_node_t | node, |
| clock_time_t | duration, | ||
| attribute_timeout_callback_t | callback_function | ||
| ) |
Sets a callback to be called after a duration for an attribute.
There can be only one node/callback_function combination active at a time. It means that for example, calling the API in the following sequence:
Will lead to only 1 call of function1 in 1000ms from now.
As another example, calling the API in the following sequence:
Will lead to 3 function calls:
| node | The attribute store node to inspect after the duration. |
| duration | The time in ms for the duration to wait. |
| callback_function | The function to invoke for the attribute node inspection. |
| sl_status_t attribute_timeouts_init | ( | ) |
Initializes the Unify attribute timeouts component.
| int attribute_timeouts_teardown | ( | ) |
Teardown the Unify attribute timeouts component.