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 u8NumOfScheduledEnergyPhases field of the tsCLD_PPEntry structure), the attribute bMultipleScheduling is set to TRUE (if not already TRUE)

  • If a power profile is introduced which allows remote control for energy management (as indicated by the bPowerProfileRemoteControl field of the tsCLD_PPEntry structure), the attribute bEnergyRemote is 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