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
emberAfPluginSimpleMeteringClusterReadAttributesResponseCallback(EmberAfClusterId clusterId, uint8_t *buffer, uint16_t bufLen)

Process notification flags.

uint16_t
emberAfPluginSimpleMeteringServerStartSampling(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
emberAfPluginSimpleMeteringServerProcessNotificationFlagsCallback(uint16_t attributeId, uint32_t attributeValue)

Process notification flags.

API Documentation#

emberAfPluginSimpleMeteringClusterReadAttributesResponseCallback#

void emberAfPluginSimpleMeteringClusterReadAttributesResponseCallback (EmberAfClusterId clusterId, uint8_t * buffer, uint16_t bufLen)

Process notification flags.

Parameters
TypeDirectionArgument NameDescription
EmberAfClusterIdN/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.


emberAfPluginSimpleMeteringServerStartSampling#

uint16_t emberAfPluginSimpleMeteringServerStartSampling (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.


emberAfPluginSimpleMeteringServerProcessNotificationFlagsCallback#

void emberAfPluginSimpleMeteringServerProcessNotificationFlagsCallback (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.