#include <zwave_tx_groups_internal.hpp>
◆ zwave_tx_groups()
| zwave_tx_groups::zwave_tx_groups |
( |
| ) |
|
◆ ~zwave_tx_groups()
| zwave_tx_groups::~zwave_tx_groups |
( |
| ) |
|
◆ add_node_to_group()
Forces to add a NodeID to a group.
This should be used only to restore groups, at initialization time.
- Parameters
-
| node_id | NodeID to be added to the GroupID |
| group_id | the Group ID to add the NodeID. |
- Returns
- SL_STATUS_OK if the group was updated or created with the NodeID. SL_STATUS_FAIL otherwize
◆ analyze_group_suitability()
Tells how suitable is a group reuse for a node list.
- Parameters
-
| [in] | nodes | List of nodes to fit into a group. |
| [in] | group_nodes | List of nodes already present in a group |
| [out] | common_nodes | The number of common nodes in both lists. |
- Returns
- SL_STATUS_NOT_AVAILABLE : This group must not be used for this node list. SL_STATUS_ALREADY_EXISTS: Group node list and node list are identical, so no need for any group modification SL_STATUS_OK: The group can be expanded to fit the node list.
◆ assign_group()
Assigns/returns a Group ID to the list of NodeIDs.
The following checks are performed:
- Are the nodes all included with the same protocol
- Do the nodes share the same highest granted class (S0/Non-secure are accepted)
- Parameters
-
| nodes | Nodemask for the list of nodes for which a GroupID is needed. |
| [out] | group_id | the Group ID assigned for the list of nodes. |
- Returns
- SL_STATUS_OK if the group was created/found and returned in the group_id pointer. SL_STATUS_FAIL if the nodes cannot be part of the same group and the group_id variable is not to be used.
◆ create_or_update_group()
Adds this group into the group list. If the Group ID is already in use update the existing group.
- Parameters
-
| new_group | Group object to add/update in the group list. |
- Returns
- SL_STATUS_OK
◆ get_group_data()
Returns the group data for a group.
- Parameters
-
| [out] | group_data | Pointer to return group data. |
| [in] | group_id | Group ID for which the data is to be returned |
- Returns
- SL_STATUS_OK if the data was written out to the group_data SL_STATUS_NOT_FOUND if the Group ID is not part of the group list.
◆ get_most_similar_subgroup()
Finds the best group to use or reuse for a given node list.
- Parameters
-
| nodes | List of nodes to fit into a group. |
- Returns
- The GroupID that is best to reuse for the node list. Returns ZWAVE_TX_INVALID_GROUP if no groups matches, and a brand new group should be created for this list.
◆ get_next_group_to_reuse()
Uses the next_group_id_to_reuse to re-use a already used group that is not currently locked.
- Returns
- ZWAVE_TX_INVALID_GROUP if all groups are locked and none can be reused.
◆ get_nodes()
Returns the list of NodeIDs part of a group.
- Parameters
-
| [out] | nodes | Nodemask for the list of nodes that are part of a group |
| group_id | The Group ID for which we want the list of nodes. |
- Returns
- SL_STATUS_OK if the list of nodes was copied to the nodes nodemask. SL_STATUS_NOT_FOUND if the GroupID is empty or does not exist.
◆ increment_next_group_id()
| void zwave_tx_groups::increment_next_group_id |
( |
| ) |
|
|
private |
Increments the next_group_id_to_reuse private variable and makes sure to roll around when we reached MAXIMUM_ZWAVE_TX_GROUP_ID.
◆ is_group_locked()
Verifies if a group is locked.
- Parameters
-
| group_id | The multicast group id to verify |
- Returns
- true if the group is locked. false if the group does not exist or is unlocked.
◆ is_node_list_empty()
Verify if a node list is empty.
- Parameters
-
| [in] | nodes | List of nodes to check. |
- Returns
- true if emtpy, false if at least 1 node is in the node mask
◆ lock_group()
Instructs the Z-Wave TX Group not to alter the list of NodeIDs part of a group, until the group is unlocked again.
This function should be called when before transmitting the first Multicast message. The unlock function should be called after the last follow up has been sent out.
- Parameters
-
| group_id | The multicast group to lock for changes. |
- Returns
- SL_STATUS_OK if the group is locked. SL_STATUS_FAIL if there is an issue with the Group ID.
◆ log()
Logs the content / state of the group using sl_log.
- Parameters
-
| group_id | The multicast group to log |
◆ unlock_group()
Instructs the Z-Wave TX Group that the list of NodeIDs part of a group can be modified.
This function should be called when before transmitting the first Multicast message. The unlock function should be called after the last follow up has been sent out.
- Parameters
-
| group_id | The multicast group to unlock and allow to be updated |
- Returns
- SL_STATUS_OK if the group is unlocked. SL_STATUS_FAIL if there is an error with the Group ID.
◆ groups
◆ next_group_id_to_reuse
The documentation for this class was generated from the following file: