Zigbee Protocol Controller 1.6.0
|
Attribute transition helper component. More...
Functions | |
sl_status_t | attribute_start_transition (attribute_store_node_t node, clock_time_t duration) |
Starts a transition from the REPORTED to the DESIRED value of an attribute following the indicated duration. More... | |
sl_status_t | attribute_start_fixed_transition (attribute_store_node_t node, attribute_store_node_value_state_t value_type, float target_value, float step, clock_time_t step_interval) |
Start attribute transition with a fixed step, target value and interval. More... | |
sl_status_t | attribute_stop_transition (attribute_store_node_t node) |
Stops an ongoing transition for an attribute. More... | |
bool | is_attribute_transition_ongoing (attribute_store_node_t node) |
Verifies if a transition is ongoing for an attribute. More... | |
clock_time_t | attribute_transition_get_remaining_duration (attribute_store_node_t node) |
Retrieves the remaining time for a transition. More... | |
sl_status_t | attribute_transitions_init () |
Initializes the Unify attribute transition component. More... | |
int | attribute_transitions_teardown () |
Teardown the Unify attribute transition component. More... | |
Attribute transition helper component.
Component that performs linear value transitions respecting a given duration for attributes, between the REPORTED and DESIRED values of an Attribute Store attribute.
sl_status_t attribute_start_fixed_transition | ( | attribute_store_node_t | node, |
attribute_store_node_value_state_t | value_type, | ||
float | target_value, | ||
float | step, | ||
clock_time_t | step_interval | ||
) |
Start attribute transition with a fixed step, target value and interval.
This function starts an attribute transition on the desired or reported value of an attribute attribute. The target value, step and interval is given up front. The transition can be canceled using attribute_stop_transition.
The transition is signed such that it can be both upwards or downwards. If the value is changed such that the step would move the value away from the target value, the transition will stop. Then transition will always end on the target value.
node | Attribute node to start the transition on |
value_type | Move the DESIRED or REPORTED value. |
target_value | Target value to reach |
step | Which step ot take in the transition |
step_interval | Number of ms beteween each step |
sl_status_t attribute_start_transition | ( | attribute_store_node_t | node, |
clock_time_t | duration | ||
) |
Starts a transition from the REPORTED to the DESIRED value of an attribute following the indicated duration.
If a transition is already ongoing for that attribute node, it will be stopped and a new transition will be started.
node | The attribute store node value to transition. The type of the value of must be uint32_t. |
duration | The time that the duration must take. |
sl_status_t attribute_stop_transition | ( | attribute_store_node_t | node | ) |
Stops an ongoing transition for an attribute.
If a transition is already ongoing for that attribute node, it will be stopped and a new transition will be started.
node | The attribute store node for which the transition must be stopped, if ongoing |
clock_time_t attribute_transition_get_remaining_duration | ( | attribute_store_node_t | node | ) |
Retrieves the remaining time for a transition.
node | The attribute store node to retrieve the remaining duration |
sl_status_t attribute_transitions_init | ( | ) |
Initializes the Unify attribute transition component.
int attribute_transitions_teardown | ( | ) |
Teardown the Unify attribute transition component.
bool is_attribute_transition_ongoing | ( | attribute_store_node_t | node | ) |
Verifies if a transition is ongoing for an attribute.
node | The attribute store node to check for ongoing transitions |