Zigbee Cluster Library Overview 4

1. Device Management

#include "zcl/se/zcl.device_mgmt.h"

Functions

ZbZclDeviceMgmtClientAlloc

struct ZbZclClusterT * ZbZclDeviceMgmtClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclDeviceMgmtClientCallbacksT *callbacks, void *arg);

Create a new instance of the Device Management Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclDeviceMgmtClientGetChangeSupplier

enum ZclStatusCodeT ZbZclDeviceMgmtClientGetChangeSupplier(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Change of Supplier command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtClientGetChangeTenancy

enum ZclStatusCodeT ZbZclDeviceMgmtClientGetChangeTenancy(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Change of Tenancy command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtClientGetCin

enum ZclStatusCodeT ZbZclDeviceMgmtClientGetCin(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get CIN command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtClientGetSiteId

enum ZclStatusCodeT ZbZclDeviceMgmtClientGetSiteId(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Site ID command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtClientReportEventConfig

enum ZclStatusCodeT ZbZclDeviceMgmtClientReportEventConfig(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDeviceMgmtReportEvtConfigT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Report Event Configuration command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
info Report Event Configuration command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtClientReqNewPassword

enum ZclStatusCodeT ZbZclDeviceMgmtClientReqNewPassword(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclDeviceMgmtReqNewPassT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Request New Password command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
info Request New Password command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtMirrorAlloc

struct ZbZclClusterT * ZbZclDeviceMgmtMirrorAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclClusterT *device_mgmt_server,
struct ZbZclClusterT *meter_mirror);

Allocates a Device Management Client Mirror cluster. The caller (application) must attach any attributes to the cluster you want to mirror.

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
device_mgmt_server Pointer to Device Mgmt Server cluster. This is used by the Metering Mirror to send mirrored commands to the BOMD.
meter_mirror Pointer to Metering Mirror cluster. This is used to queue any commands that need to be forwarded to the BOMD when it wakes up.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclDeviceMgmtParseReportEvtConfig

enum ZclStatusCodeT ZbZclDeviceMgmtParseReportEvtConfig(struct ZbZclClusterT *cluster, struct ZbApsdeDataIndT *dataIndPtr,
struct ZbZclDeviceMgmtReportEvtConfigT *info);

Parse a Report Event Configuration command

Parameters

cluster Cluster instance from which to send this command
dataIndPtr Data Indication structure containing the command payload to be parsed
info Report Event Configuration command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtParseReqNewPassRsp

bool ZbZclDeviceMgmtParseReqNewPassRsp(const uint8_t *buf, unsigned int len, struct ZbZclDeviceMgmtReqNewPassRspT *rsp);

Parse a Request New Password Response command

Parameters

buf Buffer containing response information
len Length of response information in bytes
rsp Request New Password Response command structure

Return

  • True on success, false otherwise

ZbZclDeviceMgmtParseUpdateCin

bool ZbZclDeviceMgmtParseUpdateCin(const uint8_t *buf, unsigned int len, struct ZbZclDeviceMgmtUpdateCinT *rsp);

Parse an Update CIN command

Parameters

buf Buffer containing response information
len Length of response information in bytes
rsp Update CIN command structure

Return

  • True on success, false otherwise

ZbZclDeviceMgmtParseUpdateSiteId

bool ZbZclDeviceMgmtParseUpdateSiteId(const uint8_t *buf, unsigned int len, struct ZbZclDeviceMgmtUpdateSiteIdT *rsp);

Parse an Update Site ID command

Parameters

buf Buffer containing response information
len Length of response information in bytes
rsp Update Site ID command structure

Return

  • True on success, false otherwise

ZbZclDeviceMgmtServerAlloc

struct ZbZclClusterT * ZbZclDeviceMgmtServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclDeviceMgmtServerCallbacksT *callbacks, void *arg);

Create a new instance of the Device Management Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclDeviceMgmtServerGetEventConfigReq

enum ZclStatusCodeT ZbZclDeviceMgmtServerGetEventConfigReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclDeviceMgmtGetEventConfigT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Event Configuration command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
info Get Event Configuration command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtServerPublishChangeSupplierRsp

enum ZclStatusCodeT ZbZclDeviceMgmtServerPublishChangeSupplierRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDeviceMgmtPublishChangeSupplierT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Publish Change of Supplier as a response to the Get Change of Supplier command.

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
info Publish Change of Supplier command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtServerPublishChangeSupplierUnsolic

enum ZclStatusCodeT ZbZclDeviceMgmtServerPublishChangeSupplierUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclDeviceMgmtPublishChangeSupplierT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Publish Change of Supplier as an unsolicited command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
info Publish Change of Supplier command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtServerPublishChangeTenancyRsp

enum ZclStatusCodeT ZbZclDeviceMgmtServerPublishChangeTenancyRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDeviceMgmtPublishChangeTenancyT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Publish Change of Tenancy as a response to the Get Change of Tenancy command.

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
info Publish Change of Tenancy command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtServerPublishChangeTenancyUnsolic

enum ZclStatusCodeT ZbZclDeviceMgmtServerPublishChangeTenancyUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclDeviceMgmtPublishChangeTenancyT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Publish Change of Tenancy as an unsolicited command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
info Publish Change of Tenancy command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtServerReqNewPassRsp

enum ZclStatusCodeT ZbZclDeviceMgmtServerReqNewPassRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDeviceMgmtReqNewPassRspT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Request New Password Response as a response to the Request New Password command.

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
info Request New Password Response command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtServerReqNewPassRspUnsolic

enum ZclStatusCodeT ZbZclDeviceMgmtServerReqNewPassRspUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclDeviceMgmtReqNewPassRspT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Request New Password Response as an unsolicited command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
info Request New Password Response command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtServerSetEventConfigReq

enum ZclStatusCodeT ZbZclDeviceMgmtServerSetEventConfigReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclDeviceMgmtSetEventConfigT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Set Event Configuration command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
info Set Event Configuration command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtServerUpdateCinRsp

enum ZclStatusCodeT ZbZclDeviceMgmtServerUpdateCinRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDeviceMgmtUpdateCinT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send an Update CIN as a response to the Get CIN command.

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
info Update CIN command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtServerUpdateCinUnsolic

enum ZclStatusCodeT ZbZclDeviceMgmtServerUpdateCinUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclDeviceMgmtUpdateCinT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Update CIN as an unsolicited command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
info Update CIN command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtServerUpdateSiteIdRsp

enum ZclStatusCodeT ZbZclDeviceMgmtServerUpdateSiteIdRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDeviceMgmtUpdateSiteIdT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send an Update SiteID as a response to the Get SiteID command.

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
info Update SiteID command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtServerUpdateSiteIdUnsolic

enum ZclStatusCodeT ZbZclDeviceMgmtServerUpdateSiteIdUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclDeviceMgmtUpdateSiteIdT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an Update SiteID as an unsolicited command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
info Update SiteID command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclDeviceMgmtCliAttrT

Device Management Client Attribute IDs

ZCL_DEVICE_MGMT_CLI_ATTR_ProviderID Provider ID
ZCL_DEVICE_MGMT_CLI_ATTR_ReceivedProviderID ReceivedProvider ID
ZCL_DEVICE_MGMT_CLI_ATTR_PRICE_START Price Event Configuration Attribute Set (First Id)
ZCL_DEVICE_MGMT_CLI_ATTR_TOUTariffActivation TOUTariffActivation
ZCL_DEVICE_MGMT_CLI_ATTR_BlockTariffactivated BlockTariffactivated
ZCL_DEVICE_MGMT_CLI_ATTR_BlockTOUTariffActivated BlockTOUTariffActivated
ZCL_DEVICE_MGMT_CLI_ATTR_SingleTariffRateActivated SingleTariffRateActivated
ZCL_DEVICE_MGMT_CLI_ATTR_AsychronousBillingOccurred AsychronousBillingOccurred
ZCL_DEVICE_MGMT_CLI_ATTR_SynchronousBillingOccurred SynchronousBillingOccurred
ZCL_DEVICE_MGMT_CLI_ATTR_TariffNotSupported Tariff NotSupported
ZCL_DEVICE_MGMT_CLI_ATTR_PriceClusterNotFound PriceClusterNotFound
ZCL_DEVICE_MGMT_CLI_ATTR_PublishPriceReceived PublishPriceReceived
ZCL_DEVICE_MGMT_CLI_ATTR_PublishPriceActioned PublishPriceActioned
ZCL_DEVICE_MGMT_CLI_ATTR_PublishPriceCancelled PublishPriceCancelled
ZCL_DEVICE_MGMT_CLI_ATTR_PublishPriceRejected PublishPriceRejected
ZCL_DEVICE_MGMT_CLI_ATTR_PublishTariffInformation PublishTariffInformation Received
ZCL_DEVICE_MGMT_CLI_ATTR_PublishTariffInformationActio ned PublishTariffInformation Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_PublishTariffInformationCanc elled PublishTariffInformation Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_PublishTariffInformationReje cted PublishTariffInformation Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_PublishPriceMatrixReceived PublishPriceMatrixReceived
ZCL_DEVICE_MGMT_CLI_ATTR_PublishPriceMatrixActioned PublishPriceMatrixActioned
ZCL_DEVICE_MGMT_CLI_ATTR_PublishPriceMatrixCancelled PublishPriceMatrixCancelled
ZCL_DEVICE_MGMT_CLI_ATTR_PublishPriceMatrixRejected PublishPriceMatrixRejected
ZCL_DEVICE_MGMT_CLI_ATTR_PublishBlockThresholdsRece ived PublishBlockThresholdsReceived
ZCL_DEVICE_MGMT_CLI_ATTR_PublishBlockThresholdsActio ned PublishBlockThresholdsActioned
ZCL_DEVICE_MGMT_CLI_ATTR_PublishBlockThresholdsCanc elled PublishBlockThresholdsCancelled
ZCL_DEVICE_MGMT_CLI_ATTR_PublishBlockThresholdsReje cted PublishBlockThresholdsRejected
ZCL_DEVICE_MGMT_CLI_ATTR_PRICE_GROUP_ID Price cluster Group ID (Last Id)
ZCL_DEVICE_MGMT_CLI_ATTR_METERING_START Metering Event Configuration Attribute Set (First Id)
ZCL_DEVICE_MGMT_CLI_ATTR_CheckMeter Check Meter
ZCL_DEVICE_MGMT_CLI_ATTR_LowBattery Low Battery
ZCL_DEVICE_MGMT_CLI_ATTR_TamperDetect Tamper Detect
ZCL_DEVICE_MGMT_CLI_ATTR_SupplyStatus Supply Status
ZCL_DEVICE_MGMT_CLI_ATTR_SupplyQuality Supply Quality
ZCL_DEVICE_MGMT_CLI_ATTR_LeakDetect Leak Detect
ZCL_DEVICE_MGMT_CLI_ATTR_BatteryFailure BatteryFailure
ZCL_DEVICE_MGMT_CLI_ATTR_LowVoltageL1 LowVoltageL1
ZCL_DEVICE_MGMT_CLI_ATTR_HighVoltageL1 HighVoltageL1
ZCL_DEVICE_MGMT_CLI_ATTR_UnderVoltage UnderVoltage
ZCL_DEVICE_MGMT_CLI_ATTR_OverVoltage OverVoltage
ZCL_DEVICE_MGMT_CLI_ATTR_PressureTooLow PressureTooLow
ZCL_DEVICE_MGMT_CLI_ATTR_PressureTooHigh PressureTooHigh
ZCL_DEVICE_MGMT_CLI_ATTR_GetProfileCommandReceive d Get Profile Command Received
ZCL_DEVICE_MGMT_CLI_ATTR_GetProfileCommandActioned Get Profile Command Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_GetProfileCommandCancelle d Get Profile Command Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_GetProfileCommandRejected Get Profile Command Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_RequestMirrorResponseCom mandReceived RequestMirrorResponse Command Received
ZCL_DEVICE_MGMT_CLI_ATTR_RequestMirrorResponseCom mandActioned RequestMirrorResponse Command Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_RequestMirrorResponseCom mandCancelled RequestMirrorResponse Command Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_RequestMirrorResponseCom mandRejected RequestMirrorResponse Command Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_MirrorRemoved0CommandR eceived MirrorRemoved Command Received
ZCL_DEVICE_MGMT_CLI_ATTR_MirrorRemoved0CommandA ctioned MirrorRemoved Command Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_MirrorRemoved0CommandC ancelled MirrorRemoved Command Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_MirrorRemoved0CommandR ejected MirrorRemoved Command Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_GetSampledDataCommandR eceived GetSampledData Command Received
ZCL_DEVICE_MGMT_CLI_ATTR_GetSampledDataCommandA ctioned GetSampledData Command Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_GetSampledDataCommandC ancelled GetSampledData Command Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_GetSampledDataCommandR ejected GetSampledData Command Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_SupplyON Supply ON
ZCL_DEVICE_MGMT_CLI_ATTR_SupplyARMED Supply ARMED
ZCL_DEVICE_MGMT_CLI_ATTR_SupplyOFF Supply OFF
ZCL_DEVICE_MGMT_CLI_ATTR_METERING_GROUP_ID Metering cluster Group ID (Last Id)
ZCL_DEVICE_MGMT_CLI_ATTR_MESSAGING_START Messaging Event Configuration Attribute Set (First Id)
ZCL_DEVICE_MGMT_CLI_ATTR_MessageConfirmationSent Message Confirmation Sent
ZCL_DEVICE_MGMT_CLI_ATTR_DisplayMessageReceived DisplayMessageReceived
ZCL_DEVICE_MGMT_CLI_ATTR_DisplayMessageActioned DisplayMessageActioned
ZCL_DEVICE_MGMT_CLI_ATTR_DisplayMessageCancelled DisplayMessageCancelled
ZCL_DEVICE_MGMT_CLI_ATTR_DisplayMessageRejected DisplayMessageRejected
ZCL_DEVICE_MGMT_CLI_ATTR_CancelMessageReceived CancelMessageReceived
ZCL_DEVICE_MGMT_CLI_ATTR_CancelMessageActioned CancelMessageActioned
ZCL_DEVICE_MGMT_CLI_ATTR_CancelMessageCancelled CancelMessageCancelled
ZCL_DEVICE_MGMT_CLI_ATTR_CancelMessageRejected CancelMessageRejected
ZCL_DEVICE_MGMT_CLI_ATTR_MESSAGING_GROUP_ID Messaging cluster Group ID (Last Id)
ZCL_DEVICE_MGMT_CLI_ATTR_PREPAYMENT_START Prepayment Event Configuration Attribute Set (First Id)
ZCL_DEVICE_MGMT_CLI_ATTR_LowCredit Low Credit
ZCL_DEVICE_MGMT_CLI_ATTR_NoCredit No Credit (Zero Credit)
ZCL_DEVICE_MGMT_CLI_ATTR_CreditExhausted Credit Exhausted
ZCL_DEVICE_MGMT_CLI_ATTR_EmergencyCreditEnabled Emergency Credit Enabled
ZCL_DEVICE_MGMT_CLI_ATTR_EmergencyCreditExhausted Emergency Credit Exhausted
ZCL_DEVICE_MGMT_CLI_ATTR_CreditAdjustment Credit Adjustment
ZCL_DEVICE_MGMT_CLI_ATTR_CreditAdjustFail Credit Adjust Fail
ZCL_DEVICE_MGMT_CLI_ATTR_PrepayClusterNotFound Prepay Cluster Not Found
ZCL_DEVICE_MGMT_CLI_ATTR_SelectAvailableEmergencyCr editReceived SelectAvailableEmergencyCredit Received
ZCL_DEVICE_MGMT_CLI_ATTR_SelectAvailableEmergencyCr editActioned SelectAvailableEmergencyCredit Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_SelectAvailableEmergencyCr editCancelled SelectAvailableEmergencyCredit Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_SelectAvailableEmergencyCr editRejected SelectAvailableEmergencyCredit Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_EmergencyCreditSetupRecei ved Emergency Credit Setup Received
ZCL_DEVICE_MGMT_CLI_ATTR_EmergencyCreditSetupActio ned Emergency Credit Setup Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_EmergencyCreditSetupCanc elled Emergency Credit Setup Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_EmergencyCreditSetupRejec ted Emergency Credit Setup Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_CreditAdjustmentReceived Credit Adjustment Received
ZCL_DEVICE_MGMT_CLI_ATTR_CreditAdjustmentActioned Credit Adjustment Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_CreditAdjustmentCancelled Credit Adjustment Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_CreditAdjustmentRejected Credit Adjustment Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_SetLowCreditWarningLevelR eceived Set Low Credit Warning Level Received
ZCL_DEVICE_MGMT_CLI_ATTR_SetLowCreditWarningLevelA ctioned Set Low Credit Warning Level Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_SetLowCreditWarningLevelC ancelled Set Low Credit Warning Level Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_SetLowCreditWarningLevelR ejected Set Low Credit Warning Level Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_SetMaximumCreditLimitRece ived SetMaximumCreditLimit Received
ZCL_DEVICE_MGMT_CLI_ATTR_SetMaximumCreditLimitActio ned SetMaximumCreditLimit Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_SetMaximumCreditLimitCanc elled SetMaximumCreditLimit Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_SetMaximumCreditLimitReje cted SetMaximumCreditLimit Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_PREPAYMENT_GROUP_ID Prepayment cluster Group ID (Last Id)
ZCL_DEVICE_MGMT_CLI_ATTR_CALENDAR_START Calendar Event Configuration Attribute Set (First Id)
ZCL_DEVICE_MGMT_CLI_ATTR_CalendarClusterNotFound Calendar Cluster Not Found
ZCL_DEVICE_MGMT_CLI_ATTR_CalendarChangePassiveActi vated Calendar Change Passive Activated
ZCL_DEVICE_MGMT_CLI_ATTR_CalendarChangePassiveUpd ated Calendar Change Passive Updated
ZCL_DEVICE_MGMT_CLI_ATTR_PublishCalendarReceived PublishCalendar Received
ZCL_DEVICE_MGMT_CLI_ATTR_PublishCalendarActioned PublishCalendar Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_PublishCalendarCancelled PublishCalendar Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_PublishCalendarRejected PublishCalendar Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_PublishDayProfileReceived Publish Day Profile Received
ZCL_DEVICE_MGMT_CLI_ATTR_PublishDayProfileActioned Publish Day Profile Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_PublishDayProfileCancelled Publish Day Profile Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_PublishDayProfileRejected Publish Day Profile Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_PublishWeekProfileReceived Publish Week Profile Received
ZCL_DEVICE_MGMT_CLI_ATTR_PublishWeekProfileActioned Publish Week Profile Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_PublishWeekProfileCancelled Publish Week Profile Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_PublishWeekProfileRejected Publish Week Profile Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_PublishSeasonsReceived Publish Seasons Received
ZCL_DEVICE_MGMT_CLI_ATTR_PublishSeasonsActioned Publish Seasons Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_PublishSeasonsCancelled Publish Seasons Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_PublishSeasonsRejected Publish Seasons Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_PublishSpecialDaysReceived Publish Special Days Received
ZCL_DEVICE_MGMT_CLI_ATTR_PublishSpecialDaysActioned Publish Special Days Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_PublishSpecialDaysCancelle d Publish Special Days Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_PublishSpecialDaysRejected Publish Special Days Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_CALENDAR_GROUP_ID Calendar cluster Group ID (Last Id)
ZCL_DEVICE_MGMT_CLI_ATTR_DEVICE_MGMT_START Device Management Event Configuration Attribute Set (First Id)
ZCL_DEVICE_MGMT_CLI_ATTR_Password1Change Password1Change
ZCL_DEVICE_MGMT_CLI_ATTR_EventLogCleared EventLogCleared
ZCL_DEVICE_MGMT_CLI_ATTR_PublishCoTReceived Publish CoT Received
ZCL_DEVICE_MGMT_CLI_ATTR_PublishCoTActioned Publish CoT Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_PublishCoTCancelled Publish CoT Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_PublishCoTRejected Publish CoT Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_PublishCoSReceived Publish CoS Received
ZCL_DEVICE_MGMT_CLI_ATTR_PublishCoSActioned Publish CoS Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_PublishCoSCancelled Publish CoS Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_PublishCoSRejected Publish CoS Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_ChangePasswordReceived Change Password Received
ZCL_DEVICE_MGMT_CLI_ATTR_ChangepasswordActioned Change password Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_ChangePasswordCancelled Change Password Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_ChangePasswordRejected Change Password Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_SetEventConfigurationRecei ved SetEventConfiguration Received
ZCL_DEVICE_MGMT_CLI_ATTR_SetEventConfigurationAction ed SetEventConfiguration Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_SetEventConfigurationCance lled SetEventConfiguration Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_SetEventConfigurationReject ed SetEventConfiguration Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_UpdateSiteIDReceived UpdateSiteID Received
ZCL_DEVICE_MGMT_CLI_ATTR_UpdateSiteIDActioned UpdateSiteID Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_UpdateSiteIDCancelled UpdateSiteID Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_UpdateSiteIDRejected UpdateSiteID Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_UpdateCINReceived UpdateCIN Received
ZCL_DEVICE_MGMT_CLI_ATTR_UpdateCINActioned UpdateCIN Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_UpdateCINCancelled UpdateCIN Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_UpdateCINRejected UpdateCIN Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_DEVICE_MGMT_GROUP_ID Device Management cluster Group ID (Last Id)
ZCL_DEVICE_MGMT_CLI_ATTR_TUNNEL_START Tunnel Event Configuration Attribute Set (First Id)
ZCL_DEVICE_MGMT_CLI_ATTR_TunnelingClusterNotFound Tunneling Cluster Not Found
ZCL_DEVICE_MGMT_CLI_ATTR_RequestTunnelCommandRe ceived RequestTunnel Command Received
ZCL_DEVICE_MGMT_CLI_ATTR_RequestTunnelCommandRej ected RequestTunnel Command Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_RequestTunnelCommandGe nerated RequestTunnel Command Generated
ZCL_DEVICE_MGMT_CLI_ATTR_CloseTunnelCommandRecei ved CloseTunnel Command Received
ZCL_DEVICE_MGMT_CLI_ATTR_CloseTunnelCommandRejec ted CloseTunnel Command Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_CloseTunnelCommandGener ated CloseTunnel Command Generated
ZCL_DEVICE_MGMT_CLI_ATTR_TransferDataCommandRecei ved TransferData Command Received
ZCL_DEVICE_MGMT_CLI_ATTR_TransferDataCommandRejec ted TransferData Command Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_TransferDataCommandGene rated TransferData Command Generated
ZCL_DEVICE_MGMT_CLI_ATTR_TransferDataErrorCommand Received TransferDataError Command Received
ZCL_DEVICE_MGMT_CLI_ATTR_TransferDataErrorCommand Rejected TransferDataError Command Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_TransferDataErrorCommand Generated TransferDataError Command Generated
ZCL_DEVICE_MGMT_CLI_ATTR_TUNNEL_GROUP_ID Tunnel cluster Group ID (Last Id)
ZCL_DEVICE_MGMT_CLI_ATTR_OTA_START OTA Event Configuration Attribute Set (First Id)
ZCL_DEVICE_MGMT_CLI_ATTR_FirmwareReadyForActivation FirmwareReadyForActivation
ZCL_DEVICE_MGMT_CLI_ATTR_FirmwareActivated FirmwareActivated
ZCL_DEVICE_MGMT_CLI_ATTR_FirmwareActivationFailure Firmware Activation Failure
ZCL_DEVICE_MGMT_CLI_ATTR_PatchReadyForActivation Patch Ready For Activation
ZCL_DEVICE_MGMT_CLI_ATTR_PatchActivated Patch Activated
ZCL_DEVICE_MGMT_CLI_ATTR_PatchFailure Patch Failure
ZCL_DEVICE_MGMT_CLI_ATTR_ImageNotifyCommandReceiv ed Image Notify Command Received
ZCL_DEVICE_MGMT_CLI_ATTR_ImageNotifyCommandReject ed Image Notify Command Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_QueryNextImageRequestGe nerated Query Next Image Request Generated
ZCL_DEVICE_MGMT_CLI_ATTR_QueryNextImageResponseR eceived Query Next Image Response Received
ZCL_DEVICE_MGMT_CLI_ATTR_QueryNextImageResponseR ejected Query Next Image Response Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_ImageBlockRequestGenerat ed Image Block Request Generated
ZCL_DEVICE_MGMT_CLI_ATTR_ImagePageRequestGenerate d Image Page Request Generated
ZCL_DEVICE_MGMT_CLI_ATTR_ImageBlockResponseReceiv ed Image Block Response Received
ZCL_DEVICE_MGMT_CLI_ATTR_ImageBlockResponseReject ed Image Block Response Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_UpgradeEndRequestGenerat ed Upgrade End Request Generated
ZCL_DEVICE_MGMT_CLI_ATTR_UpgradeEndResponseRecei ved Upgrade End Response Received
ZCL_DEVICE_MGMT_CLI_ATTR_UpgradeEndResponseReject ed Upgrade End Response Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_QuerySpecificFileRequestGe nerated Query Specific File Request Generated
ZCL_DEVICE_MGMT_CLI_ATTR_QuerySpecificFileResponse Received Query Specific File Response Received
ZCL_DEVICE_MGMT_CLI_ATTR_QuerySpecificFileResponse Rejected Query Specific File Response Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_OTA_GROUP_ID OTA cluster Group ID (Last Id)

ZbZclDeviceMgmtSvrAttrT

Device Management Server Attribute IDs

ZCL_DEVICE_MGMT_SVR_ATTR_ProviderID ProviderID (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ProviderName ProviderName (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ProviderContactDetails ProviderContactDetails (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ProposedProviderID ProposedProviderID (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ProposedProviderName ProposedProviderName (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ProposedProviderChangeD ate ProposedProviderChangeDate/Time (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ProposedProviderChangeC ontrol ProposedProviderChangeControl (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ProposedProviderContactD etails ProposedProviderContactDetails (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ReceivedProviderID ReceivedProviderID (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ReceivedProviderName ReceivedProviderName (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ReceivedProviderContactD etails ReceivedProviderContactDetails (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ReceivedProposedProviderI D ReceivedProposedProviderID (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ReceivedProposedProvider Name ReceivedProposedProviderName (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ReceivedProposedProvider ChangeDate ReceivedProposedProviderChangeDate/Time (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ReceivedProposedProvider ChangeControl ReceivedProposedProviderChangeControl (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ReceivedProposedProvider ContactDetails ReceivedProposedProviderContactDetails (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ChangeofTenancyUpdateD ate ChangeofTenancyUpdateDate/Time (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ProposedTenancyChangeC ontrol ProposedTenancyChangeControl (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_WANStatus WAN Status (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_LowMediumThreshold LowMediumThreshold (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_MediumHighThreshold MediumHighThreshold (Optional)

Structures

ZbZclDeviceMgmtClientCallbacksT

Device Management Client callbacks configuration

Parameters

publish_change_tenancy

(callback function pointer)

enum ZclStatusCodeT (*publish_change_tenancy)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclDeviceMgmtPublishChangeTenancyT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of 'Publish Change Tenancy' command. The return code (e.g. ZCL_STATUS_SUCCESS) is included in the standard Default Response.

publish_change_supplier

(callback function pointer)

enum ZclStatusCodeT (*publish_change_supplier)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclDeviceMgmtPublishChangeSupplierT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of 'Publish Change Supplier' command. The return code (e.g. ZCL_STATUS_SUCCESS) is included in the standard Default Response.

req_new_pass_rsp_unsolic

(callback function pointer)

enum ZclStatusCodeT (*req_new_pass_rsp_unsolic)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclDeviceMgmtReqNewPassRspT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of an unsolicited 'Request New Password Response' command. The return code (e.g. ZCL_STATUS_SUCCESS) is included in the standard Default Response.

update_site_id

(callback function pointer)

enum ZclStatusCodeT (*update_site_id)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclDeviceMgmtUpdateSiteIdT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of 'Update SiteID' command. The return code (e.g. ZCL_STATUS_SUCCESS) is included in the standard Default Response.

set_event_config

(callback function pointer)

enum ZclStatusCodeT (*set_event_config)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclDeviceMgmtSetEventConfigT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of 'Set Event Configuration' command. The return code (e.g. ZCL_STATUS_SUCCESS) is included in the standard Default Response.

get_event_config

(callback function pointer)

enum ZclStatusCodeT (*get_event_config)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclDeviceMgmtGetEventConfigT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of 'Get Event Configuration' command. The return code (e.g. ZCL_STATUS_SUCCESS) is included in the standard Default Response.

update_cin

(callback function pointer)

enum ZclStatusCodeT (*update_cin)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclDeviceMgmtUpdateCinT *info, struct ZbZclAddrInfoT *srcInfo)

ZbZclDeviceMgmtEventConfigPayloadT

Event Configuration Payload structure

Parameters

uint16_t event_id Event ID
uint8_t event_config Event Configuration

ZbZclDeviceMgmtGetEventConfigT

Get Event Configuration command structure

Parameters

uint16_t event_id Event ID
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclDeviceMgmtPublishChangeSupplierT

Publish Change of Supplier command structure

Parameters

uint32_t curr_provider_id Current Provider ID
uint32_t issuer_event_id Issuer Event ID
uint8_t tariff_type Tariff Type
uint32_t proposed_provider_id Proposed Provider ID
uint32_t provider_change_impl_time Provider Change Implementation Time
uint32_t provider_change_ctrl Provider Change Control
uint8_t proposed_provider_name Proposed Provider Name
uint8_t proposed_provider_contact Proposed Provider Contact Details

ZbZclDeviceMgmtPublishChangeTenancyT

Publish Change of Tenancy command structure

Parameters

uint32_t provider_id Provider ID
uint32_t issuer_id Issuer Event ID
uint8_t tariff_type Tariff Type
uint32_t implement_time Implementation Date/Time
uint32_t prop_tenancy_change_ctrl Proposed Tenancy Change Control

ZbZclDeviceMgmtReportEvtConfigT

Report Event Configuration command structure

Parameters

uint8_t command_index Command Index
uint8_t total_commands Total Commands
struct ZbZclDeviceMgmtEventConfigPayloadT event_config_payload Event Configuration Payload
uint8_t num_entries Number of Payload Entries

ZbZclDeviceMgmtReqNewPassRspT

Request New Password Response command structure

Parameters

uint32_t issuer_event_id Issuer Event ID
uint32_t implement_time Implementation Date/Time
uint16_t duration Duration
uint8_t password_type Password Type
uint8_t password Password

ZbZclDeviceMgmtReqNewPassT

Request New Password command structure

Parameters

uint8_t password_type Password Type

ZbZclDeviceMgmtServerCallbacksT

Device Management Server callbacks configuration

Parameters

get_change_tenancy

(callback function pointer)

enum ZclStatusCodeT (*get_change_tenancy)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of 'Get Change of Tenancy' command. The ESI may send a PublishChangeofTenancy command (ZbZclDeviceMgmtServerPublishChangeTenancy). Return ZCL_STATUS_SUCCESS if PublishChangeofTenancy was sent, or ZCL_STATUS_NOT_FOUND otherwise.

get_change_supplier

(callback function pointer)

enum ZclStatusCodeT (*get_change_supplier)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of 'Get Change of Supplier' command. The ESI may send a PublishChangeofSupplier command (ZbZclDeviceMgmtServerPublishChangeSupplier). Return ZCL_STATUS_SUCCESS if PublishChangeofSupplier was sent, or ZCL_STATUS_NOT_FOUND otherwise.

request_new_pass

(callback function pointer)

enum ZclStatusCodeT (*request_new_pass)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclDeviceMgmtReqNewPassT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of 'Request New Password' command. The ESI may send a RequestNewPasswordResponse command (ZbZclDeviceMgmtServerReqNewPassRsp). Return ZCL_STATUS_SUCCESS if RequestNewPasswordResponse was sent, or ZCL_STATUS_NOT_FOUND otherwise.

get_site_id

(callback function pointer)

enum ZclStatusCodeT (*get_site_id)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of 'GetSiteID' command. The ESI may send a UpdateSiteID command (ZbZclDeviceMgmtServerUpdateSiteId). Return ZCL_STATUS_SUCCESS if UpdateSiteID was sent, or ZCL_STATUS_NOT_FOUND otherwise.

get_cin

(callback function pointer)

enum ZclStatusCodeT (*get_cin)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of 'GetCIN' command. The ESI may send a UpdateCIN command (ZbZclDeviceMgmtServerUpdateCin). Return ZCL_STATUS_SUCCESS if UpdateCIN was sent, or ZCL_STATUS_NOT_FOUND otherwise.

ZbZclDeviceMgmtSetEventConfigT

Set Event command structure

Parameters

uint32_t issuer_event_id Issuer Event ID
uint32_t start_time Start Date/Time
uint8_t event_config Event Configuration
enum ZbZclDeviceMgmtEventConfigCtrl

config_ctrl

Configuration Control
union { struct { uint8_t num_events Number of Events
uint16_t event_id_list Event IDs
struct { uint16_t group_id Event Group ID
struct { uint8_t log_id Log ID
struct { uint8_t config_match Configuration Value Match
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclDeviceMgmtUpdateCinT

Update CIN Configuration command structure

Parameters

uint32_t issuer_event_id Issuer Event ID
uint32_t cin_implement_time CIN Implementation Time
uint32_t provider_id Provider ID
uint8_t customer_id CustomerID Number

ZbZclDeviceMgmtUpdateSiteIdT

Update SiteID command structure

Parameters

uint32_t issuer_event_id Issuer Event ID
uint32_t site_id_time SiteID Time
uint32_t provider_id Provider ID
uint8_t site_id Site ID

2. Demand Response and Load Control

#include "zcl/se/zcl.drlc.h"

Functions

ZbZclDrlcClientAlloc

struct ZbZclClusterT * ZbZclDrlcClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclClusterT *time_server,
struct ZbZclDrlcClientCallbacksT *callbacks, void *cb_arg);

Create a new instance of the DRLC Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
time_server Time server cluster instance used to retrieve timing information of events
callbacks Structure containing any callback function pointers for this cluster
cb_arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclDrlcClientCommandGetEventsReq

enum ZclStatusCodeT ZbZclDrlcClientCommandGetEventsReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclDrlcGetEventsReqT *cmd_req, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send a Get Scheduled Events

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Scheduled Events command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDrlcClientCommandReportStatusReq

enum ZclStatusCodeT ZbZclDrlcClientCommandReportStatusReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclDrlcStatusT *statusPtr, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send a Report Event Status Command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
statusPtr Report Event Status command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDrlcClientGetEventList

unsigned int ZbZclDrlcClientGetEventList(struct ZbZclClusterT *cluster, struct ZbZclDrlcEventT *eventList, unsigned int maxEntries);

Send a Get Event List command

Parameters

cluster Cluster instance from which to send this command
eventList Holds a pointer to the event list if successful
maxEntries Max event list entries

Return

  • Event list size if successful, or 0 on error

ZbZclDrlcClientOptOutAdd

enum ZclStatusCodeT ZbZclDrlcClientOptOutAdd(struct ZbZclClusterT *cluster, uint32_t issuer_id);

Append an Issuer Event ID to "opt-out" of

Parameters

cluster Cluster instance from which to send this command
eventList Holds a pointer to the opt-outs list if successful

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDrlcClientOptOutClear

enum ZclStatusCodeT ZbZclDrlcClientOptOutClear(struct ZbZclClusterT *cluster);

Clear all Issuer Event IDs in list to "opt-out" of

Parameters

cluster Cluster instance from which to send this command
eventList Holds a pointer to the opt-outs list if successful

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDrlcClientOptOutDel

enum ZclStatusCodeT ZbZclDrlcClientOptOutDel(struct ZbZclClusterT *cluster, uint32_t issuer_id);

Invalidate an Issuer Event ID to "opt-out" of

Parameters

cluster Cluster instance from which to send this command
eventList Holds a pointer to the opt-outs list if successful

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDrlcServerAlloc

struct ZbZclClusterT * ZbZclDrlcServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclDrlcServerCallbacksT *callbacks, void *arg);

Create a new instance of the DRLC Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclDrlcServerCommandCancelAllReq

enum ZclStatusCodeT ZbZclDrlcServerCommandCancelAllReq(struct ZbZclClusterT *cluster, uint8_t ctrl, const struct ZbApsAddrT *dst,
void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send a Cancel All Load Control Event command

Parameters

cluster Cluster instance from which to send this command
ctrl Cancel control bitmap, used to determine method of cancellation - e.g. ZCL_DRLC_CANCEL_CONTROL_GRACEFUL
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDrlcServerCommandCancelReq

enum ZclStatusCodeT ZbZclDrlcServerCommandCancelReq(struct ZbZclClusterT *cluster, struct ZbZclDrlcCancelT *cancelInfoPtr,
const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send a Cancel Load Control Event command

Parameters

cluster Cluster instance from which to send this command
eventPtr Cancel Load Control Event command request structure
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDrlcServerCommandEventReq

enum ZclStatusCodeT ZbZclDrlcServerCommandEventReq(struct ZbZclClusterT *cluster, struct ZbZclDrlcEventT *eventPtr,
const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send a Load Control Event command

Parameters

cluster Cluster instance from which to send this command
eventPtr Load Control Event command request structure
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclDrlcCliAttrT

DRLC Client Attribute IDs

ZCL_DRLC_CLI_ATTR_UTILITY_ENROL_GRP UtilityEnrollmentGroup
ZCL_DRLC_CLI_ATTR_START_RAND_MINS StartRandomizationMinutes
ZCL_DRLC_CLI_ATTR_DURATION_RAND_MINS DurationRandomizationMinutes
ZCL_DRLC_CLI_ATTR_DEVICE_CLASS DeviceClassValue

Structures

ZbZclDrlcCancelT

Cancel Load Control Event command structure

Parameters

uint32_t issuer_id Issuer Event ID
uint16_t device_class Device Class
uint8_t util_enrol_group Utility Enrollment Group
uint8_t cancel_control Cancel Control - e.g. ZCL_DRLC_CANCEL_CONTROL_GRACEFUL

ZbZclDrlcClientCallbacksT

DRLC Client callbacks configuration

Parameters

start

(callback function pointer)

bool (*start)(void *arg, struct ZbZclDrlcEventT *event)

Callback to application, invoked on the start of an event

stop

(callback function pointer)

void (*stop)(void *arg, struct ZbZclDrlcEventT *event)

Callback to application, invoked on the end of an event

ZbZclDrlcEventT

Load Control Event command structure

Parameters

uint32_t issuer_id Issuer Event ID
uint16_t device_class Device Class
uint8_t util_enrol_group Utility Entrollment Group
uint32_t start_time Start Time - UTC, or 0 = now
uint16_t duration Duration in Minutes
enum ZbZclDrlcCriticalityLevelT criticality Criticality Level
uint8_t cool_offset Cooling Temperature Offset (Optional)
uint8_t heat_offset Heating Temperature Offset (Optional)
int16_t cool_setpoint Cooling Temperature Set Point (Optional)
int16_t heat_setpoint Heating Temperature Set Point (Optional)
int8_t avg_load_adj Average Load Adjustment Percentage (Optional)
uint8_t dutycycle Duty Cycle (Optional)
uint8_t event_control Event Control - e.g. ZCL_DRLC_EVENT_CTRL_RAND_START

ZbZclDrlcGetEventsReqT

Get Scheduled Events command structure

Parameters

uint32_t earliest_end_time Earliest End Time
uint8_t num_events Number of Events
uint32_t issuer_id Issuer Event ID

ZbZclDrlcServerCallbacksT

DRLC Server callbacks configuration

Parameters

report_status

(callback function pointer)

void (*report_status)(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *srcInfo, struct ZbZclDrlcStatusT *status, void *arg)

Callback to application, invoked on receipt of Report Event Status command

get_events

(callback function pointer)

enum ZclStatusCodeT (*get_events)(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *srcInfo, struct ZbZclDrlcGetEventsReqT *req, void *arg)

Callback to application, invoked on receipt of Get Scheduled Events command. The get_events callback handler in the application should return ZCL_STATUS_SUCCESS, or ZCL_STATUS_NOT_FOUND if no events are found.Events are re-issued by calling ZbZclDrlcServerCommandEventReq()

ZbZclDrlcStatusT

Report Event Status command structure

Parameters

uint32_t issuer_id Issuer Event ID
enum ZbZclDrlcEventStatusT status Event Status
uint32_t status_time Event Status Time
enum ZbZclDrlcCriticalityLevelT

crit_level_applied

Criticality Level Applied
uint16_t cool_setpoint_applied Cooling Temperature Set Point Applied (Optional). Set to ZCL_DRLC_COOL_SETPOINT_IGNORED if not used
uint16_t heat_setpoint_applied Heating Temperature Set Point Applied (Optional). Set to ZCL_DRLC_HEAT_SETPOINT_IGNORED if not used
int8_t avg_load_adj_applied Average Load Adjustment Percentage Applied (Optional). Set to ZCL_DRLC_AVG_LOAD_ADJ_IGNORED if not used
uint8_t dutycycle_applied Duty Cycle Applied (Optional). Set to ZCL_DRLC_DUTYCYCLE_IGNORED if not used
uint8_t event_control Event Control
enum ZbZclDrlcSignatureT sig_type Signature Type
uint8_t sig_data Signature (Optional)

3. Energy Management

#include "zcl/se/zcl.energy_mgmt.h"

Functions

ZbZclEnergyMgmtClientAlloc

struct ZbZclClusterT * ZbZclEnergyMgmtClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);

Create a new instance of the Energy Management Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclEnergyMgmtClientManageEventReq

enum ZclStatusCodeT ZbZclEnergyMgmtClientManageEventReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclEnergyMgmtManageEventT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Manage Event command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
info Manage Event command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclEnergyMgmtServerAlloc

struct ZbZclClusterT * ZbZclEnergyMgmtServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclEnergyMgmtServerCallbacksT *callbacks, void *arg);

Create a new instance of the Energy Management Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclEnergyMgmtServerReportEvtStatus

enum ZclStatusCodeT ZbZclEnergyMgmtServerReportEvtStatus(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDrlcStatusT *info,
void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Create a new instance of the Energy Management Server cluster

Parameters

cluster
dst
info
callback
arg

Return

  • Undocumented

Enumerations

ZbZclEnergyMgmtSvrAttrT

Energy Management Server Attribute IDs

ZCL_ENERGY_MGMT_SVR_ATTR_LOAD_CONTROL_STATE LoadControlState
ZCL_ENERGY_MGMT_SVR_ATTR_CURR_EVENT_ID CurrentEventID
ZCL_ENERGY_MGMT_SVR_ATTR_CURR_EVENT_STATUS CurrentEventStatus
ZCL_ENERGY_MGMT_SVR_ATTR_CONFORMANCE_LEVEL ConformanceLevel
ZCL_ENERGY_MGMT_SVR_ATTR_MIN_OFF_TIME MinimumOffTime
ZCL_ENERGY_MGMT_SVR_ATTR_MIN_ON_TIME MinimumOnTime
ZCL_ENERGY_MGMT_SVR_ATTR_MIN_CYCLE_PERIOD MinimumCyclePeriod

Structures

ZbZclEnergyMgmtManageEventT

Manage Event (ZCL_ENERGY_MGMT_CLI_CMD_MANAGE_EVENT) command structure

Parameters

uint32_t issuer_id Issuer Event ID
uint16_t device_class Device Class
uint8_t utility_enrol_group Utility Enrollment Group
uint8_t actions_required Action(s) Required

ZbZclEnergyMgmtServerCallbacksT

Energy Management Server callbacks configuration

Parameters

manage_event

(callback function pointer)

enum ZclStatusCodeT (*manage_event)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclEnergyMgmtManageEventT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Manage Event command

4. Events

#include "zcl/se/zcl.events.h"

Functions

ZbZclEventsClientAlloc

struct ZbZclClusterT * ZbZclEventsClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclEventsClientCallbacksT *callbacks, void *arg);

Create a new instance of the Events Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclEventsClientCommandClearEventLogReq

enum ZclStatusCodeT ZbZclEventsClientCommandClearEventLogReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclEventsClientClearEventLogT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Clear Event Log command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for command
cmd_req Clear Event Log command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclEventsClientCommandGetEventLogReq

enum ZclStatusCodeT ZbZclEventsClientCommandGetEventLogReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclEventsClientGetEventLogT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Event Log command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for command
cmd_req Get Event Log command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclEventsMirrorAlloc

struct ZbZclClusterT * ZbZclEventsMirrorAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclClusterT *events_client,
struct ZbZclClusterT *meter_mirror);

Allocates a Events Server Mirror cluster. The caller (application) must attach any attributes to the cluster you want to mirror.

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
events_client Pointer to Events Client cluster. This is used by the Metering Mirror to send mirrored commands to the BOMD.
meter_mirror Pointer to Metering Mirror cluster. This is used to queue any commands that need to be forwarded to the BOMD when it wakes up.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclEventsServerAlloc

struct ZbZclClusterT * ZbZclEventsServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclEventsServerCallbacksT *callbacks, void *arg);

Create a new instance of the Events Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclEventsServerClearEventLogRsp

enum ZclStatusCodeT ZbZclEventsServerClearEventLogRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclEventsServerClearEventLogResponseT *rsp);

Send a Clear Event Log Response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for command
rsp Clear Event Log Response command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclEventsServerPublishEventUnsolic

enum ZclStatusCodeT ZbZclEventsServerPublishEventUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclEventsServerPublishEventT *event, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send a Publish Event command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for command
event Publish Event command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected
arg Pointer to application data that will later be provided back to the callback function when invoked

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Structures

ZbZclEventsClientCallbacksT

Events Client callbacks configuration

Parameters

publish_event

(callback function pointer)

enum ZclStatusCodeT (*publish_event)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclEventsServerPublishEventT *event, const struct ZbApsAddrT *src)

Callback to application, invoked on receipt of Publish Event command.

publish_event_log

(callback function pointer)

enum ZclStatusCodeT (*publish_event_log)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclEventsServerPublishEventLogT *event_log, const struct ZbApsAddrT *src)

Callback to application, invoked on receipt of Publish Event Log command.

ZbZclEventsClientClearEventLogT

Clear Event Log command structure

Parameters

uint8_t log_id Log ID
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD.

ZbZclEventsClientGetEventLogT

Get Event Log command structure

Parameters

uint8_t event_ctrl_log_id Event Control/Log ID. Event Control is high nibble. Log ID is low nibble.
uint16_t event_id Event ID
uint32_t start_time Start Time - UTC Time
uint32_t end_time End Time - UTC Time
uint8_t number_of_events Number of Events
uint16_t event_offset Event Offset
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD.

ZbZclEventsServerCallbacksT

Events Server callbacks configuration

Parameters

get_event_log

(callback function pointer)

enum ZclStatusCodeT (*get_event_log)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclEventsClientGetEventLogT *get_log, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Get Event Log command. Application should call ZbZclEventsServerPublishEventLogRsp for any matching event log, or return ZCL_STATUS_NOT_FOUND otherwise to return a Default Response.

clear_event_log

(callback function pointer)

enum ZclStatusCodeT (*clear_event_log)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclEventsClientClearEventLogT *clear_log, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Clear Event Log Request command. Application calls ZbZclEventsServerClearEventLogRsp to send the response. Application should always return ZCL_STATUS_SUCCESS.

ZbZclEventsServerClearEventLogResponseT

Clear Event Log Response command structure

Parameters

uint8_t cleared_events_logs ClearedEventsLogs

ZbZclEventsServerEventLogPayloadT

Publish Event Log Payload structure

Parameters

uint8_t num_events Number of Events
uint8_t control Log Payload Control
struct ZbZclEventsServerPublishEventT

event_list

Publish Event Response Payload

ZbZclEventsServerPublishEventLogT

Publish Event Log command structure

Parameters

uint16_t total_matching_events Total Number of Matching Events
uint8_t command_index Command Index
uint8_t total_commands Total Commands
struct ZbZclEventsServerEventLogPayloadT log_payload Log Payload

ZbZclEventsServerPublishEventT

Publish Event command structure

Parameters

uint8_t log_id Log ID
uint16_t event_id Event ID
uint32_t event_time Event Time - UTC time
uint8_t event_control Event Control
uint8_t *event_data Event Data - max length = ZCL_EVENTS_SVR_EVENT_DATA_MAX_LEN
uint8_t event_data_len Event Data length

5. Messaging

#include "zcl/se/zcl.message.h"

Functions

ZbZclMessageClientParseDisplayMsg

enum ZclStatusCodeT ZbZclMessageClientParseDisplayMsg(struct ZbZclMsgMessageT *msg, uint8_t *payload, unsigned int len);

Parses a ZCL_MESSAGE_SVR_CMD_DISPLAY_MESSAGE paylaod into a 'struct ZbZclMsgMessageT'.

Parameters

msg Structure to parse message into
payload ZCL payload of ZCL_MESSAGE_SVR_CMD_DISPLAY_MESSAGE packet
len Length of payload

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMsgClientAlloc

struct ZbZclClusterT * ZbZclMsgClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclMsgClientCallbacksT *callbacks, void *arg);

Create a new instance of the Messaging Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclMsgClientConfEnhReq

enum ZclStatusCodeT ZbZclMsgClientConfEnhReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclMsgConfirmEnhT *msg_conf_enh,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an Enhanced Message Confirmation command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
msg_conf_enh Enhanced Message Confirmation command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMsgClientConfReq

enum ZclStatusCodeT ZbZclMsgClientConfReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclMsgConfirmT *msg_conf,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Message Confirmation command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
msg_conf Message Confirmation command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMsgClientGetLastReq

enum ZclStatusCodeT ZbZclMsgClientGetLastReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Last Message command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMsgClientGetMsgCancelReq

enum ZclStatusCodeT ZbZclMsgClientGetMsgCancelReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, uint32_t earliestTime,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Message Cancellation command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
earliestTime UTC Timestamp indicating the earliest implementation time of a Cancel All Messages command to be returned
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMsgMirrorAlloc

struct ZbZclClusterT * ZbZclMsgMirrorAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclClusterT *msg_server,
struct ZbZclClusterT *meter_mirror, struct ZbZclClusterT *meter_client);

Allocates a Messaging Client Mirror cluster.

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
msg_server Pointer to Messaging Server cluster. This is used by the Metering Mirror to send mirrored commands to the BOMD.
meter_mirror Pointer to Metering Mirror cluster. This is used to queue any commands that need to be forwarded to the BOMD when it wakes up.
meter_client Pointer to Metering Client cluster. This is used to know the existing notification scheme setup between BOMD & ESI and to determine if the command needs to be queued or only the notification flag needs to be set.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclMsgServerAlloc

struct ZbZclClusterT * ZbZclMsgServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclMsgServerCallbacksT *callbacks, void *arg);

Create a new instance of the Messaging Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclMsgServerCancelAllRsp

enum ZclStatusCodeT ZbZclMsgServerCancelAllRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dstInfo,
struct ZbZclMsgMessageCancelAllT *cancel_all);

Send a Cancel All Messages command as a response

Parameters

cluster Cluster instance from which to send this command
dstInfo Destination address for response
cancel_all Cancel All Messages command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMsgServerCancelAllUnsolic

enum ZclStatusCodeT ZbZclMsgServerCancelAllUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMsgMessageCancelAllT *cancel_all, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an Unsolicited Cancel All Messages command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cancel_all Cancel All Messages command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMsgServerCancelMessageReq

enum ZclStatusCodeT ZbZclMsgServerCancelMessageReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclMsgMessageCancelT *cancel,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Cancel Message command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cancel Cancel Message command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMsgServerDisplayMessageRsp

enum ZclStatusCodeT ZbZclMsgServerDisplayMessageRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dstInfo, struct ZbZclMsgMessageT *msg);

Send a Display or Display Protected Message as response

Parameters

cluster Cluster instance from which to send this command
dstInfo Destination address for command, including sequence number and tx options
msg Display Message command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMsgServerDisplayMessageUnsolic

enum ZclStatusCodeT ZbZclMsgServerDisplayMessageUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMsgMessageT *msg, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an unsolicited Display or Display Protected Message command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
msg Display Message command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Structures

ZbZclMsgClientCallbacksT

Messaging Client callbacks configuration

Parameters

display_message

(callback function pointer)

enum ZclStatusCodeT (*display_message)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclMsgMessageT *msg, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Display Message command

cancel_message

(callback function pointer)

enum ZclStatusCodeT (*cancel_message)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclMsgMessageCancelT *cancel, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Cancel Message command

cancel_all_messages

(callback function pointer)

enum ZclStatusCodeT (*cancel_all_messages)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclMsgMessageCancelAllT *cancel_all, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Cancel All Messages command

display_protected_message

(callback function pointer)

enum ZclStatusCodeT (*display_protected_message)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclMsgMessageT *msg, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Display Protected Message command

ZbZclMsgConfirmEnhT

Enhanced Message Confirmation command structure

Parameters

uint32_t message_id Message ID
uint32_t confirm_time Confirmation Time
uint8_t confirm_control Message Confirmation Control
char confirm_response Message Confirmation Response

ZbZclMsgConfirmT

Message Confirmation command structure

Parameters

uint32_t message_id Message ID
uint32_t confirm_time Confirmation Time

ZbZclMsgGetMsgCancellationT

Get Messsage Cancellation command structure

Parameters

uint32_t earliest_impl_time Earliest Implementation Time

ZbZclMsgMessageCancelAllT

Cancel All Messages command structure

Parameters

uint32_t implementation_time Implementation Date/Time
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclMsgMessageCancelT

Cancel Message command structure

Parameters

uint32_t message_id Message ID
uint8_t control Message Control
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclMsgMessageConfT

Message Confirmation callback structure

Parameters

uint32_t message_id Message ID
uint32_t confirm_time Confirmation Time
bool has_confirm_control Has Message Confirmation Control
uint8_t confirm_control Message Confirmation Control
bool has_confirm_response Has Message Confirmation Response
uint8_t confirm_response Message Confirmation Response

ZbZclMsgMessageT

Display Message/Display Protected Message command structure

Parameters

uint32_t message_id Message ID
uint32_t start_time Start Time - UTC Seconds
uint16_t duration Duration In Minutes
uint8_t message_control Message Control
uint8_t message_len Message Length
uint8_t *message_str Message - UTF-8
uint8_t extended_control Extended Message Control
bool protected_msg If true, indicates display message is protected.
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclMsgServerCallbacksT

Messaging Server callbacks configuration

Parameters

get_last_message

(callback function pointer)

enum ZclStatusCodeT (*get_last_message)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Get Last Message command

message_confirmation

(callback function pointer)

enum ZclStatusCodeT (*message_confirmation)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclMsgMessageConfT *conf, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Message Confirmation command

get_message_cancellation

(callback function pointer)

enum ZclStatusCodeT (*get_message_cancellation)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclMsgGetMsgCancellationT *req, struct ZbZclAddrInfoT *source)

Callback to application, invoked on receipt of Get Message Cancellation command

6. Metering

#include "zcl/se/zcl.meter.h"

Functions

ZbZclMeterClientAlloc

struct ZbZclClusterT * ZbZclMeterClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclMeterClientCallbacksT *callbacks, void *arg);

Create a new instance of the Metering Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclMeterClientAttachMirror

bool ZbZclMeterClientAttachMirror(struct ZbZclClusterT *cluster, struct ZbZclClusterT mirror_server, uint64_t rmt_addr, uint8_t rmt_endpoint);

Attach the Meter Mirror Server to the Meter Client. Configures the Client to manage the Mirror Server, and handle reports from the remote Meter and update the Mirror Server attributes.

Parameters

cluster EXEGIN
mirror_server Pointer to the Mirror Server cluster.
rmt_addr EUI64 address of the remote Meter Server.
rmt_endpoint Endpoint on the remote Meter Server.

Return

  • True if the Mirror Server could be attached, false otherwise.

ZbZclMeterClientClearNotifFlag

bool ZbZclMeterClientClearNotifFlag(struct ZbZclClusterT *cluster, uint16_t attr_id, uint32_t notif_flag);

Clear the Metering Client notification flag(s).

Parameters

cluster Metering client cluster instance.
attr_id Notification flag attribute id.
notif_flag Notification flag(s) to be cleared.

Return

  • True if notification flag is cleared successfully, false otherwise.

ZbZclMeterClientCommandChangeSupplyReq

enum ZclStatusCodeT ZbZclMeterClientCommandChangeSupplyReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMeterClientChangeSupplyReqT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Change Supply Command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Change Supply payload information structure.
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterClientCommandFastPollReq

enum ZclStatusCodeT ZbZclMeterClientCommandFastPollReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMeterClientFastPollModeReqT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Request Fast Poll Mode command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Request Fast Poll Mode command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterClientCommandGetProfileReq

enum ZclStatusCodeT ZbZclMeterClientCommandGetProfileReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMeterClientGetProfileReqT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Profile command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Profile command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterClientCommandGetSampledDataReq

enum ZclStatusCodeT ZbZclMeterClientCommandGetSampledDataReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMeterClientGetSampledDataReqT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Sampled Data command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Sampled Data command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterClientCommandGetSnapshotReq

enum ZclStatusCodeT ZbZclMeterClientCommandGetSnapshotReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMeterClientGetSnapshotReqT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Snapshot command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Snapshot command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterClientCommandLocalChangeSupplyReq

enum ZclStatusCodeT ZbZclMeterClientCommandLocalChangeSupplyReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMeterClientLocalChangeSupplyReqT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Local Change Supply command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Profile command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterClientCommandResetLoadLimitCounterReq

enum ZclStatusCodeT ZbZclMeterClientCommandResetLoadLimitCounterReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMeterClientResetLoadLimitCounterReqT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send Reset Load Limit Counter command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Reset Load Limit Counter command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterClientCommandScheduleSnapshotReq

enum ZclStatusCodeT ZbZclMeterClientCommandScheduleSnapshotReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMeterClientScheduleSnapshotReqT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Schedule Snapshot Request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Schedule Snapshot Request command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterClientCommandSetSupplyStatusReq

enum ZclStatusCodeT ZbZclMeterClientCommandSetSupplyStatusReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMeterClientSetSupplyStatusReqT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Set Supply Status command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Set Supply Status command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterClientCommandSetUnctrlFlowThreshReq

enum ZclStatusCodeT ZbZclMeterClientCommandSetUnctrlFlowThreshReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMeterClientSetUnctrlFlowThreshReqT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Set Uncontrolled Flow Threshold command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Set Uncontrolled Flow Threshold command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterClientCommandStartSamplingReq

enum ZclStatusCodeT ZbZclMeterClientCommandStartSamplingReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMeterClientStartSamplingReqT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Start Sampling command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Start Sampling command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterClientCommandTakeSnapshotReq

enum ZclStatusCodeT ZbZclMeterClientCommandTakeSnapshotReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMeterClientTakeSnapshotReqT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Take Snapshot command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Take Snapshot command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterClientSetNotifFlag

bool ZbZclMeterClientSetNotifFlag(struct ZbZclClusterT *cluster, uint16_t attr_id, uint32_t notif_flag);

Set the Metering Client notification flag(s).

Parameters

cluster Metering client cluster instance.
attr_id Notification flag attribute id.
notif_flag Notification(s) flag to be set.

Return

  • True if notification flag is set successfully, false otherwise.

ZbZclMeterFormSampledData

int ZbZclMeterFormSampledData(uint8_t *sample_data, unsigned int max_len, uint32_t *samples, uint16_t num_samples);

Convert an array of 24-bit integers to the Zigbee frame format

Parameters

sample_data Converted data for Zigbee frame
max_len Maximum length
samples Array of 24-bit integers to convert
num_samples Number of integers to convert

Return

  • Returns the number of octets written to sample_data or -1 on error

ZbZclMeterGetProfileIntervalPeriod

int ZbZclMeterGetProfileIntervalPeriod(uint8_t profile_interval_id);

Convert the profile interval period enumerated value to a time in seconds

Parameters

profile_interval_id Zigbee stack instance

Return

  • Converted time in seconds or -1 on error

ZbZclMeterMirrorAlloc

struct ZbZclClusterT * ZbZclMeterMirrorAlloc(struct ZigBeeT *zb, struct ZbZclClusterT *client, uint8_t endpoint, uint64_t meter_extaddr,
uint8_t meter_endpoint);

Allocate a Meter Server used for Mirroring.

Parameters

zb
client Meter Client being used to manage this Mirror Server
endpoint
meter_extaddr The EUI64 of the remote Meter Server
meter_endpoint The endpoint on the remote Meter Server

Return

  • Undocumented

ZbZclMeterMirrorBomdReadReq

enum ZclStatusCodeT ZbZclMeterMirrorBomdReadReq(struct ZbZclClusterT *meter_mirror, struct ZbZclClusterT *client,
struct ZbZclReadReqT *req, void (*callback)(const struct ZbZclReadRspT *readRsp, void *cb_arg), void *arg);

Sends a One-Way Mirror ZCL Read Request to the BOMD. The request is queued until the BOMD wakes up. The ZCL_METER_FUNC_NOTIF_FLAG_STAY_AWAKE_HAN notification flag is set so the BOMD knows to keep polling for data after waking up. The Metering Mirror Cluster must already be allocated.

Parameters

meter_mirror Metering Mirror cluster
client Client cluster originating this request
req ZCL Read Request struct
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterMirrorBomdWriteReq

enum ZclStatusCodeT ZbZclMeterMirrorBomdWriteReq(struct ZbZclClusterT *meter_mirror, struct ZbZclClusterT *client, struct ZbZclWriteReqT *req,
void (*callback)(const struct ZbZclWriteRspT *writeRsp, void *cb_arg), void *arg);

Sends a One-Way Mirror ZCL Write Request to the BOMD. The request is queued until the BOMD wakes up. The ZCL_METER_FUNC_NOTIF_FLAG_STAY_AWAKE_HAN notification flag is set so the BOMD knows to keep polling for data after waking up. The Metering Mirror Cluster must already be allocated.

Parameters

meter_mirror Metering Mirror cluster
client Client cluster originating this request
req ZCL Write Request struct
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterServerAlloc

struct ZbZclClusterT * ZbZclMeterServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclMeterServerCallbacksT *callbacks, void *arg);

Create a new instance of the Metering Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callbacks when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclMeterServerPublishSnapshotRsp

enum ZclStatusCodeT ZbZclMeterServerPublishSnapshotRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dstInfo,
struct ZbZclMeterServerPublishSnapshotT *rsp);

Send a Publish Snapshot Response command

Parameters

cluster Cluster instance from which to send this command
dstInfo Destination address for response, including sequence number and tx options
rsp Publish Snapshot Response command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMeterServerPublishSnapshotUnsolic

enum ZclStatusCodeT ZbZclMeterServerPublishSnapshotUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMeterServerPublishSnapshotT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an Unsolicited Publish Snapshot command

Parameters

cluster Cluster instance from which to send this command
dst Destination of command.
req Publish Snapshot command structure.
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterServerSendConfigMirror

enum ZclStatusCodeT ZbZclMeterServerSendConfigMirror(struct ZbZclClusterT *cluster, struct ZbApsAddrT *dst, struct ZbZclMeterServerConfigMirrorT *req,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a ConfigureMirror Command (ZCL_METER_SVR_CMD_CONFIGURE_MIRROR)

Parameters

cluster Cluster instance from which to send this command
dst Destination of command. Should be the Coordinator / TC / Comms Hub in this case.
req ConfigureMirror parameters
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterServerSendConfigNotifFlags

enum ZclStatusCodeT ZbZclMeterServerSendConfigNotifFlags(struct ZbZclClusterT *cluster, struct ZbApsAddrT *dst,
struct ZbZclMeterServerConfigNotifFlagsT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Configure Notification Flags Command (ZCL_METER_SVR_CMD_CONFIGURE_NOTIFICATION_FLAG) "Where ‘Two Way Mirroring’ is being implemented, and a non-default Notification Scheme is to be used, the ConfigureNotificationFlags command allows a BOMD to set the commands relating to the bit value for each NotificationFlags#N attribute that the scheme is proposing to use. This command should be used in conjunction with the associated ConfigureNotificationScheme command."

Parameters

cluster Cluster instance from which to send this command
dst Destination of command. Should be the Coordinator / TC / Comms Hub in this case.
req Configure Notification Flags payload information structure.
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterServerSendConfigNotifScheme

enum ZclStatusCodeT ZbZclMeterServerSendConfigNotifScheme(struct ZbZclClusterT *cluster, struct ZbApsAddrT *dst,
struct ZbZclMeterServerConfigNotifSchemeT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Configure Notification Scheme Command (ZCL_METER_SVR_CMD_CONFIGURE_NOTIFICATION_SCHEME)

Parameters

cluster Cluster instance from which to send this command
dst Destination of command. Should be the Coordinator / TC / Comms Hub in this case.
req Configure Notification Scheme payload information structure.
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterServerSendFastPollModeRsp

enum ZclStatusCodeT ZbZclMeterServerSendFastPollModeRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dstInfo,
struct ZbZclMeterServerFastPollModeRspT *rsp);

Send a Request Fast Poll Mode Response command

Parameters

cluster Cluster instance from which to send this command
dstInfo Destination address for response, including sequence number and tx options
rsp Request Fast Poll Mode Response command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMeterServerSendGetNotifMsg

enum ZclStatusCodeT ZbZclMeterServerSendGetNotifMsg(struct ZbZclClusterT *cluster, struct ZbApsAddrT *dst,
struct ZbZclMeterServerGetNotifMsgT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Notified Message Command.

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
req Get Notified Message payload information structure.
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterServerSendGetProfileRsp

enum ZclStatusCodeT ZbZclMeterServerSendGetProfileRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclMeterServerGetProfileRspT *rsp);

Send a Get Profile Response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Get Profile Response command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMeterServerSendGetSampledDataRsp

enum ZclStatusCodeT ZbZclMeterServerSendGetSampledDataRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclMeterServerGetSampledDataRspT *rsp);

Send a Get Sampled Data Response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Get Sampled Data Response command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMeterServerSendRemoveMirror

enum ZclStatusCodeT ZbZclMeterServerSendRemoveMirror(struct ZbZclClusterT *cluster, struct ZbApsAddrT *dst,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Remove Mirror Command (ZCL_METER_SVR_CMD_REMOVE_MIRROR)

Parameters

cluster Cluster instance from which to send this command
dst Destination of command. Should be the Coordinator / TC / Comms Hub in this case.
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterServerSendRequestMirror

enum ZclStatusCodeT ZbZclMeterServerSendRequestMirror(struct ZbZclClusterT *cluster, struct ZbApsAddrT *dst,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Request Mirror Command (ZCL_METER_SVR_CMD_REQUEST_MIRROR)

Parameters

cluster Cluster instance from which to send this command
dst Destination of command. Should be the Coordinator / TC / Comms Hub in this case.
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterServerSendScheduleSnapshotRsp

enum ZclStatusCodeT ZbZclMeterServerSendScheduleSnapshotRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclMeterClientScheduleSnapshotRspT *rsp);

Send a Schedule Snapshot Response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Schedule Snapshot Response command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMeterServerSendStartSamplingRsp

enum ZclStatusCodeT ZbZclMeterServerSendStartSamplingRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclMeterClientStartSamplingRspT *rsp);

Send a Start Sampling Response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Start Sampling Response command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMeterServerSendSupplyStatusRsp

enum ZclStatusCodeT ZbZclMeterServerSendSupplyStatusRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dstInfo,
struct ZbZclMeterServerSupplyStatusRspT *rsp);

Send a Supply Status Response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Supply Status Response command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMeterServerSendTakeSnapshotRsp

enum ZclStatusCodeT ZbZclMeterServerSendTakeSnapshotRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclMeterClientTakeSnapshotRspT *rsp);

Send a Take Snapshot Response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Take Snapshot Response command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Structures

ZbZclMeterClientMirrorReportAttrRspT

MirrorReportAttributeResponse Command

Parameters

enum ZbZclMeterNotifSchemesT

notif_scheme

Notification Scheme
uint8_t num_flags Notification Flags

7. Prepayment

#include "zcl/se/zcl.prepay.h"

Functions

ZbZclPrepayClientAlloc

struct ZbZclClusterT * ZbZclPrepayClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclPrepayClientCallbacksT *callbacks, void *arg);

Create a new instance of the Prepayment Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclPrepayClientChangeDebtReq

enum ZclStatusCodeT ZbZclPrepayClientChangeDebtReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepayChangeDebtReqT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Change Debt command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
info Change Debt command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayClientChangePaymentModeReq

enum ZclStatusCodeT ZbZclPrepayClientChangePaymentModeReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepayChangePaymentModeReqT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Change Payment Mode command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
info Change Payment Mode command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayClientConsumerTopUpReq

enum ZclStatusCodeT ZbZclPrepayClientConsumerTopUpReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepayConsumerTopUpReqT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Consumer Top Up command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
info Consumer Top Up command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayClientCreateMirror

struct ZbZclClusterT * ZbZclPrepayClientCreateMirror(struct ZbZclClusterT *cluster, uint8_t endpoint, struct ZbZclClusterT *meter_mirror_client,
struct ZbZclClusterT *meter_mirror_server, uint64_t rmt_addr, uint8_t rmt_endpoint);

Allocates a PrePayment Server Mirror cluster. The caller (application) must attach any attributes to the cluster you want to mirror. By default, stack attaches the mandatory prepayment server attributes.

Parameters

cluster Prepayment client cluster instance
endpoint Endpoint on which to create the mirror cluster
meter_mirror_client Metering Mirror Client cluster. This is used to manage the Mirror.
meter_mirror_server Metering Mirror Server cluster. This is used to queue any commands that need to be forwarded to the BOMD when it wakes up.
rmt_addr Extended address of the remote Metering device being mirrored.
rmt_endpoint Endpoint on the remote Metering device being mirrored.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclPrepayClientCreditAdjustReq

enum ZclStatusCodeT ZbZclPrepayClientCreditAdjustReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepayCreditAdjustReqT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Credit Adjustment command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
info Credit Adjustment command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayClientEmergCreditSetupReq

enum ZclStatusCodeT ZbZclPrepayClientEmergCreditSetupReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepayEmergCreditSetupReqT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Emergency Credit Setup command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
info Emergency Credit Setup command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayClientGetDebtRepayLogReq

enum ZclStatusCodeT ZbZclPrepayClientGetDebtRepayLogReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepayGetDebtRepayLogReqT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Debt Repayment Log command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
info Get Debt Repayment Log command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayClientGetPrepaySnapshotReq

enum ZclStatusCodeT ZbZclPrepayClientGetPrepaySnapshotReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepayGetPrepaySnapshotReqT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Prepay Snapshot command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
info Get Prepay Snapshot command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayClientGetTopUpLogReq

enum ZclStatusCodeT ZbZclPrepayClientGetTopUpLogReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepayGetTopUpLogReqT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get TopUp Log command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
info Get TopUp Log command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayClientSelectAvailEmergCreditReq

enum ZclStatusCodeT ZbZclPrepayClientSelectAvailEmergCreditReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepaySelectAvailEmergCreditReqT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Select Available Emergency Credit command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
info Select Available Emergency Credit command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayClientSetLowCreditWarnLevelReq

enum ZclStatusCodeT ZbZclPrepayClientSetLowCreditWarnLevelReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepaySetLowCreditWarnLevelReqT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Set Low Credit Warning Level command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
info Set Low Credit Warning Level command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayClientSetMaxCreditLimitReq

enum ZclStatusCodeT ZbZclPrepayClientSetMaxCreditLimitReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepaySetMaxCreditLimitReqT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Set Max Credit Limit command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
info Set Max Credit Limit command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayClientSetOverallDebtCapReq

enum ZclStatusCodeT ZbZclPrepayClientSetOverallDebtCapReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepaySetOverallDebtCapReqT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Set Overall Debt Cap command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
info Set Overall Debt Cap command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayServerAlloc

struct ZbZclClusterT * ZbZclPrepayServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclClusterT *time_server,
struct ZbZclPrepayServerCallbacksT *callbacks, void *arg);

Create a new instance of the Prepayment Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
time_server Pointer to time server cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will be included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclPrepayServerAttrCreditRemainingWriteCb

enum ZclStatusCodeT ZbZclPrepayServerAttrCreditRemainingWriteCb(struct ZbZclClusterT *cluster, struct ZbZclAttrCbInfoT *info);

Prepayment server default write callback for optional attribute 'Credit Remaining'.

Parameters

cluster Cluster instance for Prepayment server.
info Attribute information structure.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayServerChangePaymentModeRsp

enum ZclStatusCodeT ZbZclPrepayServerChangePaymentModeRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPrepayChangePaymentModeRspT *info);

Send a Change Payment Mode response

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
info Change Payment Mode Response command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayServerConsumerTopUpRsp

enum ZclStatusCodeT ZbZclPrepayServerConsumerTopUpRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPrepayConsumerTopUpRspT *info);

Send a Consumer Top Up response

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
info Consumer Top Up Response command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayServerPublishDebtLogRsp

enum ZclStatusCodeT ZbZclPrepayServerPublishDebtLogRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dstInfo,
struct ZbZclPrepayPublishDebtLogT *info);

Send a Publish Debt Log Response

Parameters

cluster Cluster instance from which to send this command
dstInfo Destination address for response, including sequence number and tx options
info Publish Debt Log command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayServerPublishDebtLogUnsolic

enum ZclStatusCodeT ZbZclPrepayServerPublishDebtLogUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepayPublishDebtLogT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an unsolicited Publish Debt Log

Parameters

cluster Cluster instance from which to send this command
dst Destination address for this unsolicted command.
info Publish Debt Log command structure.
callback Callback function that will be invoked when the Default Response is received, or times-out.
arg Pointer to application data that will be included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayServerPublishPrepaySnapshotRsp

enum ZclStatusCodeT ZbZclPrepayServerPublishPrepaySnapshotRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dstInfo,
struct ZbZclPrepayPublishPrepaySnapshotT *info);

Send a Publish Prepay Snapshot as a response to the GetPrepaySnapshot command.

Parameters

cluster Cluster instance from which to send this command
dstInfo Destination address for response, including sequence number and tx options
info Publish Prepay Snapshot command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayServerPublishPrepaySnapshotUnsolic

enum ZclStatusCodeT ZbZclPrepayServerPublishPrepaySnapshotUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepayPublishPrepaySnapshotT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Publish Prepay Snapshot as an unsolicited command

Parameters

cluster Cluster instance from which to send this command
dstInfo Destination address for response, including sequence number and tx options
info Publish Prepay Snapshot command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayServerPublishTopUpLogRsp

enum ZclStatusCodeT ZbZclPrepayServerPublishTopUpLogRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dstInfo,
struct ZbZclPrepayPublishTopUpLogT *info);

Send a Publish Top Up Log as a response

Parameters

cluster Cluster instance from which to send this command
dstInfo Destination address for response, including sequence number and tx options

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayServerPublishTopUpLogUnsolic

enum ZclStatusCodeT ZbZclPrepayServerPublishTopUpLogUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepayPublishTopUpLogT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Publish Top Up Log as an unsolicited command

Parameters

cluster Cluster instance from which to send this command
dstInfo Destination address for response, including sequence number and tx options
info Publish Top Up Log command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayServerUpdateAlarmStatusFlag

enum ZclStatusCodeT ZbZclPrepayServerUpdateAlarmStatusFlag(struct ZbZclClusterT *cluster, uint16_t flag, bool set);

Set/Clear the alram status flag in 'Alarm Status' attribute.

Parameters

cluster Cluster instance for Prepayment server.
flag Alarm status flags e.g, ZCL_PREPAY_ALARM_LOW_CREDIT_WARN
set if true, sets the input flags. Otherwise, clears the flags.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayServerUpdateCreditStatusFlag

enum ZclStatusCodeT ZbZclPrepayServerUpdateCreditStatusFlag(struct ZbZclClusterT *cluster, uint8_t flag, bool set);

Set/Clear the credit status flag in 'Credit Status' attribute.

Parameters

cluster Cluster instance for Prepayment server.
flag Credit status flags e.g, ZCL_PREPAY_CREDIT_OK

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

zcl_prepay_get_topup_record

bool zcl_prepay_get_topup_record(struct ZbZclClusterT *cluster, struct ZbZclPrepayTopUpPayloadT *payload, uint8_t attr_idx);

Helper function to retrieve the topup record from the topup attribute set pointed by attribute index.

Parameters

cluster Cluster instance to get the topup record.
payload Pointer to TopUp record payload.
attr_idx Attribute index to the TopUp attribute set

Return

  • true if the top up record is retrieved successfully, false otherwise.

zcl_prepay_topup_code_duplicate_check

bool zcl_prepay_topup_code_duplicate_check(struct ZbZclClusterT *cluster, const uint8_t *topup_code);

Helper function to check if the topup code received is duplicate or not.

Parameters

cluster Cluster instance from which to send this command
topup_code Pointer to topup_code received as part of comsumer topup command.

Return

  • true if the received topup code is duplicate, false otherwise.

zcl_prepay_update_topup_attrs

enum ZbZclPrepayTopUpResultT zcl_prepay_update_topup_attrs(struct ZbZclClusterT *cluster, enum ZbZclPrepayOriginDeviceT origin_device,
uint8_t *topup_code, int32_t topup_value);

Helper function to update the prepayment server topup attributes on receiving the consumer topup command.

Parameters

cluster Cluster instance to check the topup attributes.
origin_device Origin device of the consumer topup command.
topup_code Pointer to topup code received as part of consumer topup command.
topup_value topup amount derived from the topup code.

Return

  • ZCL_PREPAY_TOPUP_RSLT_ACCEPTED if the topup attributes are updated successfully, ZCL_PREPAY_TOPUP_RSLT_RJCTD_MAX_CREDIT if the top amount results in credit remaining value exceeding the maximum credit limit.

Enumerations

ZbZclPreaymentSvrAttrT

Prepayment Server Attribute IDs

ZCL_PREPAY_SVR_ATTR_PAYMENT_CONTROL_CONFIG Payment Control Configuration
ZCL_PREPAY_SVR_ATTR_CREDIT_REMAINING Credit Remaining (Optional)
ZCL_PREPAY_SVR_ATTR_EMERG_CREDIT_REMAINING Emergency Credit Remaining (Optional)
ZCL_PREPAY_SVR_ATTR_CREDIT_STATUS Credit Status (Optional)
ZCL_PREPAY_SVR_ATTR_CREDIT_REMAIN_TIMESTAMP CreditRemaining TimeStamp (Optional)
ZCL_PREPAY_SVR_ATTR_ACCUMULATED_DEBT Accumulated Debt (Optional)
ZCL_PREPAY_SVR_ATTR_OVERALL_DEBT_CAP OverallDebtCap (Optional)
ZCL_PREPAY_SVR_ATTR_EMERG_CREDIT_ALLOWANCE EmergencyCredit Limit/Allowance (Optional)
ZCL_PREPAY_SVR_ATTR_EMERG_CREDIT_THRESHOLD EmergencyCredit Threshold (Optional)
ZCL_PREPAY_SVR_ATTR_TOTAL_CREDIT_ADDED TotalCreditAdded (Optional)
ZCL_PREPAY_SVR_ATTR_MAX_CRED_LIMIT MaxCreditLimit (Optional)
ZCL_PREPAY_SVR_ATTR_MAX_CRED_PER_TOPUP MaxCreditPerTopUp (Optional)
ZCL_PREPAY_SVR_ATTR_FRIENDLY_CREDIT_WARNING FriendlyCredit Warning (Optional)
ZCL_PREPAY_SVR_ATTR_LOW_CREDIT_WARNING LowCredit Warning (Optional)
ZCL_PREPAY_SVR_ATTR_IHD_LOW_CREDIT_WARNING IHDLow CreditWarning (Optional)
ZCL_PREPAY_SVR_ATTR_INTERRUPT_SUSPEND_TIME InterruptSuspend Time (Optional)
ZCL_PREPAY_SVR_ATTR_REMAINING_FRIENDLY_CREDIT

_TIME

RemainingFriendlyCreditTime (Optional)
ZCL_PREPAY_SVR_ATTR_NEXT_FRIENDLY_CREDIT_TIME NextFriendly CreditPeriod (Optional)
ZCL_PREPAY_SVR_ATTR_CUT_OFF_VALUE CutOffValue (Optional)
ZCL_PREPAY_SVR_ATTR_TOKEN_CARRIER_ID TokenCarrierID (Optional)
ZCL_PREPAY_SVR_ATTR_TOPUP_DATE_TIME_1 Top up Date/Time #1 (Optional) ZCL_PREPAY_SVR_ATTR_TOPUP_DATE_TIME_N(1) For the

remaining Top up Date/Time attributes, use the ZCL_PREPAY_SVR_ATTR_TOPUP_DATE_TIME_N macro.

ZCL_PREPAY_SVR_ATTR_TOPUP_AMOUNT_1 Top up Amount #1 (Optional) ZCL_PREPAY_SVR_ATTR_TOPUP_AMOUNT_N(1) For the remaining Top up Amount attributes, use the ZCL_PREPAY_SVR_ATTR_TOPUP_AMOUNT_N macro.
ZCL_PREPAY_SVR_ATTR_TOPUP_ORIGINATOR Originating Device #1 (Optional) ZCL_PREPAY_SVR_ATTR_TOPUP_ORIGINATOR_N(1) For the remaining Orginating Device attributes, use the ZCL_PREPAY_SVR_ATTR_TOPUP_ORIGINATOR_N macro.
ZCL_PREPAY_SVR_ATTR_TOPUP_CODE Top up Code #1 (Optional) ZCL_PREPAY_SVR_ATTR_TOPUP_CODE_N(1) For the remaining Top up Code attributes, use the ZCL_PREPAY_SVR_ATTR_TOPUP_CODE_N macro.
ZCL_PREPAY_SVR_ATTR_DEBT_LABEL_1 DebtLabel#1 (Optional) ZCL_PREPAY_SVR_ATTR_DEBT_LABEL_N(1) For the remaining DebtLabel attributes, use the ZCL_PREPAY_SVR_ATTR_DEBT_LABEL_N macro.
ZCL_PREPAY_SVR_ATTR_DEBT_AMOUNT_1 DebtAmount#1 (Optional) ZCL_PREPAY_SVR_ATTR_DEBT_AMOUNT_N(1) For the remaining DebtAmount attributes, use the ZCL_PREPAY_SVR_ATTR_DEBT_AMOUNT_N macro.
ZCL_PREPAY_SVR_ATTR_DEBT_REC_METHOD_1 DebtRecovery Method#1 (Optional) ZCL_PREPAY_SVR_ATTR_DEBT_REC_METHOD_N(1) For the remaining DebtRecovery Method attributes, use the ZCL_PREPAY_SVR_ATTR_DEBT_REC_METHOD_N macro.
ZCL_PREPAY_SVR_ATTR_DEBT_REC_START_TIME_1 DebtRecovery StartTime#1 (Optional) ZCL_PREPAY_SVR_ATTR_DEBT_REC_START_TIME_N(1)

For the remaining DebtRecovery StartTime attributes, use the ZCL_PREPAY_SVR_ATTR_DEBT_REC_START_TIME_N macro.

ZCL_PREPAY_SVR_ATTR_DEBT_REC_COLLECT_TIME_1 DebtRecovery CollectionTime#1 (Optional) ZCL_PREPAY_SVR_ATTR_DEBT_REC_COLLECT_TIME_N(1)

For the remaining DebtRecovery CollectionTime attributes, use the ZCL_PREPAY_SVR_ATTR_DEBT_REC_COLLECT_TIME_N macro.

ZCL_PREPAY_SVR_ATTR_DEBT_REC_FREQ_1 DebtRecovery Frequency#1 (Optional) ZCL_PREPAY_SVR_ATTR_DEBT_REC_FREQ_N(1) For the

remaining DebtRecovery Frequency attributes, use the ZCL_PREPAY_SVR_ATTR_DEBT_REC_FREQ_N macro.

ZCL_PREPAY_SVR_ATTR_DEBT_REC_AMOUNT_1 DebtRecovery Amount#1 (Optional) ZCL_PREPAY_SVR_ATTR_DEBT_REC_AMOUNT_N(1) For

the remaining DebtRecovery Amount attributes, use the ZCL_PREPAY_SVR_ATTR_DEBT_REC_AMOUNT_N macro.

ZCL_PREPAY_SVR_ATTR_DEBT_REC_TOPUP_PERCENT_1 DebtRecovery TopUpPercentage#1 (Optional) ZCL_PREPAY_SVR_ATTR_DEBT_REC_TOPUP_PERCENT_

N(1) For the remaining DebtRecovery TopUpPercentage attributes, use the ZCL_PREPAY_SVR_ATTR_DEBT_REC_TOPUP_PERCENT_N

macro.

ZCL_PREPAY_SVR_ATTR_ALARM_STATUS PrepaymentAlarmStatus (Optional)
ZCL_PREPAY_SVR_ATTR_GENERIC_ALARM_MASK PrepayGenericAlarmMask (Optional)
ZCL_PREPAY_SVR_ATTR_SWITCH_ALARM_MASK PrepaySwitchAlarmMask (Optional)
ZCL_PREPAY_SVR_ATTR_EVENT_ALARM_MASK PrepayEventAlarmMask (Optional)
ZCL_PREPAY_SVR_ATTR_HIST_CCTION_FORMAT HistoricalCostConsumption Formatting (Optional)
ZCL_PREPAY_SVR_ATTR_CONSUMPTION_UNIT_OF_MEAS URE ConsumptionUnitofMeasurement (Optional)
ZCL_PREPAY_SVR_ATTR_CURRENCY_SCALING_FACTOR CurrencyScalingFactor (Optional)
ZCL_PREPAY_SVR_ATTR_CURRENCY Currency (Optional)
ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_DAY_0 CurrentDay CostConsumptionDelivered (Optional) - ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_DAY_N(0)
ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_DAY_0 CurrentDay CostConsumptionReceived (Optional) - ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_DAY_N(0)
ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_DAY_1 PreviousDay CostConsumptionDelivered (Optional) - ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_DAY_N(1)
ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_DAY_1 PreviousDay CostConsumptionReceived (Optional) - ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_DAY_N(1)
ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_DAY_2 PreviousDay2 CostConsumptionDelivered (Optional) ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_DAY_N(2) For

the remaining days, use the ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_DAY_N(prev_d

ay) macro.

ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_DAY_2 PreviousDay2 CostConsumptionReceived (Optional) ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_DAY_N(2)

For the remaining days, use the ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_DAY_N(pr

ev_day) macro.

ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_WEEK_0 CurrentWeek CostConsumptionDelivered (Optional) - ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_WEEK_N(0)
ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_WEEK_0 CurrentWeek CostConsumptionReceived (Optional) - ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_WEEK_N( 0)
ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_WEEK_1 PreviousWeek CostConsumptionDelivered (Optional) - ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_WEEK_N(1)
ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_WEEK_1 PreviousWeek CostConsumptionReceived (Optional) - ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_WEEK_N( 1)
ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_WEEK_2 PreviousWeek2 CostConsumptionDelivered (Optional) ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_WEEK_N(2)

For the remaining weeks, use the ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_WEEK_N(prev

_week) macro.

ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_WEEK_2 PreviousWeek2 CostConsumptionReceived (Optional) ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_WEEK_N(

2) For the remaining weeks, use the ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_WEEK_N(

prev_week) macro.

ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_MONTH_0 CurrentMonth CostConsumptionDelivered (Optional) - ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_MONTH_N(0)
ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_MONTH_0 CurrentMonth CostConsumptionReceived (Optional) - ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_MONTH_ N(0)
ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_MONTH_1 PreviousMonth CostConsumptionDelivered (Optional) - ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_MONTH_N(1)
ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_MONTH_1 PreviousMonth CostConsumptionReceived (Optional) - ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_MONTH_ N(1)
ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_MONTH_2 PreviousMonth2 CostConsumptionDelivered (Optional) ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_MONTH_N(2)

For the remaining months, use the ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_MONTH_N(pre

v_month) macro.

ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_MONTH_2 PreviousMonth2 CostConsumptionReceived (Optional) ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_MONTH_

N(2) For the remaining months, use the ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_MONTH_

N(prev_month) macro.

ZCL_PREPAY_SVR_ATTR_HIST_FREEZE_TIME Historical Freeze Time (Optional)

ZbZclPrepayCreditTypeT

Credit Type Field enumerations

ZCL_PREPAY_CREDIT_TYPE_INCREMENTAL Credit Incremental
ZCL_PREPAY_CREDIT_TYPE_ABSOLUTE Credit Absolute

ZbZclPrepayDebtRecMethodT

Debt Recovery Method enumerations

ZCL_PREPAY_REC_METHOD_TIME Time Based
ZCL_PREPAY_REC_METHOD_PERCENTAGE Percentage Based
ZCL_PREPAY_REC_METHOD_CATCH_UP Catch-up Based
/**< 0x03 -0xff Reserved

ZbZclPrepayDebtTypeT

Debt Type Field enumerations

ZCL_PREPAY_DEBT_TYPE_1_ABSOLUTE Debt Type 1 Absolute
ZCL_PREPAY_DEBT_TYPE_1_INCREMENTAL Debt Type 1 Incremental
ZCL_PREPAY_DEBT_TYPE_2_ABSOLUTE Debt Type 2 Absolute
ZCL_PREPAY_DEBT_TYPE_2_INCREMENTAL Debt Type 2 Incremental
ZCL_PREPAY_DEBT_TYPE_3_ABSOLUTE Debt Type 3 Absolute
ZCL_PREPAY_DEBT_TYPE_3_INCREMENTAL Debt Type 3 Incremental
/**< 0x06 - 0xff Reserved.

ZbZclPrepayOriginDeviceT

Originating Device Field enumerations

ZCL_PREPAY_ORIGIN_DEVICE_ESI Energy Service Interface
ZCL_PREPAY_ORIGIN_DEVICE_METER Meter
ZCL_PREPAY_ORIGIN_DEVICE_IHD In-Home Display Device

ZbZclPrepaySnapshotPayloadTypeT

Prepayment Snapshot Payload type.

ZCL_PREPAY_SNAPSHOT_PAYLOAD_TYPE_DEBT_STATUS Debt/Credit Status

ZbZclPrepayTopUpResultT

Result Type Field enumerations

ZCL_PREPAY_TOPUP_RSLT_ACCEPTED Accepted
ZCL_PREPAY_TOPUP_RSLT_RJCTD_INVALID Rejected-Invalid Top Up
ZCL_PREPAY_TOPUP_RSLT_RJCTD_DUPLICATE Rejected-Duplicate Top Up
ZCL_PREPAY_TOPUP_RSLT_RJCTD_ERROR Rejected-Error
ZCL_PREPAY_TOPUP_RSLT_RJCTD_MAX_CREDIT Rejected-Max Credit Reached
ZCL_PREPAY_TOPUP_RSLT_RJCTD_KEYPAD_LOCK Rejected-Keypad Lock
ZCL_PREPAY_TOPUP_RSLT_RJCTD_TOO_LARGE Rejected-Top Up Value Too Large
ZCL_PREPAY_TOPUP_RSLT_ACCPD_SUPPLY_ENABLED Accepted – Supply Enabled
ZCL_PREPAY_TOPUP_RSLT_ACCPD_SUPPLY_DISABLED Accepted – Supply Disabled
ZCL_PREPAY_TOPUP_RSLT_ACCPD_SUPPLY_ARMED Accepted – Supply Armed

Structures

ZbZclPrepayChangeDebtReqT

Change Debt command structure

Parameters

uint32_t issuer_event_id Issuer Event ID
char debt_label Debt Label, first byte is length.
int32_t debt_amount Debt Amount
enum ZbZclPrepayDebtRecMethodT

rec_method

Debt Recovery Method.
enum ZbZclPrepayDebtTypeT debt_type Debt Amount Type.
uint32_t rec_start_time Debt Recovery Start Time.
uint16_t rec_collect_time Debt Recovery Collection Time.
uint8_t rec_freq Debt Recovery Frequency.
int32_t rec_amount Debt Recovery Amount.
uint16_t rec_bal_percent Debt Recovery Balance Percentage.
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclPrepayChangePaymentModeReqT

Change Payment Mode command structure (ZCL_PREPAY_CLI_CMD_CHANGE_PAYMENT_MODE)

Parameters

uint32_t provider_id Provider ID
uint32_t issuer_event_id Issuer Event ID
uint32_t implement_time Implementation Date/Time
uint16_t ctrl_config Proposed Payment Control Configuration
int32_t cutoff_value Cut Off Value
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclPrepayChangePaymentModeRspT

Consumer Change Supply Mode Response command structure

Parameters

uint8_t friendly_credit Friendly Credit Bitmap
uint32_t friendly_calendar_id Friendly Credit Calendar Id
uint32_t emerg_credit_limit Emergency Credit Limit
uint32_t emerg_credit_thresh Emergency Credit Threshold

ZbZclPrepayConsumerTopUpReqT

Consumer Top Up command structure

Parameters

enum ZbZclPrepayOriginDeviceT

origin_device

Originating Device
uint8_t topup_code TopUp Code (ZCL octet string, first byte is length)
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclPrepayConsumerTopUpRspT

Consumer Top Up Response command structure

Parameters

enum ZbZclPrepayTopUpResultT result Result Type Field enumeration
int32_t value Top Up Value
enum ZbZclPrepayOriginDeviceT source Originating Device Field enumeration
int32_t credit_remain Credit Remaining

ZbZclPrepayCreditAdjustReqT

Credit Adjustment command structure (ZCL_PREPAY_CLI_CMD_CREDIT_ADJUST)

Parameters

uint32_t issuer_event_id Issuer Event ID
uint32_t start_time Start Time
enum ZbZclPrepayCreditTypeT

credit_adjust_type

Credit Adjustment Type
int32_t credit_adjust_value Credit Adjustment Value
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclPrepayDebtRecordT

Debt Payload structure

Parameters

uint32_t collect_time Collection Time - UTC Time
uint32_t amount_collect Amount Collected
enum ZbZclPrepayDebtTypeT debt_type Debt Type
uint32_t outstand_debt Outstanding Debt

ZbZclPrepayEmergCreditSetupReqT

Emergency Credit Setup command structure

Parameters

uint32_t issuer_event_id Issuer Event ID
uint32_t start_time Start Time
uint32_t emerg_credit_limit Emergency Credit Limit
uint32_t emerg_credit_thresh Emergency Credit Threshold
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclPrepayGetDebtRepayLogReqT

Get Debt Repayment Log command structure

Parameters

uint32_t latest_end_time Latest EndTime - UTC Time
uint8_t number_of_debts Number of Debts
enum ZbZclPrepayDebtTypeT debt_type Debt Type
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclPrepayGetPrepaySnapshotReqT

Get Prepay Snapshot command structure (ZCL_PREPAY_CLI_CMD_GET_PREPAY_SNAPSHOT)

Parameters

uint32_t start_time Earliest Start Time - UTC Time
uint32_t latest_end_time Latest End Time - UTC Time
uint8_t snapshot_offset Snapshot offset.
uint32_t snapshot_cause Snapshot cause.
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclPrepayGetTopUpLogReqT

Get TopUp Log command structure

Parameters

uint32_t latest_end_time Latest EndTime - UTC Time
uint8_t number_of_records Number of Records
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclPrepayPublishDebtLogT

Publish Debt Log command structure

Parameters

uint8_t command_index Command Index
uint8_t total_commands Total Number of Commands
struct ZbZclPrepayDebtRecordT

debt_records

Debt Payload
uint8_t num_records Number of records in 'debt_records'

ZbZclPrepaySelectAvailEmergCreditReqT

Select Available Emergency Credit command structure

Parameters

uint32_t issue_time Command Issue Date/Time
enum ZbZclPrepayOriginDeviceT

origin_device

Originating Device
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclPrepayServerCallbacksT

Prepayment Server callbacks configuration

Parameters

select_avail_emerg_credit

(callback function pointer)

enum ZclStatusCodeT (*select_avail_emerg_credit)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPrepaySelectAvailEmergCreditReqT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Select Available Emergency Credit command (ZCL_PREPAY_CLI_CMD_SELECT_AVAIL_EMERG_CREDIT). Return ZCL status code (e.g. ZCL_STATUS_SUCCESS) to include in Default Response. If the application callback returns ZCL status of ZCL_STATUS_SUCCESS, then the stack updates ZCL_PREPAY_SVR_ATTR_CREDIT_STATUS attribute as per the command.

change_debt

(callback function pointer)

enum ZclStatusCodeT (*change_debt)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPrepayChangeDebtReqT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Change Debt command (ZCL_PREPAY_CLI_CMD_CHANGE_DEBT). Return ZCL status code (e.g. ZCL_STATUS_SUCCESS) to include in Default Response. If the application callback returns ZCL status of ZCL_STATUS_SUCCESS, then the stack updates attributes ZCL_PREPAY_SVR_ATTR_DEBT_LABEL_N(n) to

ZCL_PREPAY_SVR_ATTR_DEBT_REC_TOPUP_PERCENT_N(n) as per the command.

emerg_credit_setup

(callback function pointer)

enum ZclStatusCodeT (*emerg_credit_setup)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPrepayEmergCreditSetupReqT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Emergency Credit Setup command (ZCL_PREPAY_CLI_CMD_EMERG_CREDIT_SETUP). Return ZCL status code (e.g. ZCL_STATUS_SUCCESS) to include in Default Response. If the application callback returns ZCL status of ZCL_STATUS_SUCCESS, then the stack updates the attributes ZCL_PREPAY_SVR_ATTR_EMERG_CREDIT_ALLOWANCE and ZCL_PREPAY_SVR_ATTR_EMERG_CREDIT_THRESHOLD, provided start_time is != 0xffffffff. If start_time is 0xffffffff then previous scheduled & unactioned emerg_credit_setup requests with matching 'IssuerEvent ID' will be cancelled.

consumer_topup

(callback function pointer)

enum ZclStatusCodeT (*consumer_topup)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPrepayConsumerTopUpReqT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Consumer Top Up command. Return ZCL_STATUS_SUCCESS if log(s) found and Consumer Top Up Response sent (ZbZclPrepayServerConsumerTopUpRsp), or ZCL_STATUS_NOT_FOUND otherwise.

credit_adjust

(callback function pointer)

enum ZclStatusCodeT (*credit_adjust)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPrepayCreditAdjustReqT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Credit Adjustment command (ZCL_PREPAY_CLI_CMD_CREDIT_ADJUST). Return ZCL status code (e.g. ZCL_STATUS_SUCCESS) to include in Default Response. If the application callback returns ZCL status of ZCL_STATUS_SUCCESS, then the stack updates the attribute ZCL_PREPAY_SVR_ATTR_CREDIT_REMAINING, provided start_time is != 0xffffffff. If start_time is 0xffffffff then previous scheduled & unactioned credit_adjust requests with matching 'IssuerEvent ID' will be cancelled.

change_payment_mode

(callback function pointer)

enum ZclStatusCodeT (*change_payment_mode)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPrepayChangePaymentModeReqT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Change Payment Mode command (ZCL_PREPAY_CLI_CMD_CHANGE_PAYMENT_MODE). Returns ZCL status code from sending ZbZclPrepayServerChangePaymentModeRsp() (e.g. ZCL_STATUS_SUCCESS) to include in Default Response. If the application callback returns ZCL status of ZCL_STATUS_SUCCESS, then the stack updates the attribute ZCL_PREPAY_SVR_ATTR_PAYMENT_CONTROL_CONFIG, provided start_time is != 0xffffffff. If start_time is 0xffffffff then previous scheduled & unactioned change_payment_mode requests with matching 'Provider ID' and 'IssuerEvent ID' will be cancelled.

get_prepay_snapshot

(callback function pointer)

enum ZclStatusCodeT (*get_prepay_snapshot)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPrepayGetPrepaySnapshotReqT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Get Prepay Snapshot command. Return ZCL_STATUS_SUCCESS if snapshot(s) found and Publish Snapshot command sent (ZbZclPrepayServerPublishPrepaySnapshotRsp), or ZCL_STATUS_NOT_FOUND otherwise.

get_debt_repay_log

(callback function pointer)

enum ZclStatusCodeT (*get_debt_repay_log)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPrepayGetDebtRepayLogReqT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Get Debt Repayment Log command. Return ZCL_STATUS_SUCCESS if log(s) found and Publish Debt Log command(s) sent (ZbZclPrepayServerPublishDebtLogRsp), or ZCL_STATUS_NOT_FOUND otherwise.

get_topup_log

(callback function pointer)

enum ZclStatusCodeT (*get_topup_log)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPrepayGetTopUpLogReqT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Get TopUp Log command. Return ZCL_STATUS_SUCCESS if log(s) found and Publish TopUp Log command(s) sent (ZbZclPrepayServerPublishTopUpLogRsp), or ZCL_STATUS_NOT_FOUND otherwise.

set_low_credit_warn_level

(callback function pointer)

enum ZclStatusCodeT (*set_low_credit_warn_level)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPrepaySetLowCreditWarnLevelReqT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Set Low Credit Warning Level command (ZCL_PREPAY_CLI_CMD_SET_LOW_CREDIT_WARN_LEVEL). Return ZCL status code (e.g. ZCL_STATUS_SUCCESS) to include in Default Response. If the application callback returns ZCL status of ZCL_STATUS_SUCCESS, then the stack updates the attributes ZCL_PREPAY_SVR_ATTR_LOW_CREDIT_WARNING and ZCL_PREPAY_SVR_ATTR_CREDIT_REMAINING.

set_max_credit_limit

(callback function pointer)

enum ZclStatusCodeT (*set_max_credit_limit)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPrepaySetMaxCreditLimitReqT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Set Max Credit Limit command (ZCL_PREPAY_CLI_CMD_SET_MAX_CREDIT_LIMIT). Return ZCL status code (e.g. ZCL_STATUS_SUCCESS) to include in Default Response. If the application callback returns ZCL status of ZCL_STATUS_SUCCESS, then the stack updates the attributes ZCL_PREPAY_SVR_ATTR_MAX_CRED_LIMIT and ZCL_PREPAY_SVR_ATTR_MAX_CRED_PER_TOPUP, provided start_time is != 0xffffffff. If start_time is 0xffffffff then previous scheduled & unactioned set_max_credit_limit requests with matching 'Provider ID' and 'IssuerEvent ID' will be cancelled.

set_overall_debt_cap

(callback function pointer)

enum ZclStatusCodeT (*set_overall_debt_cap)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPrepaySetOverallDebtCapReqT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Set Overall Debt Cap command (ZCL_PREPAY_CLI_CMD_SET_OVERALL_DEBT_CAP). Return ZCL status code (e.g. ZCL_STATUS_SUCCESS) to include in Default Response. If the application callback returns ZCL status of ZCL_STATUS_SUCCESS, then the stack updates the attribute ZCL_PREPAY_SVR_ATTR_OVERALL_DEBT_CAP, provided start_time is != 0xffffffff. If start_time is 0xffffffff then previous scheduled & unactioned set_overall_debt_cap requests with matching 'Provider ID' and 'IssuerEvent ID' will be cancelled.

ZbZclPrepaySetLowCreditWarnLevelReqT

Set Low Credit Warning Level

Parameters

uint32_t warn_level Low Credit Warning Level
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclPrepaySetMaxCreditLimitReqT

Set Maximum Credit Limit

Parameters

uint32_t provider_id Provider ID
uint32_t issuer_event_id Issuer Event ID
uint32_t implement_time Implementation Data/Time
uint32_t max_credit_level Maximum Credit Level
uint32_t max_credit_per_topup Maximum Credit Per Top Up
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclPrepaySetOverallDebtCapReqT

Set Overall Debt Cap

Parameters

uint32_t provider_id Provider ID
uint32_t issuer_event_id Issuer Event ID
uint32_t implement_time Implementation Data/Time
int32_t overall_debt_cap Overall Debt Cap
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

8. Price

#include "zcl/se/zcl.price.h"

Functions

ZbZclPriceClientAlloc

struct ZbZclClusterT * ZbZclPriceClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclPriceClientCallbacksT *callbacks, void *arg);

Create a new instance of the Price Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclPriceClientCommandGetBillingPeriodReq

enum ZclStatusCodeT ZbZclPriceClientCommandGetBillingPeriodReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceClientGetBillingPeriodT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Billing Period command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Billing Period command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceClientCommandGetBlockPeriodReq

enum ZclStatusCodeT ZbZclPriceClientCommandGetBlockPeriodReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceClientGetBlockPeriodT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Block Period(s) command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Block Period(s) command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceClientCommandGetBlockThresholdsReq

enum ZclStatusCodeT ZbZclPriceClientCommandGetBlockThresholdsReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceClientGetBlockThresholdsT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Block Thresholds command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Block Thresholds command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceClientCommandGetCO2ValueReq

enum ZclStatusCodeT ZbZclPriceClientCommandGetCO2ValueReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceClientGetCO2ValueT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get CO2 Value command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get CO2 Value command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceClientCommandGetCalorificValueReq

enum ZclStatusCodeT ZbZclPriceClientCommandGetCalorificValueReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceClientGetCalorificValueT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Calorific Value command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Calorific Value command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceClientCommandGetConsolidatedBillReq

enum ZclStatusCodeT ZbZclPriceClientCommandGetConsolidatedBillReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceClientGetConsolidatedBillT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Consolidated Bill command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Consolidated Bill command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be provided back to the callback function when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceClientCommandGetConversionFactorReq

enum ZclStatusCodeT ZbZclPriceClientCommandGetConversionFactorReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceClientGetConversionFactorT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Conversion Factor command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Conversion Factor command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceClientCommandGetCurrencyConversionReq

enum ZclStatusCodeT ZbZclPriceClientCommandGetCurrencyConversionReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Currency Conversion command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be provided back to the callback function when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceClientCommandGetCurrentPriceReq

enum ZclStatusCodeT ZbZclPriceClientCommandGetCurrentPriceReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Current Price command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceClientCommandGetPriceMatrixReq

enum ZclStatusCodeT ZbZclPriceClientCommandGetPriceMatrixReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceClientGetPriceMatrixT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Price Matrix command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Price Matrix command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceClientCommandGetScheduledPricesReq

enum ZclStatusCodeT ZbZclPriceClientCommandGetScheduledPricesReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceClientGetScheduledPricesT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Scheduled Prices command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Scheduled Prices command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceClientCommandGetTariffInfoReq

enum ZclStatusCodeT ZbZclPriceClientCommandGetTariffInfoReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceClientGetTariffInfoT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Tariff Information command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Tariff Information command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceClientCommandPriceAckReq

enum ZclStatusCodeT ZbZclPriceClientCommandPriceAckReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceClientPriceAckT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Price Acknowledgement command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Price Acknowledge command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceMirrorAlloc

struct ZbZclClusterT * ZbZclPriceMirrorAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclClusterT *price_server,
struct ZbZclClusterT *meter_mirror, struct ZbZclClusterT *meter_client);

Allocates a Price Client Mirror cluster.

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
price_server Pointer to Price Server cluster. This is used by the Metering Mirror to send mirrored commands to the BOMD.
meter_mirror Pointer to Metering Mirror cluster. This is used to queue any commands that need to be forwarded to the BOMD when it wakes up.
meter_client Pointer to Metering Client cluster. This is used to know the existing notification scheme setup between BOMD & ESI and to determine if the command needs to be queued or only the notification flag needs to be set.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclPriceServerAlloc

struct ZbZclClusterT * ZbZclPriceServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclPriceServerCallbacksT *callbacks, void *arg);

Create a new instance of the Price Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclPriceServerPublishPriceInit

void ZbZclPriceServerPublishPriceInit(struct ZbZclPriceServerPublishPriceT *rsp);

Initialize Publish Price information

Parameters

rsp Publish Price command structure

Return

  • Void

ZbZclPriceServerSendPublishBillingPeriodRsp

enum ZclStatusCodeT ZbZclPriceServerSendPublishBillingPeriodRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPriceServerPublishBillingPeriodT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Publish Billing Period command as a response

Parameters

cluster Cluster instance from which to send this command
dst Destination address for command, including sequence number and tx options
info Publish Billing Period command structure
callback Callback function for an APSDE-DATA.confirm
arg Pointer to application data that will later be provided back to the callback function when invoked

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishBillingPeriodUnsolic

enum ZclStatusCodeT ZbZclPriceServerSendPublishBillingPeriodUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceServerPublishBillingPeriodT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an unsolicited Publish Billing Period command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for command
info Publish Billing Period command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected
arg Pointer to application data that will later be provided back to the callback function when invoked

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishBlockPeriodRsp

enum ZclStatusCodeT ZbZclPriceServerSendPublishBlockPeriodRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPriceServerPublishBlockPeriodT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Publish Block Period command as a response

Parameters

cluster Cluster instance from which to send this command
dst Destination address for command, including sequence number and tx options
info Publish Block Period command structure
callback Callback function for an APSDE-DATA.confirm
arg Pointer to application data that will later be provided back to the callback function when invoked

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishBlockPeriodUnsolic

enum ZclStatusCodeT ZbZclPriceServerSendPublishBlockPeriodUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceServerPublishBlockPeriodT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an unsolicited Publish Block Period command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for command, including sequence number and tx options
info Publish Block Period command structure
callback Callback function for an APSDE-DATA.confirm
arg Pointer to application data that will later be provided back to the callback function when invoked

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishBlockThresholdsRsp

enum ZclStatusCodeT ZbZclPriceServerSendPublishBlockThresholdsRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPriceServerPublishBlockThresholdsT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Publish Block Thresholds command as a response

Parameters

cluster Cluster instance from which to send this command
dst Destination address for command
info Publish Block Thresholds command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected
arg Pointer to application data that will later be provided back to the callback function when invoked

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishBlockThresholdsUnsolic

enum ZclStatusCodeT ZbZclPriceServerSendPublishBlockThresholdsUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceServerPublishBlockThresholdsT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an unsolicited Publish Block Thresholds command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for command
info Publish Block Thresholds command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected
arg Pointer to application data that will later be provided back to the callback function when invoked

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishCO2ValueRsp

enum ZclStatusCodeT ZbZclPriceServerSendPublishCO2ValueRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPriceServerPublishCO2ValueT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Publish CO2 Value command as a response

Parameters

cluster Cluster instance from which to send this command
dst Destination address for command, including sequence number and tx options
info Publish CO2 Value command structure
callback Callback function for an APSDE-DATA.confirm
arg Pointer to application data that will later be provided back to the callback function when invoked

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishCO2ValueUnsolic

enum ZclStatusCodeT ZbZclPriceServerSendPublishCO2ValueUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceServerPublishCO2ValueT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an unsolicited Publish CO2 Value command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for command
info Publish CO2 Value command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected
arg Pointer to application data that will later be provided back to the callback function when invoked

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishCalorificValueRsp

enum ZclStatusCodeT ZbZclPriceServerSendPublishCalorificValueRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPriceServerPublishCalorificValueT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Publish Calorific Value command as a response

Parameters

cluster Cluster instance from which to send this command
dst Destination address for command, including sequence number and tx options
info Publish Calorific Value command structure
callback Callback function for an APSDE-DATA.confirm
arg Pointer to application data that will later be provided back to the callback function when invoked

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishCalorificValueUnsolic

enum ZclStatusCodeT ZbZclPriceServerSendPublishCalorificValueUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceServerPublishCalorificValueT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an unsolicited Publish Calorific Value command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for command
info Publish Calorific Value command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected
arg Pointer to application data that will later be provided back to the callback function when invoked

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishConsolidatedBillRsp

enum ZclStatusCodeT ZbZclPriceServerSendPublishConsolidatedBillRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPriceServerPublishConsolidatedBillT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Publish Consolidated Bill command as a response

Parameters

cluster Cluster instance from which to send this command
dst Destination address for command, including sequence number and tx options
info Publish Consolidated Bill command structure
callback Callback function for an APSDE-DATA.confirm
arg Pointer to application data that will later be provided back to the callback function when invoked

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZCL_STATUS value on error

ZbZclPriceServerSendPublishConsolidatedBillUnsolic

enum ZclStatusCodeT ZbZclPriceServerSendPublishConsolidatedBillUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceServerPublishConsolidatedBillT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an unsolicited Publish Consolidated Bill command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for command
info Publish Consolidated Bill command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected.
arg Pointer to application data that will later be provided back to the callback function when invoked

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZCL_STATUS value on error

ZbZclPriceServerSendPublishConversionFactorRsp

enum ZclStatusCodeT ZbZclPriceServerSendPublishConversionFactorRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPriceServerPublishConversionFactorT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Publish Conversion Factor command as a response

Parameters

cluster Cluster instance from which to send this command
dst Destination address for command, including sequence number and tx options
info Publish Conversion Factor command structure
callback Callback function for an APSDE-DATA.confirm
arg Pointer to application data that will later be provided back to the callback function when invoked

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishConversionFactorUnsolic

enum ZclStatusCodeT ZbZclPriceServerSendPublishConversionFactorUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceServerPublishConversionFactorT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an unsolicited Publish Conversion Factor command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for command
info Publish Conversion Factor command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected
arg Pointer to application data that will later be provided back to the callback function when invoked

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishCurrencyConversionRsp

enum ZclStatusCodeT ZbZclPriceServerSendPublishCurrencyConversionRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPriceServerPublishCurrencyConversionT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Publish Currency Conversion command as a response

Parameters

cluster Cluster instance from which to send this command
dst Destination address for command, including sequence number and tx options
info Publish Currency Conversion command structure
callback Callback function for an APSDE-DATA.confirm
arg Pointer to application data that will later be provided back to the callback function when invoked

Return

  • ZCL_STATUS_SUCCESS or other ZCL_STATUS value on error

ZbZclPriceServerSendPublishCurrencyConversionUnsolic

enum ZclStatusCodeT ZbZclPriceServerSendPublishCurrencyConversionUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceServerPublishCurrencyConversionT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an unsolicited Publish Currency Conversion command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for command
info Publish Currency Conversion command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected.
arg Pointer to application data that will later be provided back to the callback function when invoked

Return

  • ZCL_STATUS_SUCCESS if successful or other ZCL_STATUS value on error

ZbZclPriceServerSendPublishMatrixUnsolic

enum ZclStatusCodeT ZbZclPriceServerSendPublishMatrixUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceServerPublishPriceMatrixT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an unsolicited Publish Price Matrix command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for command
info Publish Price Matrix command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected
arg Pointer to application data that will later be provided back to the callback function when invoked

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishPriceRsp

enum ZclStatusCodeT ZbZclPriceServerSendPublishPriceRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPriceServerPublishPriceT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Publish Price command as a response

Parameters

cluster Cluster instance from which to send this command
dst Destination address for command, including sequence number and tx options
info Publish Price command structure
callback Callback function for an APSDE-DATA.confirm
arg Pointer to application data that will later be provided back to the callback function when invoked

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishPriceUnsolic

enum ZclStatusCodeT ZbZclPriceServerSendPublishPriceUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceServerPublishPriceT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an unsolicited Publish Price command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for command
info Publish Price command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected
arg Pointer to application data that will later be provided back to the callback function when invoked

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishTariffInfoUnsolic

enum ZclStatusCodeT ZbZclPriceServerSendPublishTariffInfoUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceServerPublishTariffInfoT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an unsolicited Publish Tariff Information command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for command
info Publish Tariff Info command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected
arg Pointer to application data that will later be provided back to the callback function when invoked

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclPriceSvrAttrT

Price Server Attribute IDs

ZCL_PRICE_SVR_ATTR_TIER1_LABEL Tier1PriceLabel (Optional)

ZCL_PRICE_SVR_ATTR_TIERN_LABEL(1) For all the tiers, use the ZCL_PRICE_SVR_ATTR_TIERN_LABEL(tier) macro.

ZCL_PRICE_SVR_ATTR_BLOCK1_THRESHOLD Block1Threshold (Optional)

ZCL_PRICE_SVR_ATTR_BLOCKN_THRESHOLD(1) For all the blocks, use the ZCL_PRICE_SVR_ATTR_BLOCKN_THRESHOLD(block) macro. For all tiers and blocks, use the ZCL_PRICE_SVR_ATTR_TIERN_BLOCKN_THRESHOLD(tier, block) macro

ZCL_PRICE_SVR_ATTR_BLOCK_THRESHOLD_COUNT BlockThresholdCount (Optional) ZCL_PRICE_SVR_ATTR_TIERN_BLOCK_THRESHOLD_COUNT(0) For all the tiers, use the ZCL_PRICE_SVR_ATTR_TIERN_BLOCK_THRESHOLD_COUNT(tier) macro.
ZCL_PRICE_SVR_ATTR_START_OF_BLOCK_PERIOD StartofBlockPeriod (Optional)
ZCL_PRICE_SVR_ATTR_BLOCK_PERIOD_DURATION BlockPeriodDuration (Optional)
ZCL_PRICE_SVR_ATTR_THRESHOLD_MULTIPLIER ThresholdMultiplier (Optional)
ZCL_PRICE_SVR_ATTR_THRESHOLD_DIVISOR ThresholdDivisor (Optional)
ZCL_PRICE_SVR_ATTR_BLOCK_PERIOD_DURATION_TYPE BlockPeriodDurationType (Optional)
ZCL_PRICE_SVR_ATTR_COMMODITY_TYPE CommodityType (Optional)
ZCL_PRICE_SVR_ATTR_STANDING_CHARGE StandingCharge (Optional)
ZCL_PRICE_SVR_ATTR_CONVERSION_FACTOR ConversionFactor (Optional)
ZCL_PRICE_SVR_ATTR_CONVERSION_FACTOR_TRAILING_DIGIT ConversionFactorTrailingDigit (Optional)
ZCL_PRICE_SVR_ATTR_CALORIFIC_VALUE CalorificValue (Optional)
ZCL_PRICE_SVR_ATTR_CALORIFIC_VALUE_UNIT CalorificValueUnit (Optional)
ZCL_PRICE_SVR_ATTR_CALORIFIC_VALUE_TRAILING_DIG IT CalorificValueTrailingDigit (Optional)
ZCL_PRICE_SVR_ATTR_NO_TIER_BLOCK1_PRICE NoTierBlock1Price (Optional) ZCL_PRICE_SVR_ATTR_NO_TIER_BLOCKN_PRICE(1) For all the blocks, use the ZCL_PRICE_SVR_ATTR_NO_TIER_BLOCKN_PRICE(block) macro.
ZCL_PRICE_SVR_ATTR_TIER1_BLOCK1_PRICE Tier1Block1Price (Optional) ZCL_PRICE_SVR_ATTR_TIERN_BLOCKN_PRICE(1,1) For all the tiers and blocks, use the ZCL_PRICE_SVR_ATTR_TIERN_BLOCKN_PRICE(tier, block) macro.
ZCL_PRICE_SVR_ATTR_PRICE_TIER16 PriceTier16 (Optional) ZCL_PRICE_SVR_ATTR_PRICE_TIERN(16) For all the tiers, use the ZCL_PRICE_SVR_ATTR_PRICE_TIERN(tier) macro.
ZCL_PRICE_SVR_ATTR_CPP1_PRICE CPP1 Price (Optional)
ZCL_PRICE_SVR_ATTR_CPP2_PRICE CPP2 Price (Optional)
ZCL_PRICE_SVR_ATTR_TARIFF_LABEL TariffLabel (Optional)
ZCL_PRICE_SVR_ATTR_NO_PRICE_TIERS_IN_USE NumberOfPriceTiersInUse (Optional)
ZCL_PRICE_SVR_ATTR_NO_BLOCK_THRESH_IN_USE NumberOfBlockThresholdsInUse (Optional)
ZCL_PRICE_SVR_ATTR_TIER_BLOCK_MODE TierBlockMode (Optional)
ZCL_PRICE_SVR_ATTR_UNIT_OF_MEASURE UnitOfMeasure (Optional)
ZCL_PRICE_SVR_ATTR_CURRENCY Currency (Optional)
ZCL_PRICE_SVR_ATTR_PRICE_TRAILING_DIGIT PriceTrailingDigit (Optional)
ZCL_PRICE_SVR_ATTR_TARIFF_RESLTN_PERIOD TariffResolutionPeriod (Optional)
ZCL_PRICE_SVR_ATTR_CO2 CO2Value (Optional)
ZCL_PRICE_SVR_ATTR_CO2_UNIT CO2ValueUnit (Optional)
ZCL_PRICE_SVR_ATTR_CO2_TRAILING_DIGIT CO2TrailingDigit (Optional)
ZCL_PRICE_SVR_ATTR_CBP_START CurrentBillingPeriodStart (Optional)
ZCL_PRICE_SVR_ATTR_CBP_DURATION CurrentBillingPeriodDuration (Optional)
ZCL_PRICE_SVR_ATTR_LBP_START LastBillingPeriodStart (Optional)
ZCL_PRICE_SVR_ATTR_LBP_DURATION LastBillingPeriodDuration (Optional)
ZCL_PRICE_SVR_ATTR_LBP_CONSOLIDATED_BILL LastBillingPeriodConsolidatedBill (Optional)
ZCL_PRICE_SVR_ATTR_CRDT_PAYMENT_DUE_DATE CreditPaymentDueDate (Optional)
ZCL_PRICE_SVR_ATTR_CRDT_PAYMENT_STATUS CreditPaymentStatus (Optional)
ZCL_PRICE_SVR_ATTR_CRDT_PAYMENT_OVERDUE_AMT CreditPaymentOverdueAmount (Optional)
ZCL_PRICE_SVR_ATTR_PAYMENT_DISCOUNT PaymentDiscount (Optional)
ZCL_PRICE_SVR_ATTR_PAYMENT_DISCOUNT_PERIOD PaymentDiscountPeriod (Optional)
ZCL_PRICE_SVR_ATTR_CRDT_PAYMENT_1 CreditPayment#1 (Optional)
ZCL_PRICE_SVR_ATTR_CRDT_PAYMENT_DATE_1 CreditPaymentDate#1 (Optional)
ZCL_PRICE_SVR_ATTR_CRDT_PAYMENT_REF_1 CreditPaymentRef#1 (Optional)
ZCL_PRICE_SVR_ATTR_CRDT_PAYMENT_2 CreditPayment#2 (Optional)
ZCL_PRICE_SVR_ATTR_CRDT_PAYMENT_DATE_2 CreditPaymentDate#2 (Optional)
ZCL_PRICE_SVR_ATTR_CRDT_PAYMENT_REF_2 CreditPaymentRef#2 (Optional)
ZCL_PRICE_SVR_ATTR_CRDT_PAYMENT_3 CreditPayment#3 (Optional)
ZCL_PRICE_SVR_ATTR_CRDT_PAYMENT_DATE_3 CreditPaymentDate#3 (Optional)
ZCL_PRICE_SVR_ATTR_CRDT_PAYMENT_REF_3 CreditPaymentRef#3 (Optional)
ZCL_PRICE_SVR_ATTR_CRDT_PAYMENT_4 CreditPayment#4 (Optional)
ZCL_PRICE_SVR_ATTR_CRDT_PAYMENT_DATE_4 CreditPaymentDate#4 (Optional)
ZCL_PRICE_SVR_ATTR_CRDT_PAYMENT_REF_4 CreditPaymentRef#4 (Optional)
ZCL_PRICE_SVR_ATTR_CRDT_PAYMENT_5 CreditPayment#5 (Optional)
ZCL_PRICE_SVR_ATTR_CRDT_PAYMENT_DATE_5 CreditPaymentDate#5 (Optional)
ZCL_PRICE_SVR_ATTR_CRDT_PAYMENT_REF_5 CreditPaymentRef#5 (Optional)
ZCL_PRICE_SVR_ATTR_RECV_TIER1_LABEL ReceivedTier1PriceLabel ZCL_PRICE_SVR_ATTR_RECV_TIERN_LABEL(1) For all the tiers, use the ZCL_PRICE_SVR_ATTR_RECV_TIERN_LABEL(tier) macro.
ZCL_PRICE_SVR_ATTR_RECV_BLOCK1_THRESHOLD ReceivedBlock1Threshold ZCL_PRICE_SVR_ATTR_RECV_BLOCKN_THRESHOLD(1)

For all the blocks, use the ZCL_PRICE_SVR_ATTR_RECV_BLOCKN_THRESHOLD(block) macro.

ZCL_PRICE_SVR_ATTR_RECV_START_OF_BLOCK_PERIOD ReceivedStartofBlockPeriod (Optional)
ZCL_PRICE_SVR_ATTR_RECV_BLOCK_PERIOD_DURATION ReceivedBlockPeriodDuration (Optional)
ZCL_PRICE_SVR_ATTR_RECV_THRESHOLD_MULTIPLIER ReceivedThresholdMultiplier (Optional)
ZCL_PRICE_SVR_ATTR_RECV_THRESHOLD_DIVISOR ReceivedThresholdDivisor (Optional)
ZCL_PRICE_SVR_ATTR_RECV_NO_TIER_BLOCK1_PRICE RxNoTierBlock1Price ZCL_PRICE_SVR_ATTR_RECV_NO_TIER_BLOCKN_PRICE(1) For all the blocks, use the ZCL_PRICE_SVR_ATTR_RECV_NO_TIER_BLOCKN_PRICE(block) macro.
ZCL_PRICE_SVR_ATTR_RECV_TIER1_BLOCK1_PRICE RxTier1Block1Price ZCL_PRICE_SVR_ATTR_RECV_TIERN_BLOCKN_PRICE(1,1)

For all the tiers and blocks, use the ZCL_PRICE_SVR_ATTR_RECV_TIERN_BLOCKN_PRICE(tier, block) macro.

ZCL_PRICE_SVR_ATTR_RECV_PRICE_TIER16 RxPriceTier16 ZCL_PRICE_SVR_ATTR_RECV_PRICE_TIERN(16) For all the tiers, use the ZCL_PRICE_SVR_ATTR_RECV_PRICE_TIERN(tier) macro.
ZCL_PRICE_SVR_ATTR_RECV_TARIFF_LABEL ReceivedTariffLabel (Optional)
ZCL_PRICE_SVR_ATTR_RECV_NO_PRICE_TIERS_IN_USE ReceivedNumberOfPriceTiersInUse (Optional)
ZCL_PRICE_SVR_ATTR_RECV_NO_BLOCK_THRESH_IN_U SE ReceivedNumberOfBlockThresholdsInUse (Optional)
ZCL_PRICE_SVR_ATTR_RECV_TIER_BLOCK_MODE ReceivedTierBlockMode (Optional)
ZCL_PRICE_SVR_ATTR_RECV_TARIFF_RESLTN_PERIOD ReceivedTariffResolutionPeriod (Optional)
ZCL_PRICE_SVR_ATTR_RECV_CO2 ReceivedCO2Value (Optional)
ZCL_PRICE_SVR_ATTR_RECV_CO2_UNIT ReceivedCO2ValueUnit (Optional)
ZCL_PRICE_SVR_ATTR_RECV_CO2_TRAILING_DIGIT ReceivedCO2TrailingDigit (Optional)
ZCL_PRICE_SVR_ATTR_RECV_CBP_START ReceivedCurrentBillingPeriodStart (Optional)
ZCL_PRICE_SVR_ATTR_RECV_CBP_DURATION ReceivedCurrentBillingPeriodDuration (Optional)
ZCL_PRICE_SVR_ATTR_RECV_LBP_START ReceivedLastBillingPeriodStart (Optional)
ZCL_PRICE_SVR_ATTR_RECV_LBP_DURATION ReceivedLastBillingPeriodDuration (Optional)
ZCL_PRICE_SVR_ATTR_RECV_LBP_CONSOLIDATED_BILL ReceivedLastBillingPeriodConsolidatedBill (Optional)

ZbZclPriceTariffChargingSchemeT

Tariff Charging Scheme Enumeration

ZCL_PRICE_CHARGE_TOU_TARIFF TOU Tariff
ZCL_PRICE_CHARGE_BLOCK_TARIFF Block Tariff
ZCL_PRICE_CHARGE_BLOCK_TOU_COMM_THRESH Block/TOU Tariff with common thresholds
ZCL_PRICE_CHARGE_BLOCK_TOU_IND_THRESH Block/TOU Tariff with individual thresholds per tier

ZbZclPriceTariffTypeT

Tariff Type Enumeration

ZCL_PRICE_TARIFF_TYPE_DELIV Delivered tariff
ZCL_PRICE_TARIFF_TYPE_RECV Received tariff
ZCL_PRICE_TARIFF_TYPE_DELIV_RECV Delivered and received tariff
ZCL_PRICE_TARIFF_TYPE_UNSPECIFIED Unspecified tariff type, meaning any tariff type.

ZbZclPriceTierBlockModeT

Tier Block Mode Enumeration

ZCL_PRICE_TIER_BLOCK_MODE_0 This tariff employs a single set of thresholds.
ZCL_PRICE_TIER_BLOCK_MODE_1 This tariff employs a single set of thresholds common across all TOU tiers.
ZCL_PRICE_TIER_BLOCK_MODE_2 This combination tariff employs an individual set of Thresholds for each TOU tier.

Structures

ZbZclPriceClientCallbacksT

Price Client callbacks configuration

Parameters

publish_price

(callback function pointer)

enum ZclStatusCodeT (*publish_price)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPriceServerPublishPriceT *price, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Publish Price command.

publish_conversion_factor

(callback function pointer)

enum ZclStatusCodeT (*publish_conversion_factor)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPriceServerPublishConversionFactorT *co2, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Publish Conversion Factor command.

publish_calorific_value

(callback function pointer)

enum ZclStatusCodeT (*publish_calorific_value)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPriceServerPublishCalorificValueT *calorific, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Publish Calorific Value command.

publish_tariff_info

(callback function pointer)

enum ZclStatusCodeT (*publish_tariff_info)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPriceServerPublishTariffInfoT *tariff_info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Publish Tariff information command.

publish_price_matrix

(callback function pointer)

enum ZclStatusCodeT (*publish_price_matrix)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPriceServerPublishPriceMatrixT *price_matrix, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Publish Price Matrix command.

publish_block_thresholds

(callback function pointer)

enum ZclStatusCodeT (*publish_block_thresholds)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPriceServerPublishBlockThresholdsT *block_threshs, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Publish Block Thresholds command.

publish_block_period

(callback function pointer)

enum ZclStatusCodeT (*publish_block_period)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPriceServerPublishBlockPeriodT *block_period, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Publish Block Period command.

publish_co2_value

(callback function pointer)

enum ZclStatusCodeT (*publish_co2_value)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPriceServerPublishCO2ValueT *co2, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Publish CO2 Value command.

publish_billing_period

(callback function pointer)

enum ZclStatusCodeT (*publish_billing_period)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPriceServerPublishBillingPeriodT *period, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Publish Billing Period command.

publish_consolidated_bill

(callback function pointer)

enum ZclStatusCodeT (*publish_consolidated_bill)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPriceServerPublishConsolidatedBillT *bill, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Publish Consolidated Bill command.

publish_currency_conversion

(callback function pointer)

enum ZclStatusCodeT (*publish_currency_conversion)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPriceServerPublishCurrencyConversionT *conversion, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Publish Currency Conversion command.

optional

(callback function pointer)

enum ZclStatusCodeT (*optional)(struct ZbZclClusterT *cluster, struct ZbZclHeaderT *zclHdrPtr, struct ZbApsdeDataIndT *dataIndPtr)

Callback to application, invoked on receipt of optional Server commands.

ZbZclPriceClientGetBillingPeriodT

Get Billing Period command structure

Parameters

uint32_t earliest_start_time Earliest Start Time
uint32_t min_issuer_event_id Min. Issuer Event ID
uint8_t num_commands Number of Commands
enum ZbZclPriceTariffTypeT tariff_type Optional - Tariff Type

ZbZclPriceClientGetBlockPeriodT

Get Block Period command structure

Parameters

uint32_t start_time Start Time - UTC Time
uint8_t num_events Number of Events requested
enum ZbZclPriceTariffTypeT tariff_type Tariff Type

ZbZclPriceClientGetBlockThresholdsT

Get Block Thresholds command structure

Parameters

uint32_t issuer_tariff_id Issuer Tariff ID

ZbZclPriceClientGetCO2ValueT

Get CO2 Value command structure

Parameters

uint32_t earliest_start_time Earliest Start Time
uint32_t min_issuer_event_id Min. Issuer Event ID
uint8_t num_commands Number of Commands
enum ZbZclPriceTariffTypeT tariff_type Optional - Tariff Type

ZbZclPriceClientGetCalorificValueT

Get Calorific Value command structure

Parameters

uint32_t earliest_start_time Earliest Start Time
uint32_t min_issuer_event_id Min. Issuer Event ID
uint8_t num_commands Number of Commands

ZbZclPriceClientGetConsolidatedBillT

Get Consolidated Bill command structure

Parameters

uint32_t earliest_start_time Earliest Start Time
uint32_t min_issuer_event_id Min. Issuer Event ID
uint8_t num_commands Number of Commands
enum ZbZclPriceTariffTypeT tariff_type Optional - Tariff Type

ZbZclPriceClientGetConversionFactorT

Get Conversion Factor command structure

Parameters

uint32_t earliest_start_time Earliest Start Time
uint32_t min_issuer_event_id Min. Issuer Event ID
uint8_t num_commands Number of Commands

ZbZclPriceClientGetCurrentPriceT

Get Current Price command structure

Parameters

uint8_t command_options Command Options

ZbZclPriceClientGetPriceMatrixT

Get Price Matrix command structure

Parameters

uint32_t issuer_tariff_id Issuer Tariff ID

ZbZclPriceClientGetScheduledPricesT

Get Scheduled Prices command structure

Parameters

uint32_t startTime StartTime
uint8_t maxPrices NumberofEvents

ZbZclPriceClientGetTariffInfoT

Get Tariff Information command structure

Parameters

uint32_t earliest_start_time Earliest Start Time
uint32_t min_issuer_event_id Min. Issuer Event ID
uint8_t num_commands Number of Commands
enum ZbZclPriceTariffTypeT tariff_type Tariff Type

ZbZclPriceClientPriceAckT

Price Acknowledge command structure

Parameters

uint32_t provider_id Provider ID
uint32_t issuer_event_id Issuer Event ID
uint32_t price_ack_time Price Ack Time
uint8_t control Control. E.g. ZCL_PRICE_CTRL_MASK_PRICE_ACK

ZbZclPriceServerBlockThreshEntryT

Block Threshold Entry structure

Parameters

uint8_t tier_num_block_thresh Tier/NumberOfBlockThresholds
uint64_t *block_thresh Block Threshold

ZbZclPriceServerCallbacksT

Price Server callbacks configuration

Parameters

get_current_price

(callback function pointer)

enum ZclStatusCodeT (*get_current_price)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPriceClientGetCurrentPriceT *req, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Get Current command. Return ZCL_STATUS_SUCCESS if Publish Price command sent or ZCL_STATUS_NOT_FOUND otherwise.

price_ack

(callback function pointer)

enum ZclStatusCodeT (*price_ack)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPriceClientPriceAckT *req, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Price Acknowledgement command.

get_scheduled_prices

(callback function pointer)

enum ZclStatusCodeT (*get_scheduled_prices)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPriceClientGetScheduledPricesT *req, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Get Scheduled Prices command. Return ZCL_STATUS_SUCCESS if relevant Events are sent in Publish Price commands or ZCL_STATUS_NOT_FOUND otherwise.

get_tariff_info

(callback function pointer)

enum ZclStatusCodeT (*get_tariff_info)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPriceClientGetTariffInfoT *req, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Get Tariff Information command. Return ZCL_STATUS_SUCCESS if Publish Tariff Information command sent or ZCL_STATUS_NOT_FOUND otherwise.

get_price_matrix

(callback function pointer)

enum ZclStatusCodeT (*get_price_matrix)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPriceClientGetPriceMatrixT *req, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Get Price Matrix command. Return ZCL_STATUS_SUCCESS if Publish Price Matrix command sent or ZCL_STATUS_NOT_FOUND otherwise.

get_block_thresholds

(callback function pointer)

enum ZclStatusCodeT (*get_block_thresholds)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPriceClientGetBlockThresholdsT *req, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Get Block Thresholds command. Return ZCL_STATUS_SUCCESS if Publish Block Thresholds command sent or ZCL_STATUS_NOT_FOUND otherwise.

get_calorific_value

(callback function pointer)

enum ZclStatusCodeT (*get_calorific_value)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPriceClientGetCalorificValueT *req, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Get Calorific Value command. Return ZCL_STATUS_SUCCESS if Publish Calorific Value command sent or ZCL_STATUS_NOT_FOUND otherwise.

get_co2_value

(callback function pointer)

enum ZclStatusCodeT (*get_co2_value)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPriceClientGetCO2ValueT *req, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Get CO2 Value command. Return ZCL_STATUS_SUCCESS if Publish CO2 Value command sent or ZCL_STATUS_NOT_FOUND otherwise.

get_conversion_factor

(callback function pointer)

enum ZclStatusCodeT (*get_conversion_factor)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPriceClientGetConversionFactorT *req, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Get Conversion Factor command. Return ZCL_STATUS_SUCCESS if Publish Conversion Factor command sent or ZCL_STATUS_NOT_FOUND otherwise.

get_block_period

(callback function pointer)

enum ZclStatusCodeT (*get_block_period)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPriceClientGetBlockPeriodT *req, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Get Block Period command. Return ZCL_STATUS_SUCCESS if Publish Block Period command sent or ZCL_STATUS_NOT_FOUND otherwise.

get_billing_period

(callback function pointer)

enum ZclStatusCodeT (*get_billing_period)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPriceClientGetBillingPeriodT *req, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Get Billing Period command. Return ZCL_STATUS_SUCCESS if Publish Billing Period command sent or ZCL_STATUS_NOT_FOUND otherwise.

get_consolidated_bill

(callback function pointer)

enum ZclStatusCodeT (*get_consolidated_bill)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPriceClientGetConsolidatedBillT *req, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Get Consolidated Bill command. Return ZCL_STATUS_SUCCESS if Publish Consolidated Bill command sent or ZCL_STATUS_NOT_FOUND otherwise.

get_currency_conversion

(callback function pointer)

enum ZclStatusCodeT (*get_currency_conversion)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Get Currency Conversion command. Return ZCL_STATUS_SUCCESS if Publish Currency Conversion command sent or ZCL_STATUS_NOT_FOUND otherwise.

optional

(callback function pointer)

enum ZclStatusCodeT (*optional)(struct ZbZclClusterT *cluster, struct ZbZclHeaderT *zclHdrPtr, struct ZbApsdeDataIndT *dataIndPtr)

Callback to application, invoked on receipt of optional Client commands.

ZbZclPriceServerPriceMatrixEntryT

Price Matrix Entry structure

Parameters

uint8_t tier_block_id Tier/Block ID
uint32_t price Price

ZbZclPriceServerPublishBillingPeriodT

Publish Billing Period command structure

Parameters

uint32_t provider_id Provider ID
uint32_t issuer_event_id Issuer Event ID
uint32_t start_time Billing Period Start Time - UTC Time
uint32_t duration Billing Period Duration
uint8_t duration_type Billing Period Duration Type
enum ZbZclPriceTariffTypeT tariff_type Tariff Type

ZbZclPriceServerPublishBlockPeriodT

Publish Block Period

Parameters

uint32_t provider_id Provider ID
uint32_t issuer_event_id Issuer Event ID
uint32_t block_period_start_time Block Period Start Time - UTC Time
uint32_t block_period_duration Block Period Duration
uint8_t block_period_control Block Period Control
uint8_t block_period_duration_type Block Period Duration Type
enum ZbZclPriceTariffTypeT tariff_type Tariff Type
uint8_t tariff_resolution_period Tariff Resolution Period

ZbZclPriceServerPublishBlockThresholdsT

Publish Block Thresholds command structure

Parameters

uint32_t provider_id Provider ID
uint32_t issuer_event_id Issuer Event ID
uint32_t start_time Start Time - UTC Time
uint32_t issuer_tariff_id Issuer Tariff ID
uint8_t command_index Command Index
uint8_t total_number_commands Total Number of Commands
uint8_t sub_payload_control Sub-payload Control
uint8_t num_sub_payload Number of items in Block Threshold Sub-payload
struct ZbZclPriceServerBlockThreshEntryT sub_payload Block Threshold Sub-payload

ZbZclPriceServerPublishCO2ValueT

Publish CO2 Value command structure

Parameters

uint32_t provider_id Provider ID
uint32_t issuer_event_id Issuer Event ID
uint32_t start_time Start Time - UTC Time
enum ZbZclPriceTariffTypeT tariff_type Tariff Type
uint32_t co2_value CO2 Value
uint8_t co2_value_unit CO2 Value Unit
uint8_t co2_value_trail_digits CO2 Value Trailing Digit

ZbZclPriceServerPublishCalorificValueT

Publish Calorific Value command structure

Parameters

uint32_t issuer_event_id Issuer Event ID
uint32_t start_time Start Time - UTC Time
uint32_t calorific_value Calorific Value
uint8_t calorific_value_unit Calorific Value Unit
uint8_t calorific_value_trail_digits Calorific Value Trailing Digit

ZbZclPriceServerPublishConsolidatedBillT

Publish Consolidated Bill command structure

Parameters

uint32_t provider_id Provider ID
uint32_t issuer_event_id Issuer Event ID
uint32_t start_time Billing Period Start Time - UTC Time
uint32_t duration Billing Period Duration
uint8_t duration_type Billing Period Duration Type
enum ZbZclPriceTariffTypeT tariff_type Tariff Type
uint32_t consolidated_bill Consolidated Bill
uint16_t currency Currency
uint8_t bill_trail_digits Bill Trailing Digit

ZbZclPriceServerPublishConversionFactorT

Publish Conversion Factor command structure

Parameters

uint32_t issuer_event_id Issuer Event ID
uint32_t start_time Start Time - UTC Time
uint32_t conversion_factor Conversion Factor
uint8_t conversion_factor_trail_digits Conversion Factor Trailing Digit

ZbZclPriceServerPublishCurrencyConversionT

Publish Currency Conversion command structure

Parameters

uint32_t provider_id Provider ID
uint32_t issuer_event_id Issuer Event ID
uint32_t start_time Start Time - UTC Time
uint16_t old_currency Old Currency
uint16_t new_currency New Currency
uint32_t conversion_factor Conversion Factor
uint8_t conversion_trail_digits Conversion Trailing Digit
uint32_tcurrency_change_control_flags Currency Change Control Flags

ZbZclPriceServerPublishPriceMatrixT

Publish Price Matrix command structure

Parameters

uint32_t provider_id Provider ID
uint32_t issuer_event_id Issuer Event ID
uint32_t start_time Start Time - UTC Time
uint32_t issuer_tariff_id Issuer Tariff ID
uint8_t command_index Command Index
uint8_t total_number_commands Total Number of Commands
uint8_t sub_payload_control Sub-payload Control
uint8_t num_sub_payload Number of items in Price Matrix Sub-payload
struct ZbZclPriceServerPriceMatrixEntryT

sub_payload

Price Matrix Sub-payload

ZbZclPriceServerPublishPriceT

Publish Price command structure

Parameters

uint32_t provider_id Provider ID
char rate_label Rate Label array
uint32_t issuer_event_id Issuer Event ID
uint32_t current_Time Current Time - UTC Time
enum ZbZclMeterUnitsT

unit_of_measure

Unit of Measure
enum ZbZclPriceCurrencyCodeT

currency

Currency
uint8_t trailing_digit_and_price_tier Price Trailing Digit & Price Tier
uint8_t num_price_tiers Number of Price Tiers & Register Tier
uint32_t start_time Start Time - UTC Time
uint16_t duration Duration in Minutes
uint32_t price Price
uint8_t price_ratio Price Ratio (Optional)
uint32_t generation_price Generation Price (Optional)
uint8_t generation_price_ratio Generation Price Ratio (Optional)
uint32_t alternate_cost_delivered Alternate Cost Delivered (Optional)
uint8_t alternate_cost_units Alternate Cost Unit (Optional)
uint8_t alternate_cost_trail_digits Alternate Cost Trailing Digit (Optional)
uint8_t num_block_thresholds Number of Block Thresholds (Optional)
uint8_t price_control Price Control (Optional)
uint8_t number_of_gen_tiers Number of Generation Tiers (Optional)
uint8_t gen_tier Generation Tier (Optional)
uint8_t ext_number_price_tiers Extended Number of Price Tiers (Optional)
uint8_t ext_price_tier Extended Price Tier (Optional)
uint8_t ext_register_tier Extended Register Tier (Optional)

ZbZclPriceServerPublishTariffInfoT

Publish Tariff Info command structure

Parameters

uint32_t provider_id Provider ID
uint32_t issuer_event_id Issuer Event ID
uint32_t issuer_tariff_id Issuer Tariff ID
uint32_t start_time Start Time - UTC Time
uint8_t

tariff_type_and_charging_scheme

Tariff Type/Charging Scheme
char tariff_label Tariff Label array
uint8_t number_of_price_tiers_in_use Number of Price Tiers in Use
uint8_t

number_of_block_thresh_in_use

Number of Block Thresholds in Use
uint8_t unit_of_measure Unit of Measure
uint16_t currency Currency
uint8_t price_trailing_digit Price Trailing Digit
uint32_t standing_charge Standing Charge
uint8_t tier_block_mode TierBlockMode
uint32_t block_thresh_multiplier Block Threshold Multiplier - 24-bit
uint32_t block_thresh_divisor Block Threshold Divisor - 24-bit

9. Tunneling

#include "zcl/se/zcl.tunnel.h"

Functions

ZbZclTunnelClientAddProto

enum ZclStatusCodeT ZbZclTunnelClientAddProto(struct ZbZclClusterT *cluster, enum ZbZclTunnelProtocolT protocol, uint16_t mfr,
uint16_t mtu, struct ZbZclTunnelProtoCbT *callbacks);

Add a protocol tunnel to the server

Parameters

cluster Cluster instance from which to send this command
protocol Protocol ID enumeration
mfr Manufacturer ID
mtu Protocol’s MTU
callbacks Protocol callbacks

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclTunnelClientAlloc

struct ZbZclClusterT * ZbZclTunnelClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);

Create a new instance of the Tunneling Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclTunnelClientCloseQuietReq

enum ZclStatusCodeT ZbZclTunnelClientCloseQuietReq(struct ZbZclClusterT *cluster);

Close the local tunnel without informing the server

Parameters

cluster Cluster instance from which to send this command

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclTunnelClientCloseReq

enum ZclStatusCodeT ZbZclTunnelClientCloseReq(struct ZbZclClusterT *cluster, struct ZbZclTunnelCloseT *close,
void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send a Close Tunnel command

Parameters

cluster Cluster instance from which to send this command
close Close Tunnel command structure.
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclTunnelClientGetSupportedProtocols

enum ZclStatusCodeT ZbZclTunnelClientGetSupportedProtocols(struct ZbZclClusterT *cluster, struct ZbApsAddrT *dst,
struct ZbZclTunnelGetSupportedProtocolsT *suppported_proto, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send a Get Supported Protocols command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for this command.
suppported_proto Get Supported Protocol command structure.
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclTunnelClientSendReq

enum ZclStatusCodeT ZbZclTunnelClientSendReq(struct ZbZclClusterT *cluster, struct ZbZclTunnelDataT *data,
void (*callback)(struct ZbZclCommandRspT *rspPr, void *arg), void *arg);

Send a Transfer Data command

Parameters

cluster Cluster instance from which to send this command
data Tunnel Data information structure.
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclTunnelMirrorAlloc

struct ZbZclClusterT * ZbZclTunnelMirrorAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclClusterT *tunnel, struct ZbZclClusterT *meter_mirror);

Allocates a Tunneling Client/Server Mirror cluster. The caller (application) must attach any attributes to the cluster you want to mirror.

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
events_client Pointer to Events Client cluster. This is used by the Metering Mirror to send mirrored commands to the BOMD.
meter_mirror Pointer to Metering Mirror cluster. This is used to queue any commands that need to be forwarded to the BOMD when it wakes up.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclTunnelSendData

enum ZclStatusCodeT ZbZclTunnelSendData(struct ZbZclClusterT *cluster, struct ZbZclTunnelStateT *state, struct ZbZclTunnelDataT *data,
void (*callback)(struct ZbZclCommandRspT *rspPtr, void *arg), void *arg);

Send data via the tunnel. If the input cluster is server then the data will be sent to the client and vice versa.

Parameters

cluster Cluster instance from which to send this command
state State of the tunnel
data Tunnel Data information structure.
callback Callback function to handle response
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclTunnelServerAddProto

enum ZclStatusCodeT ZbZclTunnelServerAddProto(struct ZbZclClusterT *cluster, enum ZbZclTunnelProtocolT protocol, uint16_t mfr, uint16_t mtu,
struct ZbZclTunnelProtoCbT *callbacks);

Add a protocol tunnel to the server

Parameters

cluster Cluster instance from which to send this command
protocol Protocol ID enumeration
mfr Manufacturer ID
mtu Protocol’s MTU
callbacks Protocol callbacks

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclTunnelServerAlloc

struct ZbZclClusterT * ZbZclTunnelServerAlloc(struct ZigBeeT *zb, uint8_t endpoint);

Create a new instance of the Tunneling Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclTunnelServerStateFindById

struct ZbZclTunnelStateT * ZbZclTunnelServerStateFindById(struct ZbZclClusterT *cluster, uint16_t tunnel_id);

Get tunnel server state by tunnel ID

Parameters

cluster Cluster instance from which to send this command
tunnel_id Tunnel ID

Return

  • State of the tunnel

ZbZclTunnelStateGetDataLen

uint32_t ZbZclTunnelStateGetDataLen(struct ZbZclTunnelStateT *state, bool clear_data);

Get received data length using Tunneling Cluster State structure

Parameters

state Tunneling Cluster State structure
clear_data If true, clear any data queued in the tunnel. The application would first call ZbZclTunnelStateGetDataLen with clear_data set to false to get the length and process the data. Once complete, it will call ZbZclTunnelStateGetDataLen with clear_data set to true.

Return

  • Length of data in the buffer

ZbZclTunnelStateGetDataPtr

uint8_t * ZbZclTunnelStateGetDataPtr(struct ZbZclTunnelStateT *state);

Get received data using Tunneling Cluster State structure

Parameters

state Tunneling Cluster State structure

Return

  • Pointer to received data buffer. Length of data is determined by ZbZclTunnelStateGetDataLen.

ZbZclTunnelStateGetId

uint16_t ZbZclTunnelStateGetId(struct ZbZclTunnelStateT *state);

Get ID using Tunneling Cluster State structure

Parameters

state Tunneling Cluster State structure

Return

  • Allocated tunnel ID

ZbZclTunnelStateGetMtu

uint16_t ZbZclTunnelStateGetMtu(struct ZbZclTunnelStateT *state);

Get the current tunnel’s MTU, which is the smaller of the two side’s MTUs.

Parameters

state Tunneling Cluster State structure

Return

  • MTU size in bytes

ZbZclTunnelStateGetProtocol

enum ZbZclTunnelProtocolT ZbZclTunnelStateGetProtocol(struct ZbZclTunnelStateT *state);

Get Tunneling Protocol Instance using Tunneling Cluster State structure

Parameters

state Tunneling Cluster State structure

Return

  • Tunneling Protocol Instance structure

ZbZclTunnelStateGetRmtAddr

bool ZbZclTunnelStateGetRmtAddr(struct ZbZclTunnelStateT *state, uint64_t *addr, uint8_t *endpoint);

Get the current tunnel’s remote addressing.

Parameters

state Tunneling Cluster State structure
addr Pointer to write EUI-64 of the remote device’s address.
endpoint Pointer to write EUI-64 of the remote device’s endpoint.

Return

  • True if address info is present and valid, false otherwise.

Enumerations

ZbZclTunnelProtocolT

Tunneling Protocol ID enumerations

ZCL_TUNNEL_PROTO_DLMS_COSEM DLMS/COSEM (IEC 62056)
ZCL_TUNNEL_PROTO_IEC_61107 IEC 61107
ZCL_TUNNEL_PROTO_ANSI_C12 ANSI C12
ZCL_TUNNEL_PROTO_M_BUS M-BUS
ZCL_TUNNEL_PROTO_SML SML
ZCL_TUNNEL_PROTO_CLIMATE_TALK ClimateTalk
ZCL_TUNNEL_PROTO_GB_HRGP GB-HRGP
ZCL_TUNNEL_PROTO_IPV4 IP v4
ZCL_TUNNEL_PROTO_IPV6 IP v6
ZCL_TUNNEL_PROTO_MANUF_MIN Start of manufacturer specific protocols. For values greater than or equal to this value, the Protocol Id and Manufacturer Code must match.
ZCL_TUNNEL_PROTO_RESERVED Reserved

ZbZclTunnelStatusT

Tunneling Status Values

ZCL_TUNNEL_STATUS_SUCCESS Success
ZCL_TUNNEL_STATUS_BUSY Busy
ZCL_TUNNEL_STATUS_NO_RESOURCES No more tunnel IDs
ZCL_TUNNEL_STATUS_PROTO_UNSUPPORTED Protocol not supported
ZCL_TUNNEL_STATUS_FLOW_UNSUPPORTED Flow control not supported

ZbZclTunnelSvrAttrT

Tunneling Server Attribute IDs

ZCL_TUNNEL_SVR_ATTR_TIMEOUT CloseTunnelTimeout
ZCL_TUNNEL_SVR_ATTR_NUM_TUNNELS This is an internal attribute that can be used by the application to set the number of tunnels that tunnel server shall support. After this, the server shall return NO_RESOURCES error for any request to create the tunnel. by default it is set to ZCL_TUNNEL_SVR_NUM_TUNNELS_MAX.
ZCL_TUNNEL_SVR_ATTR_PERSIST This is an internal attribute used to read/write the tunnel data from/to tunnel server.

ZbZclTunnelXferStatusT

Tunneling Transfer Data Status Values

ZCL_TUNNEL_XFER_STATUS_NO_TUNNEL No such tunnel
ZCL_TUNNEL_XFER_STATUS_WRONG_DEVICE Wrong device
ZCL_TUNNEL_XFER_STATUS_OVERFLOW Data overflow
ZCL_TUNNEL_XFER_STATUS_NO_RESPONSE No Response - If zcl_tunnel_handle_data returns ZCL_TUNNEL_XFER_STATUS_NO_RESPONSE, don’t send a response

Structures

ZbZclTunnelCloseT

Close Tunnel command structure

Parameters

uint8_t mirror_ep ESI Mirror endpoint to send Tunnel data in case the destination is BOMD and to_bomd flag is set to 'true'.
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclTunnelConnectT

Request Tunnel command structure

Parameters

bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclTunnelDataT

Tunnel Data command structure

Parameters

uint8_t *data Pointer to the data being sent over the Tunnel.
uint16_t len Data length.
uint8_t mirror_ep ESI Mirror endpoint to send Tunnel data in case the destination is BOMD and to_bomd flag is set to 'true'.
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclTunnelGetSupportedProtocolsT

Get Supported Protocols command structure

Parameters

uint8_t protocol_offset Protocol offset
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclTunnelProtoCbT

ZbZclTunnelServerAddProto and ZbZclTunnelClientAddProto callback data structure

Parameters

request

(callback function pointer)

enum ZbZclTunnelStatusT (*request)(struct ZbZclClusterT *clusterPtr, struct ZbZclTunnelStateT *statePtr, void *priv)

Callback to handle a Request Tunnel (ZCL_TUNNEL_CLI_CMD_REQUEST) command. The callback returns a tunnel state structure, which is used to identify the tunnel to the server cluster. It is an opaque structure, meaning the application does not have access to the internals, but the application can call functions such as ZbZclTunnelStateGetId to get the tunnel Id from the state.

input

(callback function pointer)

void (*input)(struct ZbZclClusterT *clusterPtr, struct ZbZclTunnelStateT *statePtr, void *priv)

Callback to handle received data from the tunnel (ZCL_TUNNEL_CLI_CMD_DATA). The application uses the ZbZclTunnelStateGetDataPtr and ZbZclTunnelStateGetDataLen to get the current received data queued in the tunnel cluster.

close

(callback function pointer)

void (*close)(struct ZbZclClusterT *clusterPtr, struct ZbZclTunnelStateT *statePtr, void *priv)

Callback to handle a Close Tunnel command, to close the tunnel (Optional).

error

(callback function pointer)

bool (*error)(struct ZbZclClusterT *clusterPtr, struct ZbZclTunnelStateT *statePtr, void *priv, enum ZbZclTunnelXferStatusT status)

Callback to handle an Error command (ZCL_TUNNEL_SVR_CMD_ERROR) (Optional). Return false if tunnel should also be closed. Return true to keep tunnel open and continue normally.

void *priv Application private data pointer



Previous step Arrow left.png