tsSM_CallBackMessage

For a Simple Metering 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 tsSM_CallBackMessage structure which contains the Simple Metering parameters:

typedef struct
{
     teSM_CallBackEventType eEventType;
      uint8 u8CommandId;
  union
    {
     tsSM_GetProfileResponseCommand    sGetProfileResponseCommand;
     tsSM_RequestFastPollResponseCommand  sRequestFastPollResponseCommand;
     tsSM_GetProfileRequestCommand    sGetProfileCommand;
     tsSM_RequestMirrorResponseCommand   sRequestMirrorResponseCommand;
     tsSM_MirrorRemovedResponseCommand   sMirrorRemovedResponseCommand;
     tsSM_RequestFastPollCommand     sRequestFastPollCommand;
     tsSM_Error           sError;
 }uMessage;
}tsSM_CallBackMessage; 

where:

  • eEventType is the Simple Metering event type from those listed in Section42.10.7

  • u8CommandId is the identifier of the type of Simple Metering command received. This field is only valid for the following Simple Metering event types:

    • E_CLD_SM_CLIENT_RECEIVED_COMMAND - enumerated commands are provided, as described in Section 42.10.8

    • E_CLD_SM_SERVER_RECEIVED_COMMAND - enumerated commands are provided, as described in Section 42.10.9

  • uMessage is a union containing the command payload in one of the following forms (depending on the command specified in the field u8CommandId):

    • s``GetProfileResponseCommand is a structure containing the payload of a ‘Get Profile’ response - see Section 42.11.9

    • sRequestFastPollResponseCommand is a structure containing the payload of a ‘Fast Polling’ response (for future use)

    • sGetProfileCommand is a structure containing the payload of a ‘Get Profile’ request - see Section 42.11.8

    • sRequestMirrorResponseCommand is a structure containing the payload of an ‘Add Mirror’ response - see Section 42.11.6

    • sMirrorRemovedResponseCommand is a structure containing the payload of an ‘Remove Mirror’ response - see Section 42.11.7

    • sRequestFastPollCommand is a structure containing the payload of an ‘Fast Polling’ request (for future use)

    • sError is a structure containing the details of an error condition - see Section 42.11.10

Parent topic:Structures