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
N/AclusterId

Ver.: always

N/Abuffer

Ver.: always

N/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.


Definition at line 60 of file app/framework/plugin/simple-metering-server/simple-metering-server.h

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
N/ArequestedSampleId

Ver.: always

N/AissuerEventId

Ver.: always

N/AstartSamplingTime
N/AsampleType
N/AsampleRequestInterval
N/AmaxNumberOfSamples
N/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.


Definition at line 63 of file app/framework/plugin/simple-metering-server/simple-metering-server.h

emberAfPluginSimpleMeteringServerProcessNotificationFlagsCallback#

void emberAfPluginSimpleMeteringServerProcessNotificationFlagsCallback (uint16_t attributeId, uint32_t attributeValue)

Process notification flags.

Parameters
N/AattributeId

Ver.: always

N/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.


Definition at line 79 of file app/framework/plugin/simple-metering-server/simple-metering-server.h