3-phase PV router
Loading...
Searching...
No Matches
TeleInfoData Struct Reference

The data of the IoT frame, for TeleInfo::writeFrameStep(). More...

#include <utils.h>

Static Public Member Functions

static uint16_t absenceCount ()
 
static int16_t loadOnPercent (uint8_t idx)
 
static uint8_t lowestSampleSetsPerCycle ()
 
static bool offPeak ()
 
static int16_t phasePower (uint8_t idx)
 
static uint16_t phaseVoltage (uint8_t idx)
 
static int16_t power ()
 
static int16_t relayAverage ()
 
static bool relayOn (uint8_t idx)
 
static uint16_t sampleSets ()
 
static void snapshot ()
 Takes the values that change during the frame (the tariff is in datalogOffPeak).
 
static int16_t temperature (uint8_t idx)
 
static bool temperatureValid (uint8_t idx)
 

Static Public Attributes

static uint16_t absenceCountAtDatalog { 0 }
 
static constexpr bool DUAL_TARIFF { ::DUAL_TARIFF }
 
static constexpr uint8_t LOAD_COUNT { NO_OF_DUMPLOADS }
 
static constexpr uint8_t PHASE_COUNT { NO_OF_PHASES }
 
static constexpr uint8_t RELAY_COUNT { static_cast< uint8_t >(relayDiverter.size()) }
 
static constexpr bool RELAY_DIVERSION { ::RELAY_DIVERSION }
 
static uint16_t relayStatesAtDatalog { 0 }
 
static constexpr uint8_t TEMP_COUNT { TEMP_SENSOR_PRESENT ? static_cast< uint8_t >(tempSensors.size()) : uint8_t{ 0 } }
 

Detailed Description

The data of the IoT frame, for TeleInfo::writeFrameStep().

The frame is written a line per step, over the next passes of the main loop: about 300 characters at 9600 baud 7E1, 0.3 s, well within the datalog period (1 s at least). Each value must be that of the datalog period of the frame until its last step:

  • tx_data, the Shared::copyOf_... copies and the relays' average only change at the end of a datalog period (the ISR writes the copies once per period, the main loop tx_data and the average once per datalog event);
  • the relay states, the tariff and the absence of diverted energy count change every second: they are taken by snapshot() at the datalog event, when the buffered frame took them.

Definition at line 478 of file utils.h.

Member Function Documentation

◆ absenceCount()

static uint16_t TeleInfoData::absenceCount ( )
inlinestatic

Definition at line 544 of file utils.h.

◆ loadOnPercent()

static int16_t TeleInfoData::loadOnPercent ( uint8_t idx)
inlinestatic

Definition at line 532 of file utils.h.

◆ lowestSampleSetsPerCycle()

static uint8_t TeleInfoData::lowestSampleSetsPerCycle ( )
inlinestatic

Definition at line 556 of file utils.h.

◆ offPeak()

static bool TeleInfoData::offPeak ( )
inlinestatic

Definition at line 548 of file utils.h.

◆ phasePower()

static int16_t TeleInfoData::phasePower ( uint8_t idx)
inlinestatic

Definition at line 516 of file utils.h.

◆ phaseVoltage()

static uint16_t TeleInfoData::phaseVoltage ( uint8_t idx)
inlinestatic

Definition at line 520 of file utils.h.

◆ power()

static int16_t TeleInfoData::power ( )
inlinestatic

Definition at line 512 of file utils.h.

◆ relayAverage()

static int16_t TeleInfoData::relayAverage ( )
inlinestatic

Definition at line 524 of file utils.h.

◆ relayOn()

static bool TeleInfoData::relayOn ( uint8_t idx)
inlinestatic

Definition at line 528 of file utils.h.

◆ sampleSets()

static uint16_t TeleInfoData::sampleSets ( )
inlinestatic

Definition at line 552 of file utils.h.

◆ snapshot()

static void TeleInfoData::snapshot ( )
inlinestatic

Takes the values that change during the frame (the tariff is in datalogOffPeak).

Definition at line 495 of file utils.h.

Here is the caller graph for this function:

◆ temperature()

static int16_t TeleInfoData::temperature ( uint8_t idx)
inlinestatic

Definition at line 540 of file utils.h.

◆ temperatureValid()

static bool TeleInfoData::temperatureValid ( uint8_t idx)
inlinestatic

Definition at line 536 of file utils.h.

Here is the call graph for this function:

Member Data Documentation

◆ absenceCountAtDatalog

uint16_t TeleInfoData::absenceCountAtDatalog { 0 }
inlinestatic

the absence of diverted energy count at the datalog event

Definition at line 490 of file utils.h.

◆ DUAL_TARIFF

bool TeleInfoData::DUAL_TARIFF { ::DUAL_TARIFF }
staticconstexpr

Definition at line 485 of file utils.h.

◆ LOAD_COUNT

uint8_t TeleInfoData::LOAD_COUNT { NO_OF_DUMPLOADS }
staticconstexpr

Definition at line 483 of file utils.h.

◆ PHASE_COUNT

uint8_t TeleInfoData::PHASE_COUNT { NO_OF_PHASES }
staticconstexpr

Definition at line 480 of file utils.h.

◆ RELAY_COUNT

uint8_t TeleInfoData::RELAY_COUNT { static_cast< uint8_t >(relayDiverter.size()) }
staticconstexpr

Definition at line 482 of file utils.h.

◆ RELAY_DIVERSION

bool TeleInfoData::RELAY_DIVERSION { ::RELAY_DIVERSION }
staticconstexpr

Definition at line 481 of file utils.h.

◆ relayStatesAtDatalog

uint16_t TeleInfoData::relayStatesAtDatalog { 0 }
inlinestatic

the relay states at the datalog event, bit n for relay n

Definition at line 489 of file utils.h.

◆ TEMP_COUNT

uint8_t TeleInfoData::TEMP_COUNT { TEMP_SENSOR_PRESENT ? static_cast< uint8_t >(tempSensors.size()) : uint8_t{ 0 } }
staticconstexpr

Definition at line 484 of file utils.h.


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