Structures

tsCLD_ApplianceStatisticsCallBackMessage

For an Appliance Statistics 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_ApplianceStatisticsCallBackMessage structure:

typedef struct
{
    uint8    u8CommandId;
    union
    {
       tsCLD_ASC_LogNotificationORLogResponsePayload                       
                                   *psLogNotificationORLogResponsePayload;
       tsCLD_ASC_LogQueueResponseORStatisticsAvailablePayload               
                                   *psLogQueueResponseORStatisticsAvailabePayload;
       tsCLD_ASC_LogRequestPayload *psLogRequestPayload;
    } uMessage;
} tsCLD_ApplianceStatisticsCallBackMessage; 

where:

  • u``8CommandId indicates the type of Appliance Statistics command that has been received, one of:

    • E_CLD_APPLIANCE_STATISTICS_CMD_LOG_REQUEST

    • E_CLD_APPLIANCE_STATISTICS_CMD_LOG_QUEUE_REQUEST

    • E_CLD_APPLIANCE_STATISTICS_CMD_LOG_NOTIFICATION

    • E_CLD_APPLIANCE_STATISTICS_CMD_LOG_RESPONSE

    • E_CLD_APPLIANCE_STATISTICS_CMD_LOG_QUEUE_RESPONSE

    • E_CLD_APPLIANCE_STATISTICS_CMD_STATISTICS_AVAILABLE

  • u``Message is a union containing the command payload as one of (depending on the value of u8CommandId):

    • psLogNotificationORLogResponsePayload is a pointer to the payload of a ‘Log Notification’ or ‘Log Response’ message (see Section48.9.3)

    • psLogQueueResponseORStatisticsAvailabePayload is a pointer to the payload of a ‘Log Queue Response’ or ‘Statistics Available’ message (see Section 48.9.4)

    • psLogRequestPayload is a pointer to the payload of a ‘Log Request’ message (see Section 48.9.2)

Parent topic:Structures

tsCLD_ASC_LogRequestPayload

This structure contains the payload for the ‘Log Request’ message.

typedef struct
{
    zuint32   u32LogId;
} tsCLD_ASC_LogRequestPayload;

where u32LogId is the identifier of the data log being requested.

Parent topic:Structures

tsCLD_ASC_LogNotificationORLogResponsePayload

This structure contains the payload for the ‘Log Notification’ and ‘Log Response’ messages.

typedef struct
{
    zutctime    utctTime;
    zuint32     u32LogId;
    zuint32     u32LogLength;
    uint8      *pu8LogData;
} tsCLD_ASC_LogNotificationORLogResponsePayload;

where:

  • utctTime is the UTC time at which the reported log was produced

  • u32LogId is the identifier of the reported log

  • u32LogLength is the length, in bytes, of the reported log

  • pu8LogData is a pointer to an area of memory to receive the data of the reported log

Parent topic:Structures

tsCLD_ASC_LogQueueResponseORStatisticsAvailablePayload

This structure contains the payload for the ‘Log Queue Response’ and ‘Statistics Available’ messages.

typedef struct
{
    zuint8     u8LogQueueSize;
    zuint32   *pu32LogId;
} tsCLD_ASC_LogQueueResponseORStatisticsAvailablePayload;

where:

  • u8LogQueueSize indicates the number of logs currently in the log queue

  • pu32LogId is a pointer to an area of memory to receive the sequence of 32-bit log IDs of the logs in the queue

Parent topic:Structures

tsCLD_LogTable

This structure is used to store the details of a data log.

typedef struct
{
    zutctime    utctTime;
    uint32      u32LogID;
    uint8       u8LogLength;
    uint8      *pu8LogData;
} tsCLD_LogTable;

where:

  • utctTime is the UTC time at which the log was produced

  • u32LogId is the identifier of the log

  • u32LogLength is the length, in bytes, of the log

  • pu8LogData is a pointer to an area of memory to receive the data of the log

Parent topic:Structures

tsCLD_ApplianceStatisticsCustomDataStructure

The Appliance Statistics 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_ApplianceStatisticsCallBackMessage sCallBackMessage;
#if (defined CLD_APPLIANCE_STATISTICS) && (defined APPLIANCE_STATISTICS_SERVER)
    tsCLD_LogTable asLogTable[CLD_APPLIANCE_STATISTICS_ATTR_LOG_QUEUE_MAX_SIZE];
#endif
} tsCLD_ApplianceStatisticsCustomDataStructure;

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

Parent topic:Structures

Parent topic:Appliance Statistics Cluster