tsCLD_PPCallBackMessage
For a Power Profile 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_PPCallBackMessage structure:
typedef struct
{
uint8 u8CommandId;
#ifdef PP_CLIENT
bool bIsInfoAvailable;
#endif
union
{
tsCLD_PP_PowerProfileReqPayload *psPowerProfileReqPayload;
tsCLD_PP_GetPowerProfilePriceExtendedPayload
*psGetPowerProfilePriceExtendedPayload;
} uReqMessage;
union
{ tsCLD_PP_GetPowerProfilePriceRspPayload *psGetPowerProfilePriceRspPayload;
tsCLD_PP_GetOverallSchedulePriceRspPayload
*psGetOverallSchedulePriceRspPayload;
tsCLD_PP_EnergyPhasesSchedulePayload *psEnergyPhasesSchedulePayload;
tsCLD_PP_PowerProfileScheduleConstraintsPayload
*psPowerProfileScheduleConstraintsPayload;
tsCLD_PP_PowerProfilePayload *psPowerProfilePayload;
tsCLD_PP_PowerProfileStatePayload *psPowerProfileStatePayload;
}uRespMessage;
} tsCLD_PPCallBackMessage;
where:
u``8CommandIdindicates the type of Power Profile command that has been received, one of:E_CLD_PP_CMD_POWER_PROFILE_REQ
E_CLD_PP_CMD_ POWER_PROFILE_STATE_REQ
E_CLD_PP_CMD_GET_POWER_PROFILE_PRICE_RSP
E_CLD_PP_CMD_GET_POWER_PROFILE_PRICE_EXTENDED_RSP
E_CLD_PP_CMD_GET_OVERALL_SCHEDULE_PRICE_RSP
E_CLD_PP_CMD_ENERGY_PHASES_SCHEDULE_NOTIFICATION
E_CLD_PP_CMD_ENERGY_PHASES_SCHEDULE_RSP
E_CLD_PP_CMD_GET_POWER_PROFILE_SCHEDULE_CONSTRAINTS_REQ
E_CLD_PP_CMD_ENERGY_PHASES_SCHEDULE_STATE_REQ
E_CLD_PP_CMD_POWER_PROFILE_NOTIFICATION
E_CLD_PP_CMD_POWER_PROFILE_RSP
E_CLD_PP_CMD_POWER_PROFILE_STATE_RSP
E_CLD_PP_CMD_POWER_PROFILE_STATE_NOTIFICATION
E_CLD_PP_CMD_GET_POWER_PROFILE_PRICE
E_CLD_PP_CMD_GET_OVERALL_SCHEDULE_PRICE
E_CLD_PP_CMD_ENERGY_PHASES_SCHEDULE_REQ
E_CLD_PP_CMD_ENERGY_PHASES_SCHEDULE_STATE_RSP
E_CLD_PP_CMD_ENERGY_PHASES_SCHEDULE_STATE_NOTIFICATION
E_CLD_PP_CMD_SCHEDULE_CONSTRAINTS_NOTIFICATION
E_CLD_PP_CMD_GET_POWER_PROFILE_SCHEDULE_CONSTRAINTS_RSP
E_CLD_PP_CMD_GET_POWER_PROFILE_PRICE_EXTENDED
bIsInfoAvailableis a client-only boolean field which indicates whether the appropriate type of information (to which the event relates) is held on the client:TRUE if the information type is held on the client, FALSE otherwise
uReqMessageis a union containing the command payload for a request, as one of (depending on the value ofu8CommandId):psPowerProfileReqPayloadis a pointer to the payload of a Power Profile Request, a Get Power Profile Schedule Constraints Request, an Energy Phases Schedule Request, an Energy Phases Schedule State Request or a Get Power Profile Price Request (see Section 21.10.5).psGetPowerProfilePriceExtendedPayloadis a pointer to the payload of a Get Power Profile Price Extended Request (see Section 21.10.8).
uRespMessageis a union containing the command payload for a response or notification, as one of (depending on the value ofu8CommandId):psGetPowerProfilePriceRspPayloadis a pointer to the payload of a Get Power Profile Price Response or a Get Power Profile Price Extended Response (see Section 21.10.9)psGetOverallSchedulePriceRspPayloadis a pointer to the payload of a Get Overall Schedule Price Response (seeSection 21.10.10).psEnergyPhasesSchedulePayloadis a pointer to the payload of an Energy Phases Schedule Response, an Energy Phases Schedule State Response, an Energy Phases Schedule Notification or an Energy Phases Schedule State Notification (see Section 21.6).psPowerProfileScheduleConstraintsPayloadis a pointer to the payload of a Power Profile Schedule Constraints Response or a Power Profile Schedule Constraints Notification (see Section 21.10.10).psPowerProfilePayloadis a pointer to the payload of a Power Profile Response or a Power Profile Notification (see Section 21.10.4).psPowerProfileStatePayloadis a pointer to the payload of a Power Profile State Response or a Power Profile State Notification (see Section 21.10.5).
Note: The command payload for each command type is indicated in Table 30 and Table 31 in Section 21.6.
Parent topic:Structures