Trident IoT Z-Wave SDK
 
Loading...
Searching...
No Matches
CC_UserCode.h File Reference

Handler for Command Class User Code. More...

#include <CC_Common.h>
+ Include dependency graph for CC_UserCode.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  SUserCode
 
struct  s_CC_userCode_data_t_
 
struct  cc_user_code_event_validate_data_t
 

Macros

#define USERCODE_MIN_LEN   4
 
#define USERCODE_MAX_LEN   10
 
#define CC_USER_CODE_EVENT_VALIDATE   1
 
#define CC_USER_CODE_EVENT_VALIDATE_VALID   2
 
#define CC_USER_CODE_EVENT_VALIDATE_INVALID   3
 

Typedefs

typedef user_id_status_t USER_ID_STATUS
 
typedef struct SUserCode SUserCode
 
typedef struct s_CC_userCode_data_t_ s_CC_userCode_data_t
 

Enumerations

enum  user_id_status_t {
  USER_ID_AVAILABLE = 0x00 ,
  USER_ID_OCCUPIED = 0x01 ,
  USER_ID_RESERVED = 0x02 ,
  USER_ID_NO_STATUS = 0xFE
}
 

Functions

e_cmd_handler_return_code_t CC_UserCode_Set_handler (uint8_t identifier, USER_ID_STATUS id, uint8_t *pUserCode, uint8_t len, uint8_t endpoint)
 The User Code Set Command used to set a User Code in the device.
 
bool CC_UserCode_getId_handler (uint8_t identifier, USER_ID_STATUS *pId, uint8_t endpoint)
 The User Code Get ID.
 
bool CC_UserCode_Report_handler (uint8_t identifier, uint8_t *pUserCode, size_t *pLen, uint8_t endpoint)
 The User Code Report Command can be used by e.g. a door lock device to send a report either unsolicited or requested by the User Code Get Command.
 
uint8_t CC_UserCode_UsersNumberReport_handler (uint8_t endpoint)
 The Users Number Report Command used to report the maximum number of USER CODES the given node supports. The Users Number Report Command can be send requested by the Users Number Get Command.
 
void CC_UserCode_reset_data (void)
 Resets the data used by the command class.
 
JOB_STATUS CC_UserCode_SupportReport (AGI_PROFILE *pProfile, uint8_t sourceEndpoint, uint8_t userIdentifier, uint8_t userIdStatus, uint8_t *pUserCode, uint8_t userCodeLen, void(*pCallback)(TRANSMISSION_RESULT *pTransmissionResult))
 Send a Command Class User code support report.
 

Detailed Description

Handler for Command Class User Code.

The purpose of the User Code Command Class is to supply a enabled Door Lock Device with a command class to manage user codes.

User Identifier (8 bits).

The User Identifier used to recognise the user identity. The User Identifier values MUST be a sequence starting from 1. This field can be ignored in case the node only supports one User Code. Setting the User Identifier to 0 will address all User Identifiers available in the device.

USER_CODE1, USER_CODEn.

These fields contain the user code. Minimum code length is 4 and maximum 10 ASCII digits. The number of data fields transmitted can be determined from the length field returned by the ApplicationCommandHandler. The user code fields MUST be initialize to 0x00 0x00 0x00 0x00 (4 bytes) when User ID Status is equal to 0x00.