3-phase PV router
Loading...
Searching...
No Matches
config_system.h
Go to the documentation of this file.
1
11
12#ifndef CONFIG_SYSTEM_H
13#define CONFIG_SYSTEM_H
14
15#include "type_traits.hpp"
16
17inline constexpr uint8_t NO_OF_PHASES{ 3 };
18
19//--------------------------------------------------------------------------------------------------
20// for users with zero-export profile, this value will be negative
21inline constexpr int16_t REQUIRED_EXPORT_IN_WATTS{ 20 };
22inline constexpr int16_t DIVERSION_START_THRESHOLD_WATTS{ 0 };
23
24//--------------------------------------------------------------------------------------------------
25// other system constants, should match most of installations
26inline constexpr uint8_t SUPPLY_FREQUENCY{ 50 };
27
28inline constexpr uint32_t WORKING_ZONE_IN_JOULES{ 3600UL };
29
30inline constexpr uint8_t DATALOG_PERIOD_IN_SECONDS{ 5 };
31
33
34// Computes inverse value at compile time to use '*' instead of '/'
35inline constexpr float invSUPPLY_FREQUENCY{ 1.0F / SUPPLY_FREQUENCY };
37//--------------------------------------------------------------------------------------------------
38
39#endif // CONFIG_SYSTEM_H
constexpr int16_t REQUIRED_EXPORT_IN_WATTS
constexpr uint32_t WORKING_ZONE_IN_JOULES
constexpr float invDATALOG_PERIOD_IN_MAINS_CYCLES
constexpr float invSUPPLY_FREQUENCY
constexpr conditional< DATALOG_PERIOD_IN_SECONDS *SUPPLY_FREQUENCY >=UINT8_MAX, uint16_t, uint8_t >::type DATALOG_PERIOD_IN_MAINS_CYCLES
constexpr uint8_t DATALOG_PERIOD_IN_SECONDS
constexpr uint8_t NO_OF_PHASES
constexpr uint8_t SUPPLY_FREQUENCY
constexpr int16_t DIVERSION_START_THRESHOLD_WATTS
Some useful but missing stl functions templates.