Trident IoT Z-Wave SDK
 
Loading...
Searching...
No Matches
+ Collaboration diagram for UserCode:

Topics

 UserCodeEvents
 

Data Structures

struct  SUserCode
 
struct  s_CC_userCode_data_t_
 

Macros

#define USERCODE_MIN_LEN   4
 
#define USERCODE_MAX_LEN   10
 

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.
 
void CC_UserCode_Migrate ()
 
bool CC_UserCode_Write (uint8_t identifier, SUserCode *userCodeData)
 
bool CC_UserCode_Read (uint8_t identifier, SUserCode *userCodeData)
 

Detailed Description

Macro Definition Documentation

◆ USERCODE_MAX_LEN

#define USERCODE_MAX_LEN   10

Maximum length of a user code as defined in SDS12652.

◆ USERCODE_MIN_LEN

#define USERCODE_MIN_LEN   4

Minimum length of a user code as defined in SDS12652.

Typedef Documentation

◆ s_CC_userCode_data_t

Struct used to pass operational data to TSE module

◆ SUserCode

typedef struct SUserCode SUserCode

◆ USER_ID_STATUS

Enumeration Type Documentation

◆ user_id_status_t

User ID Status.

The User ID Status field indicates the state of the User Identifier. All other values not mentioned in below list are reserved for future implementation.

Hex Description
00 Available (not set)
01 Occupied
02 Reserved by administrator
FE Status not available
Enumerator
USER_ID_AVAILABLE 

Available (not set)

USER_ID_OCCUPIED 

Occupied

USER_ID_RESERVED 

Reserved by administrator

USER_ID_NO_STATUS 

Status not available

Function Documentation

◆ CC_UserCode_getId_handler()

bool CC_UserCode_getId_handler ( uint8_t identifier,
USER_ID_STATUS * pId,
uint8_t endpoint )

The User Code Get ID.

Parameters
[in]identifierUser Identifier.
[out]pIdpointer to return Id.
[in]endpointis the destination endpoint
Returns
status valid boolean.

◆ CC_UserCode_Migrate()

void CC_UserCode_Migrate ( )

◆ CC_UserCode_Read()

bool CC_UserCode_Read ( uint8_t identifier,
SUserCode * userCodeData )

◆ CC_UserCode_Report_handler()

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.

Parameters
[in]identifierUser Identifier.
[out]pUserCodepointer to UserCode data.
[out]pLenlength UserCode data.
[in]endpointis the destination endpoint
Returns
status valid boolean.

◆ CC_UserCode_reset_data()

void CC_UserCode_reset_data ( void )

Resets the data used by the command class.

◆ CC_UserCode_Set_handler()

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.

Parameters
[in]identifierUser Identifier.
[in]iduser Id status.
[in]pUserCodepointer to UserCode data.
[in]lenUserCode data.
[in]endpointis the destination endpoint
Returns
command handler return code

◆ CC_UserCode_SupportReport()

JOB_STATUS CC_UserCode_SupportReport ( AGI_PROFILE * pProfile,
uint8_t sourceEndpoint,
uint8_t userIdentifier,
uint8_t userIdStatus,
uint8_t * pUserCode,
uint8_t userCodeLen,
void(*)(TRANSMISSION_RESULT *pTransmissionResult) pCallback )

Send a Command Class User code support report.

Parameters
[in]pProfilepointer to AGI profile
[in]sourceEndpointsource endpoint
[in]userIdentifieruser identifier
[in]userIdStatususer Id status
[in]pUserCodeuser code
[in]userCodeLenlength of user code
[out]pCallbackcallback function returning status destination node receive job.
Returns
status on the job.

◆ CC_UserCode_UsersNumberReport_handler()

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.

Parameters
[in]endpointis the destination endpoint
Returns
maximum number of USER CODES.

◆ CC_UserCode_Write()

bool CC_UserCode_Write ( uint8_t identifier,
SUserCode * userCodeData )