![]() |
rasProject_01 / weSweetHome
R. 146 2026-09-26
process control / RasPi software by weinert-automation
|
One smart meter's readings. More...
#include <sweetHome.h>
Data Fields | |
| int | err |
| Modbus error. | |
| int | hourOffs |
| Actual offset in hours of local time zone. | |
| uint16_t | ms |
| Absolute time's miliseconds. | |
| uint16_t | msDurRead |
| Duration of last Modbus operation, probably read, in ms. | |
| float | pSum |
| Power sum [W] over all (three) phases. | |
| char | rTmTxt [34] |
| Local time as text. | |
| uint32_t | stmpS |
| Absolute time stamp for the current value. | |
| float | vals [18] |
| Compact and re-sorted meter readings. | |
One smart meter's readings.
The (first) four timing values are the start of reading; to have the end add .msDurRead.
| uint32_t stmpS |
Absolute time stamp for the current value.
This value and its supplements meterVal_t.ms, meterVal_t.hourOffs and meterVal_t.rTmTxt are updated at every Modbus read.
| uint16_t ms |
Absolute time's miliseconds.
This is a ms supplement to meterVal_t.stmpS.
| int hourOffs |
Actual offset in hours of local time zone.
A positive value means east of UTC (Greenwich).
| char rTmTxt[34] |
Local time as text.
The text's lenght is 32. See also meterVal_t::stmpS, meterVal_t::ms
| int err |
Modbus error.
0 is OK; -99 means not yet initialised. Otherwise err - MODBUS_ENOBASE is the last operations modbus error as defined by StǸphane Raimbault.
| uint16_t msDurRead |
Duration of last Modbus operation, probably read, in ms.
A value well below 500ms is significant for a successful read. Significantly above means timeout / error.
| float vals[18] |
Compact and re-sorted meter readings.
These values are to be updated on every error-free meter reading (by Modbus, RS485 e.g.). Each pair of 16bit-Modbus-registers holds a 32bit IEEE754 floating point number, i.e. a C float.
The values are: