eSE_PriceAddPriceEntryToClient

teSE_PriceStatus eSE_PriceAddPriceEntryToClient(
    uint8 u8SourceEndPointId,
    bool_t bOverwritePrevious,
    tsSE_PricePublishPriceCmdPayload *psPricePayload);
    

Description

This function can be used on a Price cluster client to add a price to the local price list directly.

Normally, price entries are automatically added to the price list on a client when a Publish Price command is received from the server (e.g. the ESP). However, this function can be used by the local application to directly add a price entry to the price list on the client. The function should therefore only be used on a device which does not receive price information from the server (but by some other means, such as via the Internet).

Parameters

  • u8SourceEndPointId Number of the local endpoint through which the request is sent

  • bOverwritePrevious Action to be taken if the new price overlaps (in time) a price which is already in the price list:

    • TRUE - existing price deleted, new price added

    • FALSE - new price not added and error returned

  • psPricePayload Pointer to a structure containing the price information to be added (see Section 40.11.1). This parameter only needs to remain in scope for the duration of this function call

Returns

  • E_ZCL_SUCCESS

  • E_ZCL_FAIL

  • E_ZCL_ERR_PARAMETER_NULL

  • E_ZCL_ERR_INVALID_VALUE

  • E_ZCL_ERR_TIME_NOT_SYNCHRONISED

  • E_ZCL_ERR_INSUFFICIENT_SPACE

  • E_ZCL_ERR_EP_RANGE

  • E_ZCL_ERR_CLUSTER_NOT_FOUND

  • E_ZCL_ERR_ZBUFFER_FAIL

  • E_SE_PRICE_OVERFLOW

  • E_SE_PRICE_DUPLICATE

  • E_SE_PRICE_DATA_OLD

Parent topic:Functions