Structures

Attribute Set Structures

The following structures contain the Commissioning cluster attribute sets and are detailed in the referenced sections:

Parent topic:Structures

tsCLD_Commissioning_RestartDevicePayload

The following structure contains the payload of a Restart Device command.

typedef struct
{
    zbmap8                  u8Options;
    uint8                   u8Delay;
    uint8                   u8Jitter;
} tsCLD_Commissioning_RestartDevicePayload;

where:

u8Options is a 8-bit bitmap specifying the required start-up options:

Bits

Option

Description

0-2

Start-up Mode

Determines the starting state of the device restart:

  • 0b000: Restart with current Start-up Parameter values

  • 0b001: Restart from existing stack state

All other values are reserved.

| |3|Immediate|Determines how quickly the start-up procedure will begin follow-ing receipt of the command or the specified delay/jitter:

  • 1: Immediately

  • 0: At a convenient moment (e.g. following any pending actions)

| |4-7|-|Reserved|

u8Delay specifies the time-delay, in seconds, before the start-up procedure should be executed. 
u8Jitter is a value which determines the possible range of values of the jitter that is added to the delay u8Delay - the jitter, in milliseconds, is a random value in the range 0 to u8Jitter x 80.

Parent topic:Structures

tsCLD_Commissioning_ModifyStartupParametersPayload

The following structure contains the payload of the following commands: Save Start-up Parameters, Restore Start-up Parameters and Reset Start-up Parameters.

typedef struct
{
    zbmap8                  u8Options;
    uint8                   u8Index;
} tsCLD_Commissioning_ModifyStartupParametersPayload;

where:

u8Options is an 8-bit bitmap specifying the required reset options for the Reset Start-up Parameters command (it is not used by the other commands):

Bits

Option

Description

0

Reset Current

Determines whether the current Start-up Parameters will be reset to their default values:

  • 1: Reset to default values

  • 0: Do not reset (remain unchanged)

| |1|Reset All|Determines whether all stored Start-up Parameter sets will be reset to their default values:

  • 1: Reset all stored Start-up Parameter sets

  • 0: Reset the stored Start-up Parameter set with specified index

| |2|Erase Index|Determines whether the stored Start-up Parameter set with speci-fied index will be erased:

  • 1: Erase Start-up Parameter set with specified index

  • 0: Do not erase Start-up Parameter set with specified index

| |3-7|-|Reserved|

u8Index is the index of the saved Start-up Parameter set to which actions specified in u8Options relate (this index is ignored if no actions are specified).

Parent topic:Structures

tsCLD_Commissioning_ResponsePayload

The following structure contains the payload of the responses to the following commands: Save Start-up Parameters, Restore Start-up Parameters and Reset Start-up Parameters.

typedef struct
{
    zenum8                  u8Status;
} tsCLD_Commissioning_ResponsePayload; 

where u8Status contains one of the ZCL command status codes listed and described in Section 7.1.4.

Parent topic:Structures

tsCLD_CommissioningCustomDataStructure

The Commissioning cluster requires extra storage space to be allocated to be used by internal functions. The structure definition for this storage is shown below:

typedef struct
{
    tsZCL_ReceiveEventAddress              sReceiveEventAddress;
    tsZCL_CallBackEvent                    sCustomCallBackEvent;
    tsCLD_CommissioningCallBackMessage     sCallBackMessage;
} tsCLD_CommissioningCustomDataStructure;

The fields are for internal use and no knowledge of them is required.

Parent topic:Structures

tsCLD_CommissioningCallBackMessage

For a Commissioning event, the eEventType field of the tsZCL_CallBackEvent structure is set to E_ZCL_CBET_CLUSTER_CUSTOM. This event structure also contains an element sClusterCustomMessage, which is itself a structure containing a field pvCustomData. This field is a pointer to the following tsCLD_CommissioningCallBackMessage structure:

typedef struct
{
    uint8                      u8CommandId;
    union
    {
        tsCLD_Commissioning_RestartDevicePayload                    
                              *psRestartDevicePayload;
        tsCLD_Commissioning_ModifyStartupParametersPayload          
                              *psModifyStartupParamsPayload; 
    } uReqMessage;
    union
    {
        tsCLD_Commissioning_ResponsePayload                         
                              *psCommissioningResponsePayload; 
    } uRespMessage;
} tsCLD_CommissioningCallBackMessage;

where:

  • u8CommandId indicates the type of Commissioning command that has been received by a cluster server or client (the same enumerations are used for requests on the server and responses on the client), one of:

    • E_CLD_COMMISSIONING_CMD_RESTART_DEVICE

    • E_CLD_COMMISSIONING_CMD_SAVE_STARTUP_PARAMS

    • E_CLD_COMMISSIONING_CMD_RESTORE_STARTUP_PARAMS

    • E_CLD_COMMISSIONING_CMD_RESET_STARTUP_PARAMS

  • uReqMessage is a union containing the payload of a request command in the following form:

    • psRestartDevicePayload is a pointer to a structure containing the Restart Device command payload - see Section 43.9.2

    • psModifyStartupParamsPayload is a pointer to a structure containing the (common) payload for the Save Start-up Parameters, Restore Start-up Parameters and Reset Start-up Parameters commands - see Section43.9.3

  • uRespMessage is a union containing the payload of a response command in the following form:

    • psCommissioningResponsePayload is a pointer to a structure containing the (common) payload for the Save Start-up Parameters, Restore Start-up Parameters and Reset Start-up Parameters responses - see Section 43.9.4

For further information on Commissioning cluster events, refer to Section 43.6.

Parent topic:Structures

Parent topic:Commissioning Cluster