![]() |
HAN-FUN API
1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
|
Simple Meter report. More...
#include <simple_power_meter.h>
Public Member Functions | |
uint16_t | size () const |
Number bytes needed to serialize the message. More... | |
uint16_t | pack (Common::ByteArray &array, uint16_t offset=0) const |
Write the object on to a ByteArray so it can be sent over the network. More... | |
uint16_t | unpack (const Common::ByteArray &array, uint16_t offset=0) |
Read a message from a ByteArray. More... | |
Data Fields | |
Measurement | energy |
Energy measurement. More... | |
Measurement | last_energy |
Energy measurement at last reset. More... | |
Measurement | last_time |
Device time measurement at last reset. More... | |
Measurement | power |
Instantaneous Power measurement. More... | |
Measurement | avg_power |
Average Power measurement. More... | |
uint16_t | avg_power_interval |
Average Power Interval. More... | |
uint8_t | power_factor |
Power Factor. More... | |
Measurement | voltage |
Voltage measurement. More... | |
Measurement | current |
Current measurement. More... | |
Measurement | frequency |
Frequency measurement. More... | |
std::array< bool, __LAST_ATTR__+1 > | enabled |
This array contains an indication of with attributes should be packed or were unpacked. | |
Static Public Attributes | |
static constexpr uint16_t | min_size = sizeof(uint8_t) |
Minimum pack/unpack required data size. | |
Simple Meter report.
Definition at line 222 of file simple_power_meter.h.
uint16_t HF::Interfaces::SimplePowerMeter::Report::pack | ( | Common::ByteArray & | array, |
uint16_t | offset = 0 |
||
) | const |
Write the object on to a ByteArray so it can be sent over the network.
The buffer passed in MUST have enough size to hold the serialized object, e.g.,
[in,out] | array | ByteArray reference to write the object to. |
[in] | offset | offset to start writing to. |
uint16_t HF::Interfaces::SimplePowerMeter::Report::size | ( | ) | const |
Number bytes needed to serialize the message.
uint16_t HF::Interfaces::SimplePowerMeter::Report::unpack | ( | const Common::ByteArray & | array, |
uint16_t | offset = 0 |
||
) |
Read a message from a ByteArray.
[in] | array | ByteArray reference to read the message from. |
[in] | offset | offset to start reading from. |
Measurement HF::Interfaces::SimplePowerMeter::Report::avg_power |
Average Power measurement.
Definition at line 230 of file simple_power_meter.h.
uint16_t HF::Interfaces::SimplePowerMeter::Report::avg_power_interval |
Average Power Interval.
Definition at line 232 of file simple_power_meter.h.
Measurement HF::Interfaces::SimplePowerMeter::Report::current |
Current measurement.
Definition at line 237 of file simple_power_meter.h.
Measurement HF::Interfaces::SimplePowerMeter::Report::energy |
Energy measurement.
Definition at line 224 of file simple_power_meter.h.
Measurement HF::Interfaces::SimplePowerMeter::Report::frequency |
Frequency measurement.
Definition at line 238 of file simple_power_meter.h.
Measurement HF::Interfaces::SimplePowerMeter::Report::last_energy |
Energy measurement at last reset.
Definition at line 226 of file simple_power_meter.h.
Measurement HF::Interfaces::SimplePowerMeter::Report::last_time |
Device time measurement at last reset.
Definition at line 227 of file simple_power_meter.h.
Measurement HF::Interfaces::SimplePowerMeter::Report::power |
Instantaneous Power measurement.
Definition at line 229 of file simple_power_meter.h.
uint8_t HF::Interfaces::SimplePowerMeter::Report::power_factor |
Power Factor.
Definition at line 234 of file simple_power_meter.h.
Measurement HF::Interfaces::SimplePowerMeter::Report::voltage |
Voltage measurement.
Definition at line 236 of file simple_power_meter.h.