Initial commit
This commit is contained in:
24
include/data_model.h
Normal file
24
include/data_model.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
struct MeterData {
|
||||
uint32_t ts_utc;
|
||||
uint16_t short_id;
|
||||
char device_id[16];
|
||||
float energy_total_kwh;
|
||||
float phase_power_w[3];
|
||||
float total_power_w;
|
||||
float phase_voltage_v[3];
|
||||
float battery_voltage_v;
|
||||
uint8_t battery_percent;
|
||||
bool valid;
|
||||
};
|
||||
|
||||
struct SenderStatus {
|
||||
MeterData last_data;
|
||||
uint32_t last_update_ts_utc;
|
||||
bool has_data;
|
||||
};
|
||||
|
||||
void init_device_ids(uint16_t &short_id, char *device_id, size_t device_id_len);
|
||||
Reference in New Issue
Block a user