MycilaJSY 13.0.0
Arduino / ESP32 library for the JSY1031, JSY-MK-163, JSY-MK-193, JSY-MK-194, JSY-MK-227, JSY-MK-229, JSY-MK-333 families single-phase and three-phase AC bidirectional meters from Shenzhen Jiansiyan Technologies Co, Ltd.
|
Public Member Functions | |
float | thdi (float phi=1) const |
Compute the total harmonic distortion of current (THDi). See: https://fr.electrical-installation.org/frwiki/Indicateur_de_distorsion_harmonique_:_facteur_de_puissance. | |
float | resistance () const |
Compute the resistance of the load in ohms (R = P / I^2). | |
float | dimmedVoltage () const |
Compute the dimmed voltage (V = P / I). | |
float | nominalPower () const |
Compute the nominal power of the load in watts (P = V^2 / R). | |
void | clear () |
bool | operator== (const Metrics &other) const |
bool | operator!= (const Metrics &other) const |
Metrics & | operator+= (const Metrics &other) |
void | operator= (const Metrics &other) |
Data Fields | |
float | frequency = NAN |
Frequency in hertz (Hz). | |
float | voltage = NAN |
Voltage in volts (V). | |
float | current = NAN |
Current in amperes (A). | |
float | activePower = NAN |
Active power in watts (W). | |
float | powerFactor = NAN |
Power factor. | |
float | apparentPower = NAN |
Apparent power in volt-amperes (VA). | |
float | reactivePower = NAN |
Reactive power in volt-amperes reactive (VAr). | |
float | activeEnergy = NAN |
Active energy in kilowatt-hours (kWh). | |
float | activeEnergyImported = NAN |
Active energy imported in kilowatt-hours (kWh), going to the load, when activePower > 0. | |
float | activeEnergyReturned = NAN |
Active energy returned in kilowatt-hours (kWh), coming from the load, when activePower < 0. | |
float | reactiveEnergy = NAN |
Reactive energy in kilovolt-amperes reactive-hours (kVArh). | |
float | reactiveEnergyImported = NAN |
Reactive energy imported in kilovolt-amperes reactive-hours (kVArh), going to the load, when reactivePower > 0. | |
float | reactiveEnergyReturned = NAN |
Reactive energy returned in kilovolt-amperes reactive-hours (kVArh), coming from the load, when reactivePower < 0. | |
float | apparentEnergy = NAN |
Apparent energy in kilovolt-amperes-hours (kVAh). | |
Definition at line 125 of file MycilaJSY.h.
void Mycila::JSY::Metrics::clear | ( | ) |
Definition at line 20 of file MycilaJSYMetrics.cpp.
float Mycila::JSY::Metrics::dimmedVoltage | ( | ) | const |
Compute the dimmed voltage (V = P / I).
Definition at line 16 of file MycilaJSYMetrics.cpp.
float Mycila::JSY::Metrics::nominalPower | ( | ) | const |
Compute the nominal power of the load in watts (P = V^2 / R).
Definition at line 18 of file MycilaJSYMetrics.cpp.
|
inline |
Definition at line 249 of file MycilaJSY.h.
Mycila::JSY::Metrics & Mycila::JSY::Metrics::operator+= | ( | const Metrics & | other | ) |
Definition at line 54 of file MycilaJSYMetrics.cpp.
void Mycila::JSY::Metrics::operator= | ( | const Metrics & | other | ) |
Definition at line 71 of file MycilaJSYMetrics.cpp.
bool Mycila::JSY::Metrics::operator== | ( | const Metrics & | other | ) | const |
Definition at line 37 of file MycilaJSYMetrics.cpp.
float Mycila::JSY::Metrics::resistance | ( | ) | const |
Compute the resistance of the load in ohms (R = P / I^2).
Definition at line 14 of file MycilaJSYMetrics.cpp.
float Mycila::JSY::Metrics::thdi | ( | float | phi = 1 | ) | const |
Compute the total harmonic distortion of current (THDi). See: https://fr.electrical-installation.org/frwiki/Indicateur_de_distorsion_harmonique_:_facteur_de_puissance.
phi | The phase shift angle in radians (1 for resistive load) |
Definition at line 7 of file MycilaJSYMetrics.cpp.
float Mycila::JSY::Metrics::activeEnergy = NAN |
Active energy in kilowatt-hours (kWh).
Definition at line 176 of file MycilaJSY.h.
float Mycila::JSY::Metrics::activeEnergyImported = NAN |
Active energy imported in kilowatt-hours (kWh), going to the load, when activePower > 0.
Definition at line 183 of file MycilaJSY.h.
float Mycila::JSY::Metrics::activeEnergyReturned = NAN |
Active energy returned in kilowatt-hours (kWh), coming from the load, when activePower < 0.
Definition at line 190 of file MycilaJSY.h.
float Mycila::JSY::Metrics::activePower = NAN |
Active power in watts (W).
Definition at line 149 of file MycilaJSY.h.
float Mycila::JSY::Metrics::apparentEnergy = NAN |
Apparent energy in kilovolt-amperes-hours (kVAh).
Definition at line 216 of file MycilaJSY.h.
float Mycila::JSY::Metrics::apparentPower = NAN |
Apparent power in volt-amperes (VA).
Definition at line 162 of file MycilaJSY.h.
float Mycila::JSY::Metrics::current = NAN |
Current in amperes (A).
Definition at line 143 of file MycilaJSY.h.
float Mycila::JSY::Metrics::frequency = NAN |
Frequency in hertz (Hz).
Definition at line 131 of file MycilaJSY.h.
float Mycila::JSY::Metrics::powerFactor = NAN |
Power factor.
Definition at line 155 of file MycilaJSY.h.
float Mycila::JSY::Metrics::reactiveEnergy = NAN |
Reactive energy in kilovolt-amperes reactive-hours (kVArh).
Definition at line 196 of file MycilaJSY.h.
float Mycila::JSY::Metrics::reactiveEnergyImported = NAN |
Reactive energy imported in kilovolt-amperes reactive-hours (kVArh), going to the load, when reactivePower > 0.
Definition at line 203 of file MycilaJSY.h.
float Mycila::JSY::Metrics::reactiveEnergyReturned = NAN |
Reactive energy returned in kilovolt-amperes reactive-hours (kVArh), coming from the load, when reactivePower < 0.
Definition at line 210 of file MycilaJSY.h.
float Mycila::JSY::Metrics::reactivePower = NAN |
Reactive power in volt-amperes reactive (VAr).
Definition at line 169 of file MycilaJSY.h.
float Mycila::JSY::Metrics::voltage = NAN |
Voltage in volts (V).
Definition at line 137 of file MycilaJSY.h.