Structures
Custom Data Structure
The Thermostat cluster requires extra storage space to be allocated for use by internal functions. The structure definition for this storage is shown below:
typedef struct
{
tsZCL_ReceiveEventAddress sReceiveEventAddress;
tsZCL_CallBackEvent sCustomCallBackEvent;
tsCLD_ThermostatCallBackMessage sCallBackMessage;
} tsCLD_ThermostatCustomDataStructure;
The fields are for internal use and no knowledge of them is required.
Parent topic:Structures
tsCLD_ThermostatCallBackMessage
For a Thermostat cluster 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_ThermostatCallBackMessage
structure:
typedef struct
{
uint8 u8CommandId;
union
{
tsCLD_Thermostat_SetpointRaiseOrLowerPayload *psSetpointRaiseOrLowerPayload;
} uMessage;
} tsCLD_ThermostatCallBackMessage;
where:
u``8CommandId
indicates the type of Thermostat cluster command that has been received - there is only one possibility: E_CLD_THERMOSTAT_CMD_SETPOINT_RAISE_LOWERu``Message
is a union containing the command payload in the following form:psSetpointRaiseOrLowerPayload
is a pointer to a structure containing the payload of a ‘Setpoint Raise Or Lower’ command - see Section 33.9.3.
Parent topic:Structures
tsCLD_Thermostat_SetpointRaiseOrLowerPayload
This stucture contains the payload of a ‘Setpoint Raise Or Lower’ command (from the cluster client) which requests a change the value of the attribute i16OccupiedHeatingSetpoint
and/or the attribute i16OccupiedCoolingSetpoint
.
typedef struct
{
zenum8 eMode;
zint8 i8Amount;
}tsCLD_Thermostat_SetpointRaiseOrLowerPayload;
where:
eMode
indicates the Thermostat operating mode to which the command relates, one of:E_CLD_THERMOSTAT_SRLM_HEAT (Heating)
E_CLD_THERMOSTAT_SRLM_COOL (Cooling)
E_CLD_THERMOSTAT_SRLM_BOTH (Heating and Cooling)
i8Amount
represents the value (in two’s complement form) by which the setpoint corresponding to the specified operating mode is to be changed
Parent topic:Structures
Parent topic:Thermostat Cluster