(Multi Channel) Association#

CC Association and CC Multi Channel Association enable application level control of other devices.

For instance, a wall switch can control an LED bulb if an association to the LED bulb is created in the wall switch. Another example could be a motion sensor that turns on an LED bulb when motion is detected. Such associations can be created using either Association Set or Multi Channel Association Set.

Both CCs share a common module that stores the actual associations.

The specifications of CC Association and CC Multi Channel Association can be found in https://github.com/Z-Wave-Alliance/AWG/tree/main/source/management_command_classes/command_class_definitions

Modules#

ASSOCIATION_GROUP

ASSOCIATION_GROUP_PACKED

SAssociationInfo

Enumerations#

enum
NODE_LIST_STATUS_SUCCESS = 0
NODE_LIST_STATUS_NO_MORE_NODES
NODE_LIST_STATUS_ASSOCIATION_LIST_EMPTY
NODE_LIST_STATUS_ERROR_LIST
NODE_LIST_STATUS_ERR_NO_TABLE_ENDPOINT
NODE_LIST_STATUS_ERR_UNKNOWN_PROFILE
NODE_LIST_STATUS_ERR_ENDPOINT_OUT_OF_RANGE
NODE_LIST_STATUS_ERR_GROUP_NBR_NOT_LEGAL
NODE_LIST_STATUS_ERR_LIFELINE_PROFILE_NOT_SUPPORTED
NODE_LIST_STATUS_ERR_LIFELINE_SUPPORT_NOT_CC_BASIC
NODE_LIST_STATUS_ERR_PROFILE_LIFELINE_ONLY_SUPPORT_IN_GRP_1
}

Enum type NODE_LIST_STATUS is used for return status on API call AGI_NodeIdListGetNext.

Typedefs#

Functions#

handleAssociationGetnodeList(uint8_t groupId, uint8_t ep, destination_info_t **ppListOfNodes, uint8_t *pListLen)

Delivers a list of nodes in a given association group corresponding to a given endpoint.

AssociationRemove(uint8_t groupId, uint8_t ep, ZW_MULTI_CHANNEL_ASSOCIATION_REMOVE_1BYTE_V2_FRAME *pCmd, uint8_t cmdLength)

Removes all nodes or given node(s) from all groups or a given group.

void
AssociationGet(uint8_t endpoint, uint8_t *incomingFrame, uint8_t *outgoingFrame, uint8_t *outgoingFrameLength)

Handles an incoming (Multi Channel) Association Get command and composes a (Multi Channel) Association Report.

bool
AssociationAddNode(uint8_t groupID, uint8_t endpoint, MULTICHAN_DEST_NODE_ID *pNode, bool multiChannelAssociation)

Associates a given node in the given group for a given endpoint.

void
AssociationGetDestinationInit(destination_info_t *pFirstDestination)

Initializes the fetching of nodes before e.g.

bool
AssociationGetBitAdressingDestination(destination_info_t **ppNodeList, uint8_t *pListLength, destination_info_t *pNode)

Outputs a node where associations to multiple endpoints of that node exist.

uint32_t

Returns the number of associations after the bit addressing destinations are removed.

Returns the address of the next association like an iterator.

uint8_t

Returns the number of endpoint destinations in the active node association list.

uint8_t

Returns the latest used association group.

ReqNodeList(AGI_PROFILE const *const pProfile, cc_group_t const *const pCurrentCmdGrp, const uint8_t sourceEndpoint)

Returns TX options containing a list of nodes found in the association group that matches the given AGI profile, command class / command pair and source endpoint.

handleAssociationSet(uint8_t ep, ZW_MULTI_CHANNEL_ASSOCIATION_SET_1BYTE_V2_FRAME *pCmd, uint8_t cmdLength, uint8_t commandClass)

Handler for Association Set command.

Macros#

#define
FREE_VALUE 0x00FF
#define

Invalid group ID.

#define

LIFELINE group ID.

#define

The only allowed endpoint of the Lifeline group!

#define
ZAF_FILE_SIZE_ASSOCIATIONINFO (sizeof(SAssociationInfo))

Enumeration Documentation#

NODE_LIST_STATUS#

NODE_LIST_STATUS

Enum type NODE_LIST_STATUS is used for return status on API call AGI_NodeIdListGetNext.

Enum types from NODE_LIST_STATUS_SUCCESS to NODE_LIST_STATUS_ERROR_LIST deliver status on the call and after NODE_LIST_STATUS_ERROR_LIST deliver an error identifiers pointing to a problem in application AGI/association configuarion.

Enumerator
NODE_LIST_STATUS_SUCCESS
NODE_LIST_STATUS_NO_MORE_NODES
NODE_LIST_STATUS_ASSOCIATION_LIST_EMPTY
NODE_LIST_STATUS_ERROR_LIST

enum values higher than this is error identifiers

NODE_LIST_STATUS_ERR_NO_TABLE_ENDPOINT
NODE_LIST_STATUS_ERR_UNKNOWN_PROFILE
NODE_LIST_STATUS_ERR_ENDPOINT_OUT_OF_RANGE
NODE_LIST_STATUS_ERR_GROUP_NBR_NOT_LEGAL
NODE_LIST_STATUS_ERR_LIFELINE_PROFILE_NOT_SUPPORTED
NODE_LIST_STATUS_ERR_LIFELINE_SUPPORT_NOT_CC_BASIC
NODE_LIST_STATUS_ERR_PROFILE_LIFELINE_ONLY_SUPPORT_IN_GRP_1

Definition at line 44 of file /mnt/raid/workspaces/ws.WDdsgIAV6/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/Association/inc/association_plus_base.h

Typedef Documentation#

SAssociationInfo#

typedef struct SAssociationInfo SAssociationInfo

Definition at line 35 of file /mnt/raid/workspaces/ws.WDdsgIAV6/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/Association/inc/association_plus_file.h

Function Documentation#

CC_Association_Init#

void CC_Association_Init (void)
Parameters
N/A

Remarks

  • Must be invoked by CC_Association.c only


Definition at line 74 of file /mnt/raid/workspaces/ws.WDdsgIAV6/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/Association/inc/association_plus_base.h

CC_Association_Reset#

void CC_Association_Reset (void)
Parameters
N/A

Remarks

  • Must be invoked by CC_Association.c only


Definition at line 81 of file /mnt/raid/workspaces/ws.WDdsgIAV6/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/Association/inc/association_plus_base.h

handleAssociationGetnodeList#

NODE_LIST_STATUS handleAssociationGetnodeList (uint8_t groupId, uint8_t ep, destination_info_t **ppListOfNodes, uint8_t *pListLen)

Delivers a list of nodes in a given association group corresponding to a given endpoint.

Parameters
[in]groupId

Association group ID.

[in]ep

Endpoint.

[out]ppListOfNodes

is out double-pointer of type MULTICHAN_NODE_ID deliver node list

[out]pListLen

length of list

Returns

  • enum type NODE_LIST_STATUS


Definition at line 91 of file /mnt/raid/workspaces/ws.WDdsgIAV6/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/Association/inc/association_plus_base.h

AssociationRemove#

e_cmd_handler_return_code_t AssociationRemove (uint8_t groupId, uint8_t ep, ZW_MULTI_CHANNEL_ASSOCIATION_REMOVE_1BYTE_V2_FRAME *pCmd, uint8_t cmdLength)

Removes all nodes or given node(s) from all groups or a given group.

Parameters
[in]groupId

Association group ID.

[in]ep

Multi Channel Endpoint.

[in]pCmd