Server Functions
The following Poll Control cluster functions can be used on a cluster server only:
eCLD_PollControlUpdate
teZCL_Status eCLD_PollControlUpdate(void);
Description
This function can be used on a cluster server to update the timing status for the following periodic activities:
polling of the parent for a data packet
‘check-ins’ with the client to check for a required change in the poll mode
The function should be called once per quarter-second and the application should provide a 250-ms timer to prompt these function calls.
Any poll or check-in that is due when this function is called are automatically performed by the cluster server.
Parameters
None
Returns
E_ZCL_SUCCESS
E_ZCL_FAIL
Parent topic:Server Functions
eCLD_PollControlSetAttribute
teZCL_Status eCLD_PollControlSetAttribute(
uint8 u8SourceEndPointId,
uint8 u8AttributeId,
uint32 u32AttributeValue);*
Description
This function can be used on a cluster server to write to an attribute of the Poll Control cluster. The function writes to the relevant field of the tsCLD_PollControlstructure (detailed in Section 20.2). The attribute to be accessed is specified using its attribute identifier - enumerations are provided (see Section 20.8.1).
Therefore, this function can be used to change the configuration of the Poll Control cluster. The change takes effect immediately. So, for example, if the End Device is in normal poll mode when the ‘long poll interval’ is modified, the polling period is immediately re-timed to the new value. If the modified attribute is not related to the currently operating poll mode, the change is implemented the next time the relevant poll mode is started.
The specified value of the attribute is validated by the function. If this value is out-of-range for the attribute, the status E_ZCL_ERR_INVALID_VALUE is returned.
Parameters
u8SourceEndPointId: Number of local endpoint on which cluster resides
u8AttributeId : Identifier of attribute to be written to (see Section 20.8.1)
u32AttributeValue: Value to be written to attribute
Returns
E_ZCL_SUCCESS
E_ZCL_FAIL
E_ZCL_ERR_INVALID_VALUE
E_ZCL_DENY_ATTRIBUTE_ACCESS
Parent topic:Server Functions
eCLD_PollControlUpdateSleepInterval
teZCL_Status eCLD_PollControlUpdateSleepInterval(
uint32 u32QuarterSecondsAsleep);
Description
This function can be used on a cluster server to provide the updated ticks back into PollControl cluster for the time the device was sleeping in terms of quarter second.
This function updates the Checkin period based on the ticks provided.
Parameters
u32QuarterSecondsAsleep: Number of Quarter seconds the device has slept for
Returns
E_ZCL_SUCCESS
E_ZCL_ERR_PARAMETER_NULL
E_ZCL_ERR_EP_RANGE
E_ZCL_ERR_CLUSTER_NOT_FOUND
Parent topic:Server Functions
Parent topic:Functions