Z-Wave Protocol Controller Reference
Association Command Classes helpers

Utils/Helpers for Association Command Classes. More...

Collaboration diagram for Association Command Classes helpers:

Functions

attribute_store_node_t get_group_child_node (zwave_node_id_t node_id, zwave_endpoint_id_t endpoint_id, association_group_id_t group_id, attribute_store_type_t type)
 Get the Attribute store node of a certain type under an association Group ID. More...
 
attribute_store_node_t get_group_content_node (zwave_node_id_t node_id, zwave_endpoint_id_t endpoint_id, association_group_id_t group_id)
 Finds the Attribute Store Node for the group content. More...
 
association_group_count_t get_number_of_groups (zwave_node_id_t node_id, zwave_endpoint_id_t endpoint_id)
 Returns how many groups are supported by an endpoint. More...
 
association_group_capacity_t get_group_capacity (zwave_node_id_t node_id, zwave_endpoint_id_t endpoint_id, association_group_id_t group_id)
 Checks in the attribute store the maximum number of associations for a group. More...
 
sl_status_t add_desired_association (zwave_node_id_t node_id, zwave_endpoint_id_t endpoint_id, association_group_id_t group_id, association_t association)
 Adds a desired association in a group in the Attribute Store. More...
 
sl_status_t add_reported_association (zwave_node_id_t node_id, zwave_endpoint_id_t endpoint_id, association_group_id_t group_id, association_t association)
 Adds a reported association in a group in the Attribute Store. More...
 
sl_status_t force_add_desired_association (zwave_node_id_t node_id, zwave_endpoint_id_t endpoint_id, association_group_id_t group_id, association_t new_association)
 Adds a desired association in a group in the Attribute Store and remove an existing association if needed. More...
 
sl_status_t remove_desired_association (zwave_node_id_t node_id, zwave_endpoint_id_t endpoint_id, association_group_id_t group_id, association_t association)
 Removes a desired association in a group in the Attribute Store. More...
 
sl_status_t remove_reported_association (zwave_node_id_t node_id, zwave_endpoint_id_t endpoint_id, association_group_id_t group_id, association_t association)
 Removes a reported association in a group in the Attribute Store. More...
 
sl_status_t remove_all_desired_associations (zwave_node_id_t node_id, zwave_endpoint_id_t endpoint_id, association_group_id_t group_id)
 Removes all desired association in a group in the Attribute Store. It will set the attribute to an ASSOCIATION_MARKER byte. More...
 
sl_status_t remove_all_reported_associations (zwave_node_id_t node_id, zwave_endpoint_id_t endpoint_id, association_group_id_t group_id)
 Removes all reported association in a group in the Attribute Store. It will set the attribute to an ASSOCIATION_MARKER byte. More...
 
sl_status_t remove_all_reported_node_id_associations (zwave_node_id_t node_id, zwave_endpoint_id_t endpoint_id, association_group_id_t group_id)
 Removes all reported NodeID associations in a group in the Attribute Store. More...
 
bool is_reported_group_full (zwave_node_id_t node_id, zwave_endpoint_id_t endpoint_id, association_group_id_t group_id)
 Checks if the reported value of an association group is full. More...
 
bool is_desired_group_full (zwave_node_id_t node_id, zwave_endpoint_id_t endpoint_id, association_group_id_t group_id)
 Checks if the desired value of an association group is full. More...
 
bool is_association_in_group (zwave_node_id_t node_id, zwave_endpoint_id_t endpoint_id, association_group_id_t group_id, association_t association)
 Checks if an association is already part of a group. More...
 
void remove_desired_node_id_from_all_associations_in_network (zwave_node_id_t node_id)
 Attempts to remove a NodeID for all associations groups in the current network. More...
 
void add_desired_association_in_all_groups (zwave_node_id_t node_id, zwave_endpoint_id_t endpoint_id, association_t association)
 Attempts to add an Association for all associations groups for a given NodeID/Ep. More...
 
void remove_desired_association_in_all_groups (zwave_node_id_t node_id, zwave_endpoint_id_t endpoint_id, association_t association)
 Attempts to remove an Association for all associations groups for a given NodeID/Ep. More...
 
void remove_desired_node_id_from_all_associations (zwave_node_id_t node_id_to_remove, zwave_node_id_t node_id, zwave_endpoint_id_t endpoint_id)
 Attempts to remove a NodeID for all associations groups for a given NodeID/Ep. More...
 

Detailed Description

Utils/Helpers for Association Command Classes.

This module provides some utilities helping with functionalities relating to the Association command classes

Function Documentation

◆ add_desired_association()

sl_status_t add_desired_association ( zwave_node_id_t  node_id,
zwave_endpoint_id_t  endpoint_id,
association_group_id_t  group_id,
association_t  association 
)

Adds a desired association in a group in the Attribute Store.

Parameters
node_idZ-Wave Node ID
endpoint_idZ-Wave Endpoint ID
group_idAssociation Group ID
associationThe Association object to add
Returns
SL_STATUS_OK if accepted. SL_STATUS_FAIL in case of error

◆ add_desired_association_in_all_groups()

void add_desired_association_in_all_groups ( zwave_node_id_t  node_id,
zwave_endpoint_id_t  endpoint_id,
association_t  association 
)

Attempts to add an Association for all associations groups for a given NodeID/Ep.

Parameters
node_idZ-Wave Node ID for which the association groups get added an association
endpoint_idEndpoint for which the association groups get added an association
associationThe Association object to add

◆ add_reported_association()

sl_status_t add_reported_association ( zwave_node_id_t  node_id,
zwave_endpoint_id_t  endpoint_id,
association_group_id_t  group_id,
association_t  association 
)

Adds a reported association in a group in the Attribute Store.

Parameters
node_idZ-Wave Node ID
endpoint_idZ-Wave Endpoint ID
group_idAssociation Group ID
associationThe Association object to add
Returns
SL_STATUS_OK if accepted. SL_STATUS_FAIL in case of error

◆ force_add_desired_association()

sl_status_t force_add_desired_association ( zwave_node_id_t  node_id,
zwave_endpoint_id_t  endpoint_id,
association_group_id_t  group_id,
association_t  new_association 
)

Adds a desired association in a group in the Attribute Store and remove an existing association if needed.

Parameters
node_idZ-Wave Node ID
endpoint_idZ-Wave Endpoint ID
group_idAssociation Group ID
new_associationThe Association object to add
Returns
SL_STATUS_OK if accepted. SL_STATUS_FAIL in case of error

◆ get_group_capacity()

association_group_capacity_t get_group_capacity ( zwave_node_id_t  node_id,
zwave_endpoint_id_t  endpoint_id,
association_group_id_t  group_id 
)

Checks in the attribute store the maximum number of associations for a group.

Parameters
node_idZ-Wave Node ID
endpoint_idZ-Wave Endpoint ID
group_idAssociation Group identifier
Returns
0 in case of error. Else the maximum number of associations for the group.

◆ get_group_child_node()

attribute_store_node_t get_group_child_node ( zwave_node_id_t  node_id,
zwave_endpoint_id_t  endpoint_id,
association_group_id_t  group_id,
attribute_store_type_t  type 
)

Get the Attribute store node of a certain type under an association Group ID.

Parameters
node_idNodeID to find in the attribute store
endpoint_idEndpoint ID to find under the NodeID
group_idGroup ID to find under the Endpoint ID
typeAttribute Store node type requested under the
Returns
attribute_store_node_t

◆ get_group_content_node()

attribute_store_node_t get_group_content_node ( zwave_node_id_t  node_id,
zwave_endpoint_id_t  endpoint_id,
association_group_id_t  group_id 
)

Finds the Attribute Store Node for the group content.

Parameters
node_idZ-Wave Node ID
endpoint_idZ-Wave Endpoint ID
group_idAssociation Group identifier
Returns
attribute_store_node_t for the group content. ATTRIBUTE_STORE_INVALID_NODE if it was not found.

◆ get_number_of_groups()

association_group_count_t get_number_of_groups ( zwave_node_id_t  node_id,
zwave_endpoint_id_t  endpoint_id 
)

Returns how many groups are supported by an endpoint.

Parameters
node_idZ-Wave Node ID
endpoint_idZ-Wave Endpoint ID
Returns
The number of supported association groups for the endpoint. 0 in case of error.

◆ is_association_in_group()

bool is_association_in_group ( zwave_node_id_t  node_id,
zwave_endpoint_id_t  endpoint_id,
association_group_id_t  group_id,
association_t  association 
)

Checks if an association is already part of a group.

Parameters
node_idZ-Wave Node ID
endpoint_idZ-Wave Endpoint ID
group_idAssociation Group ID
associationThe Association object to look for
Returns
true if the association is already in the group, false otherwise

◆ is_desired_group_full()

bool is_desired_group_full ( zwave_node_id_t  node_id,
zwave_endpoint_id_t  endpoint_id,
association_group_id_t  group_id 
)

Checks if the desired value of an association group is full.

Parameters
node_idZ-Wave Node ID
endpoint_idZ-Wave Endpoint ID
group_idAssociation Group ID
Returns
True if no more association can be established

◆ is_reported_group_full()

bool is_reported_group_full ( zwave_node_id_t  node_id,
zwave_endpoint_id_t  endpoint_id,
association_group_id_t  group_id 
)

Checks if the reported value of an association group is full.

Parameters
node_idZ-Wave Node ID
endpoint_idZ-Wave Endpoint ID
group_idAssociation Group ID
Returns
True if no more association can be established

◆ remove_all_desired_associations()

sl_status_t remove_all_desired_associations ( zwave_node_id_t  node_id,
zwave_endpoint_id_t  endpoint_id,
association_group_id_t  group_id 
)

Removes all desired association in a group in the Attribute Store. It will set the attribute to an ASSOCIATION_MARKER byte.

Parameters
node_idZ-Wave Node ID
endpoint_idZ-Wave Endpoint ID
group_idAssociation Group ID
Returns
SL_STATUS_OK if accepted. SL_STATUS_FAIL in case of error

◆ remove_all_reported_associations()

sl_status_t remove_all_reported_associations ( zwave_node_id_t  node_id,
zwave_endpoint_id_t  endpoint_id,
association_group_id_t  group_id 
)

Removes all reported association in a group in the Attribute Store. It will set the attribute to an ASSOCIATION_MARKER byte.

Parameters
node_idZ-Wave Node ID
endpoint_idZ-Wave Endpoint ID
group_idAssociation Group ID
Returns
SL_STATUS_OK if accepted. SL_STATUS_FAIL in case of error

◆ remove_all_reported_node_id_associations()

sl_status_t remove_all_reported_node_id_associations ( zwave_node_id_t  node_id,
zwave_endpoint_id_t  endpoint_id,
association_group_id_t  group_id 
)

Removes all reported NodeID associations in a group in the Attribute Store.

Parameters
node_idZ-Wave Node ID
endpoint_idZ-Wave Endpoint ID
group_idAssociation Group ID
Returns
SL_STATUS_OK if accepted. SL_STATUS_FAIL in case of error

◆ remove_desired_association()

sl_status_t remove_desired_association ( zwave_node_id_t  node_id,
zwave_endpoint_id_t  endpoint_id,
association_group_id_t  group_id,
association_t  association 
)

Removes a desired association in a group in the Attribute Store.

Parameters
node_idZ-Wave Node ID
endpoint_idZ-Wave Endpoint ID
group_idAssociation Group ID
associationThe Association object to remove
Returns
SL_STATUS_OK if accepted. SL_STATUS_NOT_FOUND if the association was not set for the destination.

◆ remove_desired_association_in_all_groups()

void remove_desired_association_in_all_groups ( zwave_node_id_t  node_id,
zwave_endpoint_id_t  endpoint_id,
association_t  association 
)

Attempts to remove an Association for all associations groups for a given NodeID/Ep.

Parameters
node_idZ-Wave Node ID for which the association groups get added an association
endpoint_idEndpoint for which the association groups get added an association
associationThe Association object to add

◆ remove_desired_node_id_from_all_associations()

void remove_desired_node_id_from_all_associations ( zwave_node_id_t  node_id_to_remove,
zwave_node_id_t  node_id,
zwave_endpoint_id_t  endpoint_id 
)

Attempts to remove a NodeID for all associations groups for a given NodeID/Ep.

Parameters
node_id_to_removeZ-Wave Node ID to remove from a given NodeID/Endpoint
node_idZ-Wave Node ID for which the association groups get cleaned up
endpoint_idEndpoint for which the association groups get cleaned up

◆ remove_desired_node_id_from_all_associations_in_network()

void remove_desired_node_id_from_all_associations_in_network ( zwave_node_id_t  node_id)

Attempts to remove a NodeID for all associations groups in the current network.

Parameters
node_idZ-Wave Node ID to remove from any and all association groups

◆ remove_reported_association()

sl_status_t remove_reported_association ( zwave_node_id_t  node_id,
zwave_endpoint_id_t  endpoint_id,
association_group_id_t  group_id,
association_t  association 
)

Removes a reported association in a group in the Attribute Store.

Parameters
node_idZ-Wave Node ID
endpoint_idZ-Wave Endpoint ID
group_idAssociation Group ID
associationThe Association object to remove
Returns
SL_STATUS_OK if accepted. SL_STATUS_NOT_FOUND if the association was not set for the destination.