Structures
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``8CommandIdindicates 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.
uMessageis a union containing the command payload, as one of (depending on the value ofu8CommandId):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
tsCLD_PollControl_CheckinResponsePayload
This structure contains the payload of a ‘Check-in Response’, which is sent from the client to the server in reply to a ‘Check-in’ command from the server.
typedef struct
{
zbool bStartFastPolling;
zuint16 u16FastPollTimeout;
}tsCLD_PollControl_CheckinResponsePayload;
where:
bStartFastPollingis a boolean indicating whether or not the End Device is required to enter fast poll mode:TRUE: Enter fast poll mode
FALSE: Continue in normal poll mode
u16FastPollTimeoutis an optional fast poll mode timeout, in quarter-seconds, in the range 1 to 65535 - that is, the period of time for which the End Device should remain in fast poll mode (if this mode is requested throughbStartFastPolling). Zero is a special value which indicates that the value of the ‘fast poll timeout’ attribute should be used instead (see Section 20.2). If a non-zero value is specified then this value over-rides the ‘fast poll timeout’ attribute (but does not over-write it).
Parent topic:Structures
tsCLD_PollControl_SetLongPollIntervalPayload
This structure contains the payload of a ‘Set Long Poll Interval’ command, which is sent from the client to the server to request a new ‘long poll interval’ for use in normal poll mode.
typedef struct
{
zuint32 u32NewLongPollInterval;
}tsCLD_PollControl_SetLongPollIntervalPayload;
where u32NewLongPollInterval is the required value of the ‘long poll interval’, in quarter-seconds, in the range 4 to 7208960. This value is used to over-write the corresponding cluster attribute if the specified value is within the valid range for the attribute (including greater than or equal to the optional user-defined minimum, if set).
To use the ‘Set Long Poll Interval’ command, it must be enabled in the compile-time options, as described in Section 20.10.
Parent topic:Structures
tsCLD_PollControl_SetShortPollIntervalPayload
This structure contains the payload of a ‘Set Short Poll Interval’ command, which is sent from the client to the server to request a new ‘short poll interval’ for use in fast poll mode.
typedef struct
{
zuint16 u16NewShortPollInterval;
}tsCLD_PollControl_SetShortPollIntervalPayload;
where u16NewShortPollInterval is the required value of the ‘short poll interval’, in quarter-seconds, in the range 1 to 65535. This value is used to over-write the corresponding cluster attribute if the specified value is within the valid range for the attribute (including greater than or equal to the optional user-defined minimum, if set).
To use the ‘Set Short Poll Interval’ command, it must be enabled in the compile-time options, as described in Section 20.10.
Parent topic:Structures
tsCLD_PollControlCustomDataStructure
The Poll Control 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
{
#ifdef POLL_CONTROL_SERVER
tsCLD_PollControlParameters sControlParameters;
#endif
tsZCL_ReceiveEventAddress sReceiveEventAddress;
tsZCL_CallBackEvent sCustomCallBackEvent;
tsCLD_PollControlCallBackMessage sCallBackMessage;
} tsCLD_PollControlCustomDataStructure;
The fields are for internal use and no knowledge of them is required.
Parent topic:Structures
Parent topic:Poll Control Cluster