25#ifndef ZWAVE_TX_GROUPS_INTERNAL_HPP
26#define ZWAVE_TX_GROUPS_INTERNAL_HPP
65 std::set<zwave_tx_group_t, zwave_tx_group_compare>
groups;
96 uint16_t *common_nodes)
const;
Definition: zwave_tx_groups_internal.hpp:62
sl_status_t get_group_data(zwave_tx_group_t *group_data, zwave_multicast_group_id_t group_id) const
Returns the group data for a group.
zwave_multicast_group_id_t get_next_group_to_reuse()
Uses the next_group_id_to_reuse to re-use a already used group that is not currently locked.
std::set< zwave_tx_group_t, zwave_tx_group_compare > groups
Definition: zwave_tx_groups_internal.hpp:65
sl_status_t create_or_update_group(const zwave_tx_group_t &new_group)
Adds this group into the group list. If the Group ID is already in use update the existing group.
sl_status_t lock_group(zwave_multicast_group_id_t group_id)
Instructs the Z-Wave TX Group not to alter the list of NodeIDs part of a group, until the group is un...
sl_status_t assign_group(const zwave_nodemask_t nodes, zwave_multicast_group_id_t *group_id)
Assigns/returns a Group ID to the list of NodeIDs.
~zwave_tx_groups()
Class destructor.
void log(zwave_multicast_group_id_t group_id)
Logs the content / state of the group using sl_log.
sl_status_t add_node_to_group(zwave_node_id_t node_id, zwave_multicast_group_id_t group_id)
Forces to add a NodeID to a group.
bool is_group_locked(zwave_multicast_group_id_t group_id)
Verifies if a group is locked.
zwave_tx_groups()
Class constructor.
sl_status_t analyze_group_suitability(const zwave_nodemask_t nodes, const zwave_nodemask_t group_nodes, uint16_t *common_nodes) const
Tells how suitable is a group reuse for a node list.
sl_status_t unlock_group(zwave_multicast_group_id_t group_id)
Instructs the Z-Wave TX Group that the list of NodeIDs part of a group can be modified.
void increment_next_group_id()
Increments the next_group_id_to_reuse private variable and makes sure to roll around when we reached ...
bool is_node_list_empty(const zwave_nodemask_t nodes) const
Verify if a node list is empty.
zwave_multicast_group_id_t get_most_similar_subgroup(const zwave_nodemask_t nodes) const
Finds the best group to use or reuse for a given node list.
sl_status_t get_nodes(zwave_nodemask_t nodes, zwave_multicast_group_id_t group_id)
Returns the list of NodeIDs part of a group.
zwave_multicast_group_id_t next_group_id_to_reuse
Definition: zwave_tx_groups_internal.hpp:67
uint32_t sl_status_t
Definition: sl_status.h:139
uint8_t zwave_multicast_group_id_t
Definition: zwave_controller_types.h:43
uint8_t zwave_nodemask_t[ZW_LR_MAX_NODEMASK_LENGTH]
Node mask.
Definition: zwave_node_id_definitions.h:81
uint16_t zwave_node_id_t
Z-Wave NodeID type.
Definition: zwave_node_id_definitions.h:84
constexpr zwave_multicast_group_id_t MAXIMUM_ZWAVE_TX_GROUP_ID
Definition: zwave_tx_groups_internal.hpp:31
Helps to sort groups, based on their zwave_multicast_group_id_t Group ID.
Definition: zwave_tx_groups_internal.hpp:52
bool operator()(const zwave_tx_group_t &lhs, const zwave_tx_group_t &rhs) const
Definition: zwave_tx_groups_internal.hpp:53
Group data contained in a Z-Wave Tx Group.
Definition: zwave_tx_groups_internal.hpp:36
zwave_nodemask_t node_list
Node list for the group.
Definition: zwave_tx_groups_internal.hpp:40
zwave_multicast_group_id_t group_id
GroupID handle for the group. User components will use this.
Definition: zwave_tx_groups_internal.hpp:38
bool locked
Boolean indicating if the group can be modified by this component.
Definition: zwave_tx_groups_internal.hpp:42
const zwave_node_id_t node_id