rasProject_01 / weSweetHome  R. 240
process control       /     RasPi software         by   weinert-automation
Loading...
Searching...
No Matches
meterVal_t Struct Reference

One smart meter's readings. More...

#include <sweetHome.h>

Data Fields

int err
 0: OK -99: not set
 
int hourOffs
 actual offset in hours of local time zone (+ is east)
 
uint16_t ms
 ms supplement to stmpS
 
uint16_t msDurRead
 duration on Modbus read (successful or timed out)
 
float pSum
 power sum (all, all three or the relevant phases) [W]
 
char rTmTxt [34]
 local time as text; length is 32
 
uint32_t stmpS
 Absolute time stamp for the current value. More...
 
float vals [18]
 Compact and re-sorted meter readings. More...
 

Detailed Description

One smart meter's readings.

The (first) four timing values are the start of reading; to have the end add .msDurRead.

Field Documentation

◆ stmpS

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.

◆ vals

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.). The indexes are: /code 0..2 : U (L1, L2, L3) 3..5 : I (L1, L2, L3) 6..8 : P (L1, L2, L3) 9 : f 10, 11 : Wimp Wexp 12..14 : phi (L1, L2, L3) 15..17 : reserve (not used in R.115) /endcode


The documentation for this struct was generated from the following file: