tsCLD_PPCallBackMessage

For a Poll Control 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_PollControlCallBackMessage structure:

typedef struct
{
 uint8 u8CommandId;
 union
 {
 tsCLD_PollControl_CheckinResponsePayload *psCheckinResponsePayload;
 #ifdef CLD_POLL_CONTROL_CMD_SET_LONG_POLL_INTERVAL      
 tsCLD_PollControl_SetLongPollIntervalPayload           
        *psSetLongPollIntervalPayload;
  #endif
  #ifdef CLD_POLL_CONTROL_CMD_SET_SHORT_POLL_INTERVAL    
  tsCLD_PollControl_SetShortPollIntervalPayload   
        *psSetShortPollIntervalPayload;
  #endif
 } uMessage;
} tsCLD_PollControlCallBackMessage;

where:

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

    • E_CLD_POLL_CONTROL_CMD_CHECK_IN

    • E_CLD_POLL_CONTROL_CMD_FAST_POLL_STOP

    • E_CLD_POLL_CONTROL_CMD_SET_LONG_POLL_INTERVAL

    • E_CLD_POLL_CONTROL_CMD_SET_SHORT_POLL_INTERVAL

      • If they are required, the last two commands must be enabled in the compile-time options, as described in Section 20.10.

  • uMessage is a union containing the command payload, as one of (depending on the value of u8CommandId):

    • psCheckinResponsePayload is a pointer to the payload of a ‘Check-in Response’ (see Section 20.9.2)

    • psSetLongPollIntervalPayload is a pointer to the payload of a ‘Set Long Poll Interval’ command (see Section 20.9.3)

    • psSetShortPollIntervalPayload is a pointer to the payload of a ‘Set Short Poll Interval’ command (see Section 20.9.4)

The command payload for each command type is indicated in Table 29 in Section 20.5.

Parent topic:Structures