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:
eEventTypeis the Simple Metering event type from those listed in Section42.10.7u8CommandIdis 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
uMessageis a union containing the command payload in one of the following forms (depending on the command specified in the fieldu8CommandId):s``GetProfileResponseCommandis a structure containing the payload of a ‘Get Profile’ response - see Section 42.11.9sRequestFastPollResponseCommandis a structure containing the payload of a ‘Fast Polling’ response (for future use)sGetProfileCommandis a structure containing the payload of a ‘Get Profile’ request - see Section 42.11.8sRequestMirrorResponseCommandis a structure containing the payload of an ‘Add Mirror’ response - see Section 42.11.6sMirrorRemovedResponseCommandis a structure containing the payload of an ‘Remove Mirror’ response - see Section 42.11.7sRequestFastPollCommandis a structure containing the payload of an ‘Fast Polling’ request (for future use)sErroris a structure containing the details of an error condition - see Section 42.11.10
Parent topic:Structures