3-phase PV router
Loading...
Searching...
No Matches
relayOutput Class Reference

Represents a single relay configuration and its behavior. More...

#include <utils_relay.h>

Inheritance diagram for relayOutput:
Collaboration diagram for relayOutput:

Public Member Functions

void printRelayConfiguration (uint8_t idx) const
 Print the configuration of the current relay-diversion.
 
- Public Member Functions inherited from RelayLogic::Relay< RelayPinOutput >
constexpr Relay ()=delete
 
constexpr Relay (const uint8_t _relay_pin)
 Construct a new relay Config object with default parameters.
 
constexpr Relay (uint8_t _relay_pin, int16_t _surplusThreshold, int16_t _importThreshold)
 Construct a new relay Config object with default/custom parameters.
 
constexpr Relay (uint8_t _relay_pin, int16_t _surplusThreshold, int16_t _importThreshold, uint16_t _minON, uint16_t _minOFF)
 Construct a new relay Config object with custom parameters.
 
constexpr auto get_importThreshold () const
 Get the import threshold which will turns OFF the relay.
 
constexpr auto get_minOFF () const
 Get the minimum OFF-time in seconds.
 
constexpr auto get_minON () const
 Get the minimum ON-time in seconds.
 
constexpr auto get_pin () const
 Get the control pin of the relay.
 
constexpr auto get_surplusThreshold () const
 Get the surplus threshold which will turns ON the relay.
 
constexpr bool hasValidMinimumTimes () const
 Whether both minimum times fit in 16 bits of seconds (1092 minutes at most).
 
void inc_duration () const
 Increment the duration of the current state.
 
auto isRelayON () const
 Return the state.
 
bool proceed_forced_only (const uint16_t overrideBitmask) const
 Proceed with the relay while diversion is disabled: ON only while forced.
 
bool proceed_relay (const int32_t currentAvgPower, const uint16_t overrideBitmask, const bool onAllowed=true) const
 Proceed with the relay.
 

Detailed Description

Represents a single relay configuration and its behavior.

The decisions are those of RelayLogic::Relay (relay_engine.h); on each change, the relay pin follows the new state and the change is printed (RelayPinOutput).

Definition at line 56 of file utils_relay.h.

Member Function Documentation

◆ printRelayConfiguration()

void relayOutput::printRelayConfiguration ( uint8_t idx) const
inline

Print the configuration of the current relay-diversion.

Definition at line 65 of file utils_relay.h.

Here is the call graph for this function:

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