Functions
The Power Profile cluster functions are described in the following three sub-sections, according to the side(s) of the cluster on which they can be used:
Server/client functions are described in Section 21.7.1
Server functions are described in Section 21.7.2
Client functions are described in Section 21.7.3
Server/Client Function
The following Power Profile cluster function can be used on either a cluster server or cluster client:
eCLD_PPCreatePowerProfile
teZCL_Status eCLD_PPCreatePowerProfile(
tsZCL_ClusterInstance *psClusterInstance,
bool_t bIsServer,
tsZCL_ClusterDefinition *psClusterDefinition,
void *pvEndPointSharedStructPtr,
uint8 *pu8AttributeControlBits,
tsCLD_PPCustomDataStructure *psCustomDataStructure);
Description
This function creates an instance of the Power Profile cluster on an endpoint. The cluster instance is created on the endpoint which is associated with the supplied tsZCL_ClusterInstance structure and can act as a server or a client, as specified.
The function should only be called when setting up a custom endpoint containing one or more selected clusters (rather than the whole set of clusters supported by a standard Zigbee device). This function creates a Power Profile cluster instance on the endpoint, but instances of other clusters may also be created on the same endpoint by calling their corresponding creation functions. For more details of creating cluster instances on custom endpoints, refer to Appendix D.
Note: This function must not be called for an endpoint on which a standard Zigbee device is used. In this case, the device and its supported clusters must be registered on the endpoint using the relevant device registration function from those described in the Zigbee Devices User Guide (JNUG3131).
When used, this function must be the first Power Profile cluster function called in the application, and must be called after the stack has been started and after the ZCL has been initialized.
The function requires an array to be declared for internal use, which contains one element (of type uint8) for each attribute of the cluster. The array length is automatically adjusted by the compiler using the following declaration:
uint8 au8PPAttributeControlBits[(sizeof(asCLD_PPClusterAttrDefs)/
sizeof(tsZCL_AttributeDefinition))];
int8 au8PPAttributeControlBits[(sizeof(asCLD_PPClusterAttrDefs)/
sizeof(tsZCL_AttributeDefinition))];
Parameters
psClusterInstance: Pointer to structure containing information about the cluster instance to be created (see Section 6.1.16). This structure is updated by the function by initializing individual structure fields.
bIsServer: Type of cluster instance (server or client) to be created:
TRUE - server
FALSE - client
psClusterDefinition: Pointer to structure indicating the type of cluster to be created (see Section 6.1.2). In this case, this structure must contain the details of the Power Profile cluster. This parameter can refer to a pre-filled structure called
sCLD_PPwhich is provided in the PowerProfile.h file.pvEndPointSharedStructPtr: Pointer to the shared structure used for attribute storage. This parameter should be the address of the structure of type
tsCLD_PP, which defines the attributes of the Power Profile cluster. The function initializes the attributes with default values.pu8AttributeControlBits: Pointer to an array of uint8 values, with one element for each attribute in the cluster (see above). For a cluster client, set this pointer to NULL.
psCustomDataStructure: Pointer to a structure containing the storage for internal functions of the cluster (see Section 21.10.14)
Returns
E_ZCL_SUCCESS
E_ZCL_FAIL
E_ZCL_ERR_PARAMETER_NULL
E_ZCL_ERR_INVALID_VALUE
Parent topic:Server/Client Function
Parent topic:Functions
Server Functions
The following Power Profile cluster functions can be used on a cluster server only:
eCLD_PPSchedule
teZCL_Status eCLD_PPSchedule(void);
Description
This function can be used on a cluster server to update the state of the currently active power profile and the timings required for scheduling. When called, the function automatically makes any required changes according to the scheduled energy phases for the power profile. If no change is scheduled, the function only updates timing information. If a change is required, it also updates the power profile state and the ID of the energy phase currently being executed.
The function should be called once per second to progress the active power profile schedule and the application should provide a 1-second timer to prompt these function calls.
Parameters
None
Returns
E_ZCL_SUCCESS
E_ZCL_FAIL
E_ZCL_ERR_PARAMETER_NULL
E_ZCL_ERR_INVALID_VALUE
Parent topic:Server Functions
eCLD_PPSetPowerProfileState
teZCL_CommandStatus eCLD_PPSetPowerProfileState(
uint8 u8SourceEndPointId,
uint8 u8PowerProfileId,
teCLD_PP_PowerProfileState sPowerProfileState);
Description
This function can be used on a cluster server to move the specified power profile to the specified target state. Enumerations for the possible states are provided, and are listed and described in Section 21.9.2.
The function performs the following checks:
Checks whether the specified Power Profile ID exists (if not, the function returns with the status E_ZCL_CMDS_NOT_FOUND)
Checks whether the specified target state is a valid state (if not, the function returns with the status E_ZCL_CMDS_INVALID_VALUE)
Checks whether the power profile is currently able move to the target state (if not, the function returns with the status E_ZCL_CMDS_INVALID_FIELD)
Note: The power profile state can be changed by this function only if the move from the existing state to the target state is a valid change.
If all the checks are successful, the move is implemented (and the function returns with the status E_ZCL_CMD_SUCCESS).
Parameters
u8SourceEndPointId: Number of local endpoint on which cluster resides
u8PowerProfileId : Identifier of the power profile
sPowerProfileState: Target state to which power profile is to be moved - enumerations are provided (see Section 21.9.2)
Returns
E_ZCL_CMD_SUCCESS
E_ZCL_CMDS_NOT_FOUND
E_ZCL_CMDS_INVALID_VALUE
E_ZCL_CMDS_INVALID_FIELD
Parent topic:Server Functions
eCLD_PPAddPowerProfileEntry
teZCL_Status eCLD_PPAddPowerProfileEntry(
uint8 u8SourceEndPointId,
tsCLD_PPEntry *psPowerProfileEntry);
Description
This function can be used on a cluster server to introduce a new power profile by adding an entry to the local power profile table.
The function checks whether there is sufficient space in the table for the new power profile entry (if not, the function returns with the status E_ZCL_ERR_INSUFFICIENT_SPACE).
An existing power profile entry can be over-written with a new profile by specifying the same Power Profile ID (in the new entry structure).
The function also updates two of the cluster attributes (if needed), as follows.
If a power profile is introduced which has multiple energy phases (as indicated by the
u8NumOfScheduledEnergyPhasesfield of thetsCLD_PPEntrystructure), the attributebMultipleSchedulingis set to TRUE (if not already TRUE)If a power profile is introduced which allows remote control for energy management (as indicated by the
bPowerProfileRemoteControlfield of thetsCLD_PPEntrystructure), the attributebEnergyRemoteis set to TRUE (if not already TRUE)
Parameters
u8SourceEndPointId: Number of local endpoint on which cluster resides:
psPowerProfileEntry : Structure containing the power profile to add (see Section 21.10.2)
Returns
E_ZCL_SUCCESS
E_ZCL_FAIL
E_ZCL_ERR_PARAMETER_NULL
E_ZCL_ERR_INSUFFICIENT_SPACE
Parent topic:Server Functions
eCLD_PPRemovePowerProfileEntry
teZCL_Status eCLD_PPRemovePowerProfileEntry(
uint8 u8SourceEndPointId,
uint8 u8PowerProfileId);
Description
This function can be used on a cluster server to remove a power profile by deleting the relevant entry in the local power profile table.
Parameters
u8SourceEndPointId: Number of local endpoint on which cluster resides:
u8PowerProfileId : Identifier of power profile to be removed
Returns
E_ZCL_SUCCESS
E_ZCL_FAIL
Parent topic:Server Functions
eCLD_PPGetPowerProfileEntry
teZCL_Status eCLD_PPGetPowerProfileEntry(
uint8 u8SourceEndPointId,
uint8 u8PowerProfileId,
tsCLD_PPEntry **ppsPowerProfileEntry);
Description
This function can be used on a cluster server to obtain an entry from the local power profile table. The required entry is specified using the relevant Power Profile ID. The function obtains a pointer to the relevant entry, if it exists - a pointer must be provided to a location to receive the pointer to the entry.
If no entry with the specified Power Profile ID is found, the function returns E_ZCL_ERR_INVALID_VALUE.
Parameters
u8SourceEndPointId: Number of local endpoint on which cluster resides
u8PowerProfileId: Identifier of power profile to be obtained
ppsPowerProfileEntry: Pointer to a location to receive a pointer to the required power profile table entry (see Section 21.10.2)
Returns
E_ZCL_SUCCESS
E_ZCL_FAIL
E_ZCL_ERR_INVALID_VALUE
Parent topic:Server Functions
eCLD_PPPowerProfileNotificationSend
teZCL_Status eCLD_PPPowerProfileNotificationSend(
uint8 u8SourceEndPointId,
uint8 u8DestinationEndPointId,
tsZCL_Address *psDestinationAddress,
uint8 *pu8TransactionSequenceNumber,
tsCLD_PP_PowerProfilePayload *psPayload);
Description
This function can be used on the cluster server to send a Power Profile Notification to a cluster client, in order to inform the client about one power profile supported by the server. The notification contains essential information about the power profile, including the energy phases supported by the profile (and certain details about them). If the server supports multiple power profiles, the function must be called for each profile separately.
On receiving the notification on the client, the event E_CLD_PP_CMD_POWER_PROFILE_NOTIFICATION is generated, containing the sent power profile information in a tsCLD_PP_PowerProfilePayload structure (see Section 21.10.4).
You are required to provide a pointer to a location to receive a Transaction Sequence Number (TSN) for the message. The TSN in the response is set to match the TSN in the request, allowing an incoming response to be paired with a request. This is useful when sending more than one request to the same destination endpoint.
Parameters
u8SourceEndPointId: Number of local endpoint on which cluster server resides
u8DestinationEndPointId : Number of remote endpoint on which cluster client resides
psDestinationAddress: Pointer to a structure containing the destination address of the client node
pu8TransactionSequenceNumber: Pointer to a location to receive the Transaction Sequence Number (TSN) of the message
psPayload: Pointer to structure containing the payload for the request (see Section 21.10.4), including essential information about the power profile
Returns
E_ZCL_SUCCESS
E_ZCL_FAIL
E_ZCL_ERR_EP_UNKNOWN
E_ZCL_ERR_ZBUFFER_FAIL
E_ZCL_ERR_ZTRANSMIT_FAIL
Parent topic:Server Functions
eCLD_PPEnergyPhaseScheduleStateNotificationSend
teZCL_Status eCLD_PPEnergyPhasesScheduleStateNotificationSend(
uint8 u8SourceEndPointId,
uint8 u8DestinationEndPointId,
tsZCL_Address *psDestinationAddress,
uint8 *pu8TransactionSequenceNumber,
tsCLD_PP_EnergyPhasesSchedulePayload
*psPayload);
Description
This function can be used on the cluster server to send an Energy Phases Schedule State Notification to a cluster client, in order to inform the client of the energy phases that are in the schedule of a particular power profile. The function is used to send an unsolicited command.
On receiving the notification on the client, the event E_CLD_PP_CMD_ENERGY_PHASES_SCHEDULE_STATE_NOTIFICATION is generated, containing the sent power profile information in a tsCLD_PP_EnergyPhasesSchedulePayload structure (see Section 21.10.6).
You are required to provide a pointer to a location to receive a Transaction Sequence Number (TSN) for the message. The TSN in the response is set to match the TSN in the request, allowing an incoming response to be paired with a request. This is useful when sending more than one request to the same destination endpoint.
Parameters
u8SourceEndPointId: Number of local endpoint on which cluster server resides
u8DestinationEndPointId: Number of remote endpoint on which cluster client resides
psDestinationAddress: Pointer to a structure containing the destination address of the client node
psDestinationAddress: Pointer to a location to receive the Transaction Sequence Number (TSN) of the message
*psPayload: Pointer to structure containing the payload for the request (see Section 21.10.6), including the identifier of the relevant power profile and the associated schedule of energy phases
Returns
E_ZCL_SUCCESS
E_ZCL_FAIL
E_ZCL_ERR_EP_UNKNOWN
E_ZCL_ERR_ZBUFFER_FAIL
E_ZCL_ERR_ZTRANSMIT_FAIL
Parent topic:Server Functions
eCLD_PPPowerProfileScheduleConstraintsNotificationSend
teZCL_Status eCLD_PPPowerProfileScheduleConstraintsNotificationSend(
uint8 u8SourceEndPointId,
uint8 u8DestinationEndPointId,
tsZCL_Address *psDestinationAddress,
uint8 *pu8TransactionSequenceNumber,
tsCLD_PP_PowerProfileScheduleConstraintsPayload
*psPayload);
Description
This function can be used on the cluster server to send a Power Profile Schedule Constraints Notification to a cluster client, in order to inform the client of the schedule restrictions on a particular power profile. The constraints are specified in a tsCLD_PP_PowerProfileScheduleConstraintsPayload structure (see Section 21.10.7). They can subsequently be used by the client in calculating the schedule for the energy phases of the power profile. The function is used to send an unsolicited command.
On receiving the notification on the client, the event E_CLD_PP_CMD_SCHEDULE_CONSTRAINTS_NOTIFICATION is generated, containing the sent power profile constraint information in a tsCLD_PP_PowerProfileScheduleConstraintsPayload structure.
You are required to provide a pointer to a location to receive a Transaction Sequence Number (TSN) for the message. The TSN in the response is set to match the TSN in the request, allowing an incoming response to be paired with a request. This is useful when sending more than one request to the same destination endpoint.
Parameters
u8SourceEndPointId: Number of local endpoint on which cluster server resides
u8DestinationEndPointId : Number of remote endpoint on which cluster client resides
psDestinationAddress: Pointer to a structure containing the destination address of the client node
pu8TransactionSequenceNumber: Pointer to a location to receive the Transaction Sequence Number (TSN) of the message
psPayload: Pointer to structure containing the payload for the request (see Section 21.10.7), including the identifier of the relevant power profile and the associated schedule constraints
Returns
E_ZCL_SUCCESS
E_ZCL_FAIL
E_ZCL_ERR_EP_UNKNOWN
E_ZCL_ERR_ZBUFFER_FAIL
E_ZCL_ERR_ZTRANSMIT_FAIL
Parent topic:Server Functions
eCLD_PPEnergyPhasesScheduleReqSend
teZCL_Status eCLD_PPEnergyPhasesScheduleReqSend(
uint8 u8SourceEndPointId,
uint8 u8DestinationEndPointId,
tsZCL_Address *psDestinationAddress,
uint8 *pu8TransactionSequenceNumber,
tsCLD_PP_PowerProfileReqPayload *psPayload);
Description
This function can be used on the cluster server to send an Energy Phases Schedule Request to a cluster client, in order to obtain the schedule of energy phases for a particular power profile.
The function is non-blocking and will return immediately. On successfully receiving an Energy Phases Schedule Response from the client, an E_CLD_PP_CMD_ENERGY_PHASE_SCHEDULE_RSP event is generated on the server, containing the requested schedule information in a tsCLD_PP_EnergyPhasesSchedulePayload structure (see Section 21.10.6). For full details of handling an Energy Phases Schedule Request, refer to Section21.5.4.1.
You are required to provide a pointer to a location to receive a Transaction Sequence Number (TSN) for the message. The TSN in the response is set to match the TSN in the request, allowing an incoming response to be paired with a request. This is useful when sending more than one request to the same destination endpoint.
Parameters
u8SourceEndPointId: Number of local endpoint on which cluster server resides:
u8DestinationEndPointId: Number of remote endpoint on which cluster client resides
psDestinationAddress: Pointer to a structure containing the destination address of the client node
pu8TransactionSequenceNumber: Pointer to a location to receive the Transaction Sequence Number (TSN) of the message
psPayload: Pointer to structure containing the payload for the request (see Section 21.10.3), including the identifier of the relevant power profile
Returns
E_ZCL_SUCCESS
E_ZCL_FAIL
E_ZCL_ERR_EP_UNKNOWN
E_ZCL_ERR_ZBUFFER_FAIL
E_ZCL_ERR_ZTRANSMIT_FAIL
Parent topic:Server Functions
eCLD_PPPowerProfileStateNotificationSend
teZCL_Status eCLD_PPEnergyPhasesScheduleStateNotificationSend(
uint8 u8SourceEndPointId,
uint8 u8DestinationEndPointId,
tsZCL_Address *psDestinationAddress,
uint8 *pu8TransactionSequenceNumber,
tsCLD_PP_EnergyPhasesSchedulePayload
*psPayload);
Description
This function can be used on the cluster server to send a Power Profile State Notification to a cluster client, in order to inform the client of the state of the power profile that is currently active on the server. The function is used to send an unsolicited command.
On receiving the notification on the client, the event E_CLD_PP_CMD_POWER_PROFILE_STATE_NOTIFICATION is generated, containing the sent power profile state information in a tsCLD_PP_PowerProfileStatePayload structure (see Section 21.10.5).
You are required to provide a pointer to a location to receive a Transaction Sequence Number (TSN) for the message. The TSN in the response is set to match the TSN in the request, allowing an incoming response to be paired with a request. This is useful when sending more than one request to the same destination endpoint.
Parameters
u8SourceEndPointId: Number of local endpoint on which cluster server resides
u8DestinationEndPointId: Number of remote endpoint on which cluster client resides
psDestinationAddress: Pointer to a structure containing the destination address of the client node
pu8TransactionSequenceNumber: Pointer to a location to receive the Transaction Sequence Number (TSN) of the message
psPayload: Pointer to structure containing the payload for the command (see Section 21.10.5), including the identifier and state of the relevant power profile
Returns
E_ZCL_SUCCESS
E_ZCL_FAIL
E_ZCL_ERR_EP_UNKNOWN
E_ZCL_ERR_ZBUFFER_FAIL
E_ZCL_ERR_ZTRANSMIT_FAIL
Parent topic:Server Functions
eCLD_PPGetPowerProfilePriceSend
teZCL_Status eCLD_PPGetPowerProfilePriceSend(
uint8 u8SourceEndPointId,
uint8 u8DestinationEndPointId,
tsZCL_Address *psDestinationAddress,
uint8 *pu8TransactionSequenceNumber,
tsCLD_PP_PowerProfileReqPayload *psPayload);
Description
This function can be used on the cluster server to send a Get Power Profile Price Request to a cluster client, in order to request the cost of executing the schedule of a particular power profile. Use of this function must be enabled in the cluster compile-time options, as described in Section 21.11.
The function is non-blocking and will return immediately. On successfully receiving a Get Power Profile Price Response from the client, an E_CLD_PP_CMD_GET_POWER_PROFILE_PRICE_RSP event is generated on the server, containing the requested price information in a tsCLD_PP_GetPowerProfilePriceRspPayload structure (see Section21.10.9). For full details of handling a Get Power Profile Price Request, refer to Section 21.5.6.1.
You are required to provide a pointer to a location to receive a Transaction Sequence Number (TSN) for the message. The TSN in the response is set to match the TSN in the request, allowing an incoming response to be paired with a request. This is useful when sending more than one request to the same destination endpoint.
Parameters
u8SourceEndPointId Number of local endpoint on which cluster server resides
u8DestinationEndPointId Number of remote endpoint on which cluster client resides
psDestinationAddress Pointer to a structure containing the destination address of the client node
pu8TransactionSequenceNumber Pointer to a location to receive the Transaction Sequence Number (TSN) of the message
psPayload Pointer to structure containing the payload for the request (see Section 21.10.5), including the identifier of the relevant power profile
Returns
E_ZCL_SUCCESS
E_ZCL_FAIL
E_ZCL_ERR_EP_UNKNOWN
E_ZCL_ERR_ZBUFFER_FAIL
E_ZCL_ERR_ZTRANSMIT_FAIL
Parent topic:Server Functions
eCLD_PPGetPowerProfilePriceExtendedSend
teZCL_Status eCLD_PPGetPowerProfilePriceExtendedSend(
uint8 u8SourceEndPointId,
uint8 u8DestinationEndPointId,
tsZCL_Address *psDestinationAddress,
uint8 *pu8TransactionSequenceNumber,
tsCLD_PP_GetPowerProfilePriceExtendedPayload
*psPayload);
Description
This function can be used on the cluster server to send a Get Power Profile Price Extended Request to a cluster client, in order to request specific cost information about a power profile supported by the server. The cost of executing a power profile can be requested with either scheduled energy phases or contiguous energy phases (no gaps between them). Use of this function must be enabled in the cluster compile-time options, as described in Section 21.11.
The function is non-blocking and will return immediately. On successfully receiving a Get Power Profile Price Extended Response from the client, an E_CLD_PP_CMD_GET_POWER_PROFILE_PRICE_EXTENDED_RSP event is generated on the server, containing the requested price information in a tsCLD_PP_GetPowerProfilePriceRspPayload structure (see Section21.10.9). For full details of handling a Get Power Profile Price Extended Request, refer to Section 21.5.6.1.
You are required to provide a pointer to a location to receive a Transaction Sequence Number (TSN) for the message. The TSN in the response is set to match the TSN in the request, allowing an incoming response to be paired with a request. This is useful when sending more than one request to the same destination endpoint.
Parameters
u8SourceEndPointId Number of local endpoint on which cluster server resides
u8DestinationEndPointId Number of remote endpoint on which cluster client resides
psDestinationAddress Pointer to a structure containing the destination address of the client node
pu8TransactionSequenceNumber Pointer to a location to receive the Transaction Sequence Number (TSN) of the message
psPayload Pointer to structure containing the payload for the request (see Section 21.10.8), including the type of price information required
Returns
E_ZCL_SUCCESS
E_ZCL_FAIL
E_ZCL_ERR_EP_UNKNOWN
E_ZCL_ERR_ZBUFFER_FAIL
E_ZCL_ERR_ZTRANSMIT_FAIL
Parent topic:Server Functions
eCLD_PPGetOverallSchedulePriceSend
teZCL_Status eCLD_PPGetOverallSchedulePriceSend(
uint8 u8SourceEndPointId,
uint8 u8DestinationEndPointId,
tsZCL_Address *psDestinationAddress,
uint8 *pu8TransactionSequenceNumber);
Description
This function can be used on the cluster server to send a Get Overall Schedule Price Request to a cluster client, in order to obtain the overall cost of all the power profiles that are executed over the next 24 hours. Use of this function must be enabled in the cluster compile-time options, as described in Section 21.11.
The function is non-blocking and will return immediately. On successfully receiving a Get Overall Schedule Price Response from the client, an E_CLD_PP_CMD_GET_OVERALL_SCHEDULE_PRICE_RSP event is generated on the server, containing the required price information in a tsCLD_PP_GetOverallSchedulePriceRspPayload structure (see Section21.10.10). For full details of handling a Get Overall Schedule Price Request, refer to Section 21.5.6.2.
You are required to provide a pointer to a location to receive a Transaction Sequence Number (TSN) for the message. The TSN in the response is set to match the TSN in the request, allowing an incoming response to be paired with a request. This is useful when sending more than one request to the same destination endpoint.
Parameters
u8SourceEndPointId: Number of local endpoint on which cluster server resides
u8DestinationEndPointId: Number of remote endpoint on which cluster client resides
psDestinationAddress: Pointer to a structure containing the destination address of the client node
pu8TransactionSequenceNumber: Pointer to a location to receive the Transaction Sequence Number (TSN) of the message
Returns
E_ZCL_SUCCESS
E_ZCL_FAIL
E_ZCL_ERR_EP_UNKNOWN
E_ZCL_ERR_ZBUFFER_FAIL
E_ZCL_ERR_ZTRANSMIT_FAIL
Parent topic:Server Functions
Parent topic:Functions
Client Functions
The following Power Profile cluster functions can be used on a cluster client only:
eCLD_PPPowerProfileRequestSend
teZCL_Status eCLD_PPPowerProfileRequestSend(
uint8 u8SourceEndPointId,
uint8 u8DestinationEndPointId,
tsZCL_Address *psDestinationAddress,
uint8 *pu8TransactionSequenceNumber,
tsCLD_PP_PowerProfileReqPayload *psPayload);
Description
This function can be used on a cluster client to send a Power Profile Request to the cluster server, in order to obtain one or more power profiles from the server. The function can be used to request a specific power profile (specified using its identifier) or all the power profiles supported by the server (specified using an identifier of zero).
The function is non-blocking and will return immediately. On receiving the server’s response, an E_CLD_PP_CMD_POWER_PROFILE_RSP event is generated on the client, containing a power profile in a tsCLD_PP_PowerProfilePayload structure (see Section 21.10.4).
When a particular Power Profile ID is specified but:
The Power Profile ID is not in the valid range, the server will send a default response of INVALID_VALUE.
The Power Profile ID is in the valid range but no data corresponding to this ID is available, the server will respond with a default response of NOT_FOUND.
When all power profiles on the server are requested, a response is received for each profile separately and, therefore, the above event is generated for each profile reported.
You are required to provide a pointer to a location to receive a Transaction Sequence Number (TSN) for the message. The TSN in the response is set to match the TSN in the request, allowing an incoming response to be paired with a request. This is useful when sending more than one request to the same destination endpoint.
Parameters
u8SourceEndPointId: Number of local endpoint on which cluster client resides:
u8DestinationEndPointId : Number of remote endpoint on which cluster server resides
psDestinationAddress: Pointer to a structure containing the destination address of the server node
pu8TransactionSequenceNumber: Pointer to a location to receive the Transaction Sequence Number (TSN) of the message
psPayload: Pointer to structure containing the payload for the request (see Section 21.10.3), including the identifier of the required power profile
Returns
E_ZCL_SUCCESS
E_ZCL_FAIL
E_ZCL_ERR_EP_UNKNOWN
E_ZCL_ERR_ZBUFFER_FAIL
E_ZCL_ERR_ZTRANSMIT_FAIL
Parent topic:Client Functions
eCLD_PPEnergyPhasesScheduleNotificationSend
teZCL_Status eCLD_PPEnergyPhasesScheduleNotificationSend(
uint8 u8SourceEndPointId,
uint8 u8DestinationEndPointId,
tsZCL_Address *psDestinationAddress,
uint8 *pu8TransactionSequenceNumber,
tsCLD_PP_EnergyPhasesSchedulePayload
*psPayload);
Description
This function can be used on a cluster client to send an Energy Phases Schedule Notification to the cluster server, in order to start the schedule of energy phases of a power profile on the server. The function is used to send an unsolicited command and should only be called if the server allows itself to be remotely controlled. The command payload specifies the identifiers of the required energy phases and includes the relative start-times of the phases (see Section 21.10.12).
On receiving the notification on the server, the event E_CLD_PP_CMD_ENERGY_PHASE_SCHEDULE_NOTIFICATION is generated, containing the sent energy phase schedule information in a tsCLD_PP_EnergyPhasesSchedulePayload structure (see Section 21.10.6). The subsequent handling of this notification is detailed in Section 21.5.4.2.
You are required to provide a pointer to a location to receive a Transaction Sequence Number (TSN) for the message. The TSN in the response is set to match the TSN in the request, allowing an incoming response to be paired with a request. This is useful when sending more than one request to the same destination endpoint.
Parameters
u8SourceEndPointId: Number of local endpoint on which cluster client resides:
u8DestinationEndPointId : Number of remote endpoint on which cluster server resides
psDestinationAddress: Pointer to a structure containing the destination address of the server node
pu8TransactionSequenceNumber: Pointer to a location to receive the Transaction Sequence Number (TSN) of the message
psPayload: Pointer to structure containing the payload for the command (see Section 21.10.6), including the scheduled energy phases and start-times
Returns
E_ZCL_SUCCESS
E_ZCL_FAIL
E_ZCL_ERR_EP_UNKNOWN
E_ZCL_ERR_ZBUFFER_FAIL
E_ZCL_ERR_ZTRANSMIT_FAIL
Parent topic:Client Functions
eCLD_PPPowerProfileStateReqSend
teZCL_Status eCLD_PPPowerProfileStateReqSend(
uint8 u8SourceEndPointId,
uint8 u8DestinationEndPointId,
tsZCL_Address *psDestinationAddress,
uint8 *pu8TransactionSequenceNumber);
Description
This function can be used on a cluster client to send a Power Profile State Request to the cluster server, in order to obtain the identifier(s) of the power profile(s) currently supported on the server.
The function is non-blocking and returns immediately. On receiving the server’s response, an E_CLD_PP_CMD_POWER_PROFILE_STATE_RSP event is generated on the client, containing the required identifier(s). The response contains the power profile records of all the supported power profiles on the server in a tsCLD_PP_PowerProfileStatePayload structure (see Section 21.10.5).
You are required to provide a pointer to a location to receive a Transaction Sequence Number (TSN) for the message. The TSN in the response is set to match the TSN in the request, allowing an incoming response to be paired with a request. This is useful when sending more than one request to the same destination endpoint.
Parameters
u8SourceEndPointId: Number of local endpoint on which cluster client resides:
u8DestinationEndPointId : Number of remote endpoint on which cluster server resides
psDestinationAddress: Pointer to a structure containing the destination address of the server node
pu8TransactionSequenceNumber: Pointer to a location to receive the Transaction Sequence Number (TSN) of the message
Returns
E_ZCL_SUCCESS
E_ZCL_FAIL
E_ZCL_ERR_EP_UNKNOWN
E_ZCL_ERR_ZBUFFER_FAIL
E_ZCL_ERR_ZTRANSMIT_FAIL
Parent topic:Client Functions
eCLD_PPEnergyPhasesScheduleStateReqSend
teZCL_Status eCLD_PPEnergyPhasesScheduleStateReqSend(
uint8 u8SourceEndPointId,
uint8 u8DestinationEndPointId,
tsZCL_Address *psDestinationAddress,
uint8 *pu8TransactionSequenceNumber,
tsCLD_PP_PowerProfileReqPayload *psPayload);
Description
This function can be used on a cluster client to send an Energy Phases Schedule State Request to the cluster server, in order to obtain the schedule of energy phases for a particular power profile on the server. The obtained schedule can be used to re-align the schedule information on the client with the information on the server - for example, after a reset of the client device.
The function is non-blocking and returns immediately. On receiving the server’s response, an E_CLD_PP_CMD_ENERGY_PHASES_SCHEDULE_STATE_RSP event is generated on the client, containing the requested schedule information in a tsCLD_PP_EnergyPhasesSchedulePayload structure (see Section21.10.6).
You are required to provide a pointer to a location to receive a Transaction Sequence Number (TSN) for the message. The TSN in the response is set to match the TSN in the request, allowing an incoming response to be paired with a request. This is useful when sending more than one request to the same destination endpoint.
Parameters
u8SourceEndPointId: Number of local endpoint on which cluster client resides
u8DestinationEndPointId : Number of remote endpoint on which cluster server resides
psDestinationAddress: Pointer to a structure containing the destination address of the server node
pu8TransactionSequenceNumber: Pointer to a location to receive the Transaction Sequence Number (TSN) of the message
psPayload: Pointer to structure containing the payload for the request (see Section 21.10.3), including the identifier of the relevant power profile
Returns
E_ZCL_SUCCESS
E_ZCL_FAIL
E_ZCL_ERR_EP_UNKNOWN
E_ZCL_ERR_ZBUFFER_FAIL
E_ZCL_ERR_ZTRANSMIT_FAIL
Parent topic:Client Functions
eCLD_PPPowerProfileScheduleConstraintsReqSend
teZCL_Status eCLD_PPPowerProfileScheduleConstraintsReqSend(
uint8 u8SourceEndPointId,
uint8 u8DestinationEndPointId,
tsZCL_Address *psDestinationAddress,
uint8 *pu8TransactionSequenceNumber,
tsCLD_PP_PowerProfileReqPayload *psPayload);
Description
This function can be used on a cluster client to send a Power Profile Schedule Constraints Request to the cluster server, in order to obtain the schedule restrictions on a particular power profile on the server. The obtained constraints can subsequently be used in calculating a schedule of energy phases for the power profile (e.g. before calling eCLD_PPEnergyPhasesScheduleNotificationSend()).
The function is non-blocking and will return immediately. The server will send a response to this request and on receiving this response, an E_CLD_PP_CMD_GET_POWER_PROFILE_SCHEDULE_CONSTRAINTS_RSP event is generated on the client, containing the requested schedule constraints in a tsCLD_PP_PowerProfileScheduleConstraintsPayload structure (see Section 21.10.7).
You are required to provide a pointer to a location to receive a Transaction Sequence Number (TSN) for the message. The TSN in the response is set to match the TSN in the request, allowing an incoming response to be paired with a request. This is useful when sending more than one request to the same destination endpoint.
Parameters
u8SourceEndPointId: Number of local endpoint on which cluster client resides
u8DestinationEndPointId : Number of remote endpoint on which cluster server resides
psDestinationAddress: Pointer to a structure containing the destination address of the server node
pu8TransactionSequenceNumber: Pointer to a location to receive the Transaction Sequence Number (TSN) of the message
psPayload: Pointer to structure containing the payload for the request (see Section 21.10.3), including the identifier of the relevant power profile
Returns
E_ZCL_SUCCESS
E_ZCL_FAIL
E_ZCL_ERR_EP_UNKNOWN
E_ZCL_ERR_ZBUFFER_FAIL
E_ZCL_ERR_ZTRANSMIT_FAIL
Parent topic:Client Functions
Parent topic:Functions
Parent topic:Power Profile Cluster