Simple Metering Server#

API and Callbacks for the Simple Metering Cluster Server Component.

This is a test implementation of the simple metering server. This component should only be used for testing but is helpful to test devices that require inter-operation with a working meter. It supports the required current summation delivered attribute (0x0000), but optionally the following attributes as well if they are selected in the project: current tier 1 summation delivered (0x0100), battery life remaining (0x0201), hours in operation (0x0202), and instantaneous demand (0x0400).

API#

void
sl_zigbee_af_simple_metering_cluster_read_attributes_response_cb(sl_zigbee_af_cluster_id_t clusterId, uint8_t *buffer, uint16_t bufLen)

Process notification flags.

uint16_t
sl_zigbee_af_simple_metering_server_start_sampling(uint16_t requestedSampleId, uint32_t issuerEventId, uint32_t startSamplingTime, uint8_t sampleType, uint16_t sampleRequestInterval, uint16_t maxNumberOfSamples, uint8_t endpoint)

Process notification flags.

void
sl_zigbee_af_simple_metering_server_process_notification_flags_cb(uint16_t attributeId, uint32_t attributeValue)

Process notification flags.

API Documentation#

sl_zigbee_af_simple_metering_cluster_read_attributes_response_cb#

void sl_zigbee_af_simple_metering_cluster_read_attributes_response_cb (sl_zigbee_af_cluster_id_t clusterId, uint8_t * buffer, uint16_t bufLen)

Process notification flags.

Parameters
TypeDirectionArgument NameDescription
sl_zigbee_af_cluster_id_tN/AclusterId

Ver.: always

uint8_t *N/Abuffer

Ver.: always

uint16_tN/AbufLen

This function is called by the metering server plugin when any of the Notification Attribute Set attributes are read or reported by the metering client.


sl_zigbee_af_simple_metering_server_start_sampling#

uint16_t sl_zigbee_af_simple_metering_server_start_sampling (uint16_t requestedSampleId, uint32_t issuerEventId, uint32_t startSamplingTime, uint8_t sampleType, uint16_t sampleRequestInterval, uint16_t maxNumberOfSamples, uint8_t endpoint)

Process notification flags.

Parameters
TypeDirectionArgument NameDescription
uint16_tN/ArequestedSampleId

Ver.: always

uint32_tN/AissuerEventId

Ver.: always

uint32_tN/AstartSamplingTime
uint8_tN/AsampleType
uint16_tN/AsampleRequestInterval
uint16_tN/AmaxNumberOfSamples
uint8_tN/Aendpoint

This function is called by the metering server plugin when any of the Notification Attribute Set attributes are read or reported by the metering client.


sl_zigbee_af_simple_metering_server_process_notification_flags_cb#

void sl_zigbee_af_simple_metering_server_process_notification_flags_cb (uint16_t attributeId, uint32_t attributeValue)

Process notification flags.

Parameters
TypeDirectionArgument NameDescription
uint16_tN/AattributeId

Ver.: always

uint32_tN/AattributeValue

Ver.: always

This function is called by the metering server plugin when any of the Notification Attribute Set attributes are read or reported by the metering client.