#include <Data.h>
Data Structures | |
class | RtcData |
Public Member Functions | |
MyData () | |
long | secondsSincePowerOn () |
long | getActiveTimeSec () |
long | getLowPowerActiveTimeSec () |
long | getPowerOnTimeSec () |
long | getLowPowerPowerOnTimeSec () |
double | getPowerConsumption () |
double | getLowPowerPowerConsumption () |
Data Fields | |
class MyData::RtcData | rtcData |
Data to store in the RTC memory. | |
String | status |
Status information. | |
String | restartInfo |
Information on restart. | |
bool | isOtaActive |
Is OverTheAir update active? | |
bool | isPowerOn |
Is the power of the sim808 switched on? | |
bool | isLowPower |
Is the power below min voltage? | |
bool | isGsmActive |
Is the sim808 modul connected to a gsm network? | |
bool | isGpsActive |
Is the gs part of the sim808 activated? | |
long | secondsToDeepSleep |
Time until next deepsleep. -1 = disabled. | |
long | awakeTimeOffsetSec |
Awake time offset for SaveSettings. | |
double | voltage |
Current supply voltage. | |
double | temperature |
Current BME280 temperature. | |
double | humidity |
Current BME280 humidity. | |
double | pressure |
Current BME280 pressure. | |
String | softAPIP |
registered ip of the access point | |
String | softAPmacAddress |
module mac address | |
String | stationIP |
registered station ip | |
String | modemInfo |
Information from SIM808. | |
String | modemIP |
registered modem ip | |
String | imei |
IMEI of the sim card. | |
String | cop |
Operator selection. | |
String | signalQuality |
Quality of the signal. | |
String | batteryLevel |
Battery level of the sim808 module. | |
String | batteryVolt |
Battery volt of the sim808 module. | |
long | lastGpsUpdateSec |
Elapsed Time of last read. | |
bool | waitingForGps |
We are trying to get a location. | |
bool | isMoving |
Is moving recognized. | |
double | movingDistance |
Minimum distance for moving flag. | |
StringList | consoleCmds |
open commands to send to the sim808 module | |
StringList | logInfos |
received sim808 answers or other logs | |
Helper class to store all the global determined data in one place.
MyData::MyData | ( | ) |
Constructor
long MyData::getActiveTimeSec | ( | ) |
Return all the active over all deep sleeps plus the current active time.
Definition at line 193 of file Data.h.
References MyData::RtcData::aktiveTimeSec, and rtcData.
Referenced by getPowerConsumption(), MyMqtt::handleClient(), MyWebServer::handleLoadInfoInfo(), MyWebServer::handleLoadMainInfo(), and secondsSincePowerOn().
long MyData::getLowPowerActiveTimeSec | ( | ) |
Return all the active over all deep sleeps plus the current active time.
Definition at line 199 of file Data.h.
References isLowPower, MyData::RtcData::lowPowerActiveTimeSec, and rtcData.
Referenced by getLowPowerPowerConsumption().
double MyData::getLowPowerPowerConsumption | ( | ) |
Calculates the power consumption on low power from power on. In mA/h
Definition at line 241 of file Data.h.
References MyData::RtcData::deepSleepTimeSec, getLowPowerActiveTimeSec(), getLowPowerPowerOnTimeSec(), POWER_CONSUMPTION_ACTIVE, POWER_CONSUMPTION_DEEP_SLEEP, POWER_CONSUMPTION_POWER_ON, and rtcData.
Referenced by MyMqtt::handleClient(), MyWebServer::handleLoadInfoInfo(), and MyWebServer::handleLoadMainInfo().
long MyData::getLowPowerPowerOnTimeSec | ( | ) |
Return all the time with power on on low power supply.
Definition at line 219 of file Data.h.
References isLowPower, isPowerOn, MyData::RtcData::lowPowerPowerOnTimeSec, and rtcData.
Referenced by getLowPowerPowerConsumption().
double MyData::getPowerConsumption | ( | ) |
Calculates the power consumption from power on. In mA/h
Definition at line 231 of file Data.h.
References MyData::RtcData::deepSleepTimeSec, getActiveTimeSec(), getPowerOnTimeSec(), POWER_CONSUMPTION_ACTIVE, POWER_CONSUMPTION_DEEP_SLEEP, POWER_CONSUMPTION_POWER_ON, and rtcData.
Referenced by MyMqtt::handleClient(), MyWebServer::handleLoadInfoInfo(), and MyWebServer::handleLoadMainInfo().
long MyData::getPowerOnTimeSec | ( | ) |
Returns the power on time over all deep sleeps plus the current active time if power is on.
Definition at line 209 of file Data.h.
References isPowerOn, MyData::RtcData::powerOnTimeSec, and rtcData.
Referenced by getPowerConsumption(), MyWebServer::handleLoadInfoInfo(), and MyWebServer::handleLoadMainInfo().
long MyData::secondsSincePowerOn | ( | ) |
Returns the seconds since power up (not since last deep sleep).
Definition at line 187 of file Data.h.
References MyData::RtcData::deepSleepTimeSec, getActiveTimeSec(), and rtcData.
Referenced by secondsSincePowerOn().