Z-Wave Protocol Controller Reference
Association Group Information (AGI) Command Class

Association Group Information (AGI) Command Class handlers and control functions. More...

Collaboration diagram for Association Group Information (AGI) Command Class:

Classes

struct  association_group_name_report_frame
 
struct  association_group_info_report_frame
 
struct  association_group_command_list_report_frame
 

Macros

#define MAX_SUPPORTED_NODES_PER_GROUP   10
 How many groups do we support. More...
 
#define NUMBER_OF_SUPPORTED_GROUPS   1
 
#define AGI_NA_PROFILE   0x0000
 Lifeline Group ID. More...
 
#define LIFELINE_GROUP_ID   1
 
#define AGI_LIFELINE_PROFILE   0x0001
 
#define LIFELINE_NAME   "Lifeline"
 
#define AGI_RESERVED_PROFILE   0xFFFF
 
#define AGI_INFO_REPORT_GROUP_COUNT_MASK   0x3F
 Frame parsing defines. More...
 
#define MAX_GROUP_NAME_SIZE   ATTRIBUTE_STORE_MAXIMUM_VALUE_LENGTH
 

Typedefs

typedef uint32_t agi_profile_t
 
typedef struct association_group_name_report_frame association_group_name_report_frame_t
 
typedef struct association_group_info_report_frame association_group_info_report_frame_t
 
typedef struct association_group_command_list_report_frame association_group_command_list_report_frame_t
 

Functions

sl_status_t zwave_command_class_agi_init ()
 Setup fixture for the Association Group Information (AGI) Command Class. More...
 
agi_profile_t zwave_command_class_agi_get_group_profile (zwave_node_id_t node_id, zwave_endpoint_id_t endpoint_id, association_group_id_t group_id)
 Lets a component register commands that it sends via an association group. More...
 
sl_status_t zwave_command_class_agi_add_group_commands (association_group_id_t group_id, zwave_command_class_t command_class, zwave_command_t command)
 Lets a component register commands that it sends via an association group. More...
 
bool zwave_command_class_agi_is_command_allowed_for_group (association_group_id_t group_id, zwave_command_class_t command_class, zwave_command_t command)
 Verifies if a Command Class/Command pair is allowed for an Association group. More...
 
void zwave_command_class_agi_request_to_establish_association (zwave_command_class_t command_class, zwave_command_t command)
 Registers a Command Class / Command pair that we want to make sure to receive via Associations. More...
 
bool zwave_command_class_agi_group_contains_listeners (zwave_node_id_t node_id, zwave_endpoint_id_t endpoint_id, association_group_id_t group_id)
 Verifies if a Group ID under a NodeID/Endpoint sends some commands that we want to receive. More...
 

Detailed Description

Association Group Information (AGI) Command Class handlers and control functions.

Macro Definition Documentation

◆ AGI_INFO_REPORT_GROUP_COUNT_MASK

#define AGI_INFO_REPORT_GROUP_COUNT_MASK   0x3F

Frame parsing defines.

Maximum content (number of bytes) for a Association group name. This is aligned with the storage capacity of the attribute store.

◆ AGI_LIFELINE_PROFILE

#define AGI_LIFELINE_PROFILE   0x0001

◆ AGI_NA_PROFILE

#define AGI_NA_PROFILE   0x0000

Lifeline Group ID.

Not Applicable profile value, though it is used by somes nodes for the Lifeline Group

◆ AGI_RESERVED_PROFILE

#define AGI_RESERVED_PROFILE   0xFFFF

Profile that is reserved, used to indicate that no profile data is available or valid

◆ LIFELINE_GROUP_ID

#define LIFELINE_GROUP_ID   1

◆ LIFELINE_NAME

#define LIFELINE_NAME   "Lifeline"

◆ MAX_GROUP_NAME_SIZE

#define MAX_GROUP_NAME_SIZE   ATTRIBUTE_STORE_MAXIMUM_VALUE_LENGTH

◆ MAX_SUPPORTED_NODES_PER_GROUP

#define MAX_SUPPORTED_NODES_PER_GROUP   10

How many groups do we support.

< How many nodes/endpoint associations do we allow in each group. Do not set this to more than 126, the attribute store won't be able to store it.

◆ NUMBER_OF_SUPPORTED_GROUPS

#define NUMBER_OF_SUPPORTED_GROUPS   1

Typedef Documentation

◆ agi_profile_t

typedef uint32_t agi_profile_t

◆ association_group_command_list_report_frame_t

◆ association_group_info_report_frame_t

◆ association_group_name_report_frame_t

Function Documentation

◆ zwave_command_class_agi_add_group_commands()

sl_status_t zwave_command_class_agi_add_group_commands ( association_group_id_t  group_id,
zwave_command_class_t  command_class,
zwave_command_t  command 
)

Lets a component register commands that it sends via an association group.

Parameters
group_idAssociation Group Identifier
command_classCommand Class Identifier
commandCommand Identifier
Returns
SL_STATUS_OK if the command was added to the group SL_STATUS_NOT_FOUND if the Group ID is not found SL_STATUS_FAIL in case it could not be added.

◆ zwave_command_class_agi_get_group_profile()

agi_profile_t zwave_command_class_agi_get_group_profile ( zwave_node_id_t  node_id,
zwave_endpoint_id_t  endpoint_id,
association_group_id_t  group_id 
)

Lets a component register commands that it sends via an association group.

Parameters
node_idZ-Wave Node ID
endpoint_idZ-Wave Endpoint ID
group_idGrouping Identifier
Returns
AGI_RESERVED_PROFILE if no AGI information. Else the profile value.

◆ zwave_command_class_agi_group_contains_listeners()

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

Verifies if a Group ID under a NodeID/Endpoint sends some commands that we want to receive.

Parameters
node_idNodeID of the Z-Wave Node
endpoint_idEndpoint ID under which the group is located
group_idGroup ID to check
Returns
true if association should be established because we want to receive commands from that group, false otherwise

◆ zwave_command_class_agi_init()

sl_status_t zwave_command_class_agi_init ( )

Setup fixture for the Association Group Information (AGI) Command Class.

This setup function will initialize our group propertyes and register callbacks to the Attribute Store, so that it can be notified when to issue commands to the Z-Wave nodes.

Returns
SL_STATUS_OK if successful
SL_STATUS_FAIL if an error occurred
Here is the caller graph for this function:

◆ zwave_command_class_agi_is_command_allowed_for_group()

bool zwave_command_class_agi_is_command_allowed_for_group ( association_group_id_t  group_id,
zwave_command_class_t  command_class,
zwave_command_t  command 
)

Verifies if a Command Class/Command pair is allowed for an Association group.

Parameters
group_idAssociation Group Identifier
command_classCommand Class Identifier
commandCommand Identifier
Returns
true if the Command Class/Command pair is allowed false if it is not allowed

◆ zwave_command_class_agi_request_to_establish_association()

void zwave_command_class_agi_request_to_establish_association ( zwave_command_class_t  command_class,
zwave_command_t  command 
)

Registers a Command Class / Command pair that we want to make sure to receive via Associations.

The AGI/Association command classes will make sure to associate the ZPC (in a non-forceful manner, i.e. without the help of Association Remove) to any group containing the Command Class / Command pairs indicated by user components using this API.

Note: once a request is made, it cannot be undone.

Parameters
command_classCommand Class Identifier
commandCommand Identifier
Here is the caller graph for this function: