17 #ifndef _RTUSTORAGE_H_
18 #define _RTUSTORAGE_H_
24 #include "modbus/ModbusTypes.h"
25 #include "UniSetTypes.h"
30 class ModbusRTUMaster;
35 explicit RTUStorage( ModbusRTU::ModbusAddr addr );
39 void poll(
const std::shared_ptr<ModbusRTUMaster>& mb );
41 inline ModbusRTU::ModbusAddr getAddress()
50 inline void setPollADC(
bool set )
54 inline void setPollDI(
bool set )
58 inline void setPollDIO(
bool set )
62 inline void setPollUNIO(
bool set )
79 static RTUJack s2j(
const std::string& jack );
80 static std::string j2s( RTUJack j );
82 long getInt( RTUJack jack, uint16_t channel, UniversalIO::IOType t );
83 float getFloat( RTUJack jack, uint16_t channel, UniversalIO::IOType t );
84 bool getState( RTUJack jack, uint16_t channel, UniversalIO::IOType t );
86 static ModbusRTU::ModbusData getRegister( RTUJack jack, uint16_t channel, UniversalIO::IOType t );
88 static ModbusRTU::SlaveFunctionCode getFunction( RTUJack jack, uint16_t channel, UniversalIO::IOType t );
93 friend std::ostream& operator<<(std::ostream& os,
RTUStorage& m );
94 friend std::ostream& operator<<(std::ostream& os,
RTUStorage* m );
97 ModbusRTU::ModbusAddr addr;
Definition: RTUStorage.h:33
Definition: CommonEventLoop.h:15