Collaboration diagram for Association Data Store:Data Structures | |
| struct | s_ZAF_ADS_SecurityHighestClass_t |
Macros | |
| #define | ZAF_ADS_HEADER_SIZE 4 |
| #define | ZAF_ADS_ELEMENT_SIZE 20 |
| #define | ZAF_ADS_STORAGE_SIZE(num_elements) (ZAF_ADS_HEADER_SIZE + (num_elements) * ZAF_ADS_ELEMENT_SIZE) |
| #define | ZAF_ADS_STORAGE(name, num_elements) union { void *align; uint8_t storage[ZAF_ADS_STORAGE_SIZE(num_elements)]; } name |
Typedefs | |
| typedef void * | ZAF_ADS_Handle_t |
Functions | |
| ZAF_ADS_Handle_t | ZAF_ADS_Init (void *pStorage, uint8_t MaxNodeCount) |
| bool | ZAF_ADS_Delete (ZAF_ADS_Handle_t handle, uint8_t NodeID) |
| e_ZAF_ADS_SecurityHighestClassState_t | ZAF_ADS_GetNodeHighestSecurityClass (ZAF_ADS_Handle_t handle, uint8_t NodeID, security_key_t *pHighestClass) |
| bool | ZAF_ADS_SetNodeHighestSecurityClass (ZAF_ADS_Handle_t handle, uint8_t NodeID, security_key_t HighestClass) |
| e_ZAF_ADS_CC_Capability_t | ZAF_ADS_IsNodeSupportingCC (ZAF_ADS_Handle_t handle, uint8_t NodeID, e_ZAF_ADS_CommandClass_t commandClass) |
| bool | ZAF_ADS_SetNodeIsSupportingCC (ZAF_ADS_Handle_t handle, uint8_t NodeID, e_ZAF_ADS_CommandClass_t commandClass, e_ZAF_ADS_CC_Capability_t CC_Capability) |
| #define ZAF_ADS_ELEMENT_SIZE 20 |
| #define ZAF_ADS_HEADER_SIZE 4 |
| #define ZAF_ADS_STORAGE | ( | name, | |
| num_elements ) union { void *align; uint8_t storage[ZAF_ADS_STORAGE_SIZE(num_elements)]; } name |
Allocates storage at a word boundary (or any other boundary if needed)
Please see ZAF_ADS_Init.
| #define ZAF_ADS_STORAGE_SIZE | ( | num_elements | ) | (ZAF_ADS_HEADER_SIZE + (num_elements) * ZAF_ADS_ELEMENT_SIZE) |
| typedef void* ZAF_ADS_Handle_t |
Type to use when defining a handle for the ADS functions.
The handle is assigned by calling ZAF_ADS_Init.
Defines the states of a highest security class discovery.
| bool ZAF_ADS_Delete | ( | ZAF_ADS_Handle_t | handle, |
| uint8_t | NodeID ) |
Removes all information related to a NodeID in the data store.
| handle | ADS handle returned from ZAF_ADS_Init. |
| NodeID | Node ID to remove. |
| e_ZAF_ADS_SecurityHighestClassState_t ZAF_ADS_GetNodeHighestSecurityClass | ( | ZAF_ADS_Handle_t | handle, |
| uint8_t | NodeID, | ||
| security_key_t * | pHighestClass ) |
Returns the highest security class for a given NodeID.
| handle | ADS handle returned from ZAF_ADS_Init. |
| NodeID | Node ID of which the highest security class must be read. |
| pHighestClass | Pointer to variable where the highest security class must be written. |
| ZAF_ADS_Handle_t ZAF_ADS_Init | ( | void * | pStorage, |
| uint8_t | MaxNodeCount ) |
Initializes the Association Data Store.
This function must be invoked before all the other ADS functions.
| pStorage | Pointer to allocated storage by ZAF_ADS_STORAGE. The name given in ZAF_ADS_STORAGE is what must be supplied as this argument. |
| MaxNodeCount | MaxNodeCount should be set to the max number of nodes that can be associated in controlling association groups. A controlling group is one that can transmit set or get commands. If an application has one controlling group that sends Basic Set, and the group can contain 5 associations, the MaxNodeCount should be set to 5. |
This value must match the number of elements given in ZAF_ADS_STORAGE.
| e_ZAF_ADS_CC_Capability_t ZAF_ADS_IsNodeSupportingCC | ( | ZAF_ADS_Handle_t | handle, |
| uint8_t | NodeID, | ||
| e_ZAF_ADS_CommandClass_t | commandClass ) |
Returns whether a node supports a given CC or not.
| handle | ADS handle returned from ZAF_ADS_Init. |
| NodeID | Node ID of which the check is made. |
| commandClass | Command class to check support for. |
| bool ZAF_ADS_SetNodeHighestSecurityClass | ( | ZAF_ADS_Handle_t | handle, |
| uint8_t | NodeID, | ||
| security_key_t | HighestClass ) |
Sets the highest security class of a node.
| handle | ADS handle returned from ZAF_ADS_Init. |
| NodeID | Node ID of which the highest security class must be set. |
| HighestClass | Security class to be set as the highest. |
| bool ZAF_ADS_SetNodeIsSupportingCC | ( | ZAF_ADS_Handle_t | handle, |
| uint8_t | NodeID, | ||
| e_ZAF_ADS_CommandClass_t | commandClass, | ||
| e_ZAF_ADS_CC_Capability_t | CC_Capability ) |
Sets whether a given node supports a given CC.
| handle | ADS handle returned from ZAF_ADS_Init. |
| NodeID | Node ID of which the given CC must be set. |
| commandClass | CC that is discovered. |
| CC_Capability | State of the support. |