28 #include <modbus/modbus.h> 85 HOLDING_CONSUMPTION_KWH_INT_L = 0,
86 HOLDING_CONSUMPTION_KWH_INT_H = 1,
89 HOLDING_CONSUMPTION_KWH = 258,
91 HOLDING_REAL_POWER_KW = 260,
94 HOLDING_REACTIVE_POWER_KVAR = 262,
95 HOLDING_APPARENT_POWER_KVA = 264,
96 HOLDING_POWER_FACTOR = 266,
97 HOLDING_VOLTS_LINE_TO_LINE = 268,
98 HOLDING_VOLTS_LINE_TO_NEUTRAL = 270,
99 HOLDING_CURRENT = 272,
100 HOLDING_REAL_POWER_PHASE_A_KWH = 274,
101 HOLDING_REAL_POWER_PHASE_B_KWH = 276,
102 HOLDING_REAL_POWER_PHASE_C_KWH = 278,
103 HOLDING_POWER_FACTOR_PHASE_A = 280,
104 HOLDING_POWER_FACTOR_PHASE_B = 282,
105 HOLDING_POWER_FACTOR_PHASE_C = 284,
106 HOLDING_VOLTS_PHASE_AB = 286,
107 HOLDING_VOLTS_PHASE_BC = 288,
108 HOLDING_VOLTS_PHASE_AC = 290,
109 HOLDING_VOLTS_PHASE_AN = 292,
110 HOLDING_VOLTS_PHASE_BN = 294,
111 HOLDING_VOLTS_PHASE_CN = 296,
112 HOLDING_CURRENT_PHASE_A = 298,
113 HOLDING_CURRENT_PHASE_B = 300,
114 HOLDING_CURRENT_PHASE_C = 302,
115 HOLDING_AVG_REAL_POWER_KW = 304,
116 HOLDING_MIN_REAL_POWER_KW = 306,
117 HOLDING_MAX_REAL_POWER_KW = 308
141 H803X(std::string device,
int address,
int baud=9600,
int bits=8,
142 char parity=
'N',
int stopBits=2);
196 return m_consumptionkWh;
207 return m_realPowerkW;
219 return m_reactivePowerkVAR;
230 return m_apparentPowerkVA;
241 return m_powerFactor;
252 return m_voltsLineToLine;
263 return m_voltsLineToNeutral;
285 return m_realPowerPhaseAkW;
296 return m_realPowerPhaseBkW;
307 return m_realPowerPhaseCkW;
318 return m_powerFactorPhaseA;
329 return m_powerFactorPhaseB;
340 return m_powerFactorPhaseC;
351 return m_voltsPhaseAB;
362 return m_voltsPhaseBC;
373 return m_voltsPhaseAC;
384 return m_voltsPhaseAN;
395 return m_voltsPhaseBN;
406 return m_voltsPhaseCN;
417 return m_currentPhaseA;
428 return m_currentPhaseB;
439 return m_currentPhaseC;
450 return m_avgRealPowerkW;
461 return m_minRealPowerkW;
472 return m_maxRealPowerkW;
496 int readHoldingRegs(HOLDING_REGS_T reg,
int len, uint16_t *buf);
497 void writeHoldingReg(HOLDING_REGS_T reg,
int value);
503 modbus_t *m_mbContext;
518 float m_consumptionkWh;
522 float m_reactivePowerkVAR;
523 float m_apparentPowerkVA;
525 float m_voltsLineToLine;
526 float m_voltsLineToNeutral;
528 float m_realPowerPhaseAkW;
529 float m_realPowerPhaseBkW;
530 float m_realPowerPhaseCkW;
531 float m_powerFactorPhaseA;
532 float m_powerFactorPhaseB;
533 float m_powerFactorPhaseC;
534 float m_voltsPhaseAB;
535 float m_voltsPhaseBC;
536 float m_voltsPhaseAC;
537 float m_voltsPhaseAN;
538 float m_voltsPhaseBN;
539 float m_voltsPhaseCN;
540 float m_currentPhaseA;
541 float m_currentPhaseB;
542 float m_currentPhaseC;
543 float m_avgRealPowerkW;
544 float m_minRealPowerkW;
545 float m_maxRealPowerkW;
void presetConsumption(float value, MULTIPLIERS_T multiplier)
Definition: h803x.cxx:346
float getApparentPower()
Definition: h803x.hpp:228
float getConsumption()
Definition: h803x.hpp:194
float getCurrentPhaseB()
Definition: h803x.hpp:426
float getPowerFactorPhaseB()
Definition: h803x.hpp:327
void setSlaveAddress(int addr)
Definition: h803x.cxx:267
void setDebug(bool enable)
Definition: h803x.cxx:286
float getRealPowerPhaseC()
Definition: h803x.hpp:305
float getAvgRealPower()
Definition: h803x.hpp:448
float getVoltsPhaseCToNeutral()
Definition: h803x.hpp:404
float getVoltsPhaseAToNeutral()
Definition: h803x.hpp:382
float getVoltsLineToNeutral()
Definition: h803x.hpp:261
float getCurrent()
Definition: h803x.hpp:272
float getPowerFactorPhaseC()
Definition: h803x.hpp:338
float getVoltsPhaseAToC()
Definition: h803x.hpp:371
~H803X()
Definition: h803x.cxx:119
C++ API wrapper for the bh1749 driver.
Definition: a110x.hpp:29
float getVoltsPhaseBToNeutral()
Definition: h803x.hpp:393
float getMinRealPower()
Definition: h803x.hpp:459
H803X(std::string device, int address, int baud=9600, int bits=8, char parity='N', int stopBits=2)
Definition: h803x.cxx:58
float getCurrentPhaseA()
Definition: h803x.hpp:415
float getVoltsPhaseAToB()
Definition: h803x.hpp:349
float getRealPower()
Definition: h803x.hpp:205
float getVoltsPhaseBToC()
Definition: h803x.hpp:360
float getRealPowerPhaseB()
Definition: h803x.hpp:294
std::string getSlaveID()
Definition: h803x.cxx:241
void update()
Definition: h803x.cxx:181
float getPowerFactor()
Definition: h803x.hpp:239
float getRealPowerPhaseA()
Definition: h803x.hpp:283
float getPowerFactorPhaseA()
Definition: h803x.hpp:316
float getVoltsLineToLine()
Definition: h803x.hpp:250
UPM API for the Veris H803X Energy Meter.
Definition: h803x.hpp:76
bool isH8036()
Definition: h803x.hpp:489
float getCurrentPhaseC()
Definition: h803x.hpp:437
float getMaxRealPower()
Definition: h803x.hpp:470
float getReactivePower()
Definition: h803x.hpp:217