28 #include <modbus/modbus.h>
71 INPUT_HUMIDITY = 0x0000,
73 INPUT_TEMPERATURE = 0x0001,
81 COIL_TEMP_SCALE = 0x0000,
84 COIL_OVERRIDE = 0x0001
89 HOLDING_TEMP_OFFSET = 0x0000,
90 HOLDING_HUM_OFFSET = 0x0001
104 HWXPXX(std::string device,
int address,
int baud=19200,
int bits=8,
105 char parity=
'N',
int stopBits=2);
255 int readInputRegs(INPUT_REGS_T reg,
int len, uint16_t *buf);
256 uint16_t readInputReg(INPUT_REGS_T reg);
259 int readCoils(COIL_REGS_T reg,
int numBits, uint8_t *buf);
260 bool readCoil(COIL_REGS_T reg);
261 void writeCoil(COIL_REGS_T reg,
bool val);
264 int readHoldingRegs(HOLDING_REGS_T reg,
int len, uint16_t *buf);
265 uint16_t readHoldingReg(HOLDING_REGS_T reg);
266 void writeHoldingReg(HOLDING_REGS_T reg,
int value);
269 modbus_t *m_mbContext;
float getTemperature(bool fahrenheit=false)
Definition: hwxpxx.cxx:258
void setHumidityOffset(int offset)
Definition: hwxpxx.cxx:302
bool getOverrideSwitchStatus()
Definition: hwxpxx.cxx:276
UPM API for the Veris HWXPXX Hardware Protocol Humidity and Temperature Sensor.
Definition: hwxpxx.h:67
int getHumidityOffset()
Definition: hwxpxx.cxx:286
void setTemperatureScale(bool fahrenheit)
Definition: hwxpxx.cxx:318
int getTemperatureOffset()
Definition: hwxpxx.cxx:281
int getSlider()
Definition: hwxpxx.cxx:271
void setTemperatureOffset(int offset)
Definition: hwxpxx.cxx:291
std::string getSlaveID()
Definition: hwxpxx.cxx:329
void setDebug(bool enable)
Definition: hwxpxx.cxx:371
void setSlaveAddress(int addr)
Definition: hwxpxx.cxx:353
float getHumidity()
Definition: hwxpxx.cxx:266
void clearOverrideSwitch()
Definition: hwxpxx.cxx:313
HWXPXX(std::string device, int address, int baud=19200, int bits=8, char parity='N', int stopBits=2)
Definition: hwxpxx.cxx:47
void update()
Definition: hwxpxx.cxx:228
~HWXPXX()
Definition: hwxpxx.cxx:121