17 #ifndef _RTUSTORAGE_H_
18 #define _RTUSTORAGE_H_
23 #include "modbus/ModbusTypes.h"
24 #include "UniSetTypes.h"
29 class ModbusRTUMaster;
34 explicit RTUStorage( ModbusRTU::ModbusAddr addr );
37 void poll(
const std::shared_ptr<ModbusRTUMaster>& mb )
40 inline ModbusRTU::ModbusAddr getAddress()
49 inline void setPollADC(
bool set )
53 inline void setPollDI(
bool set )
57 inline void setPollDIO(
bool set )
61 inline void setPollUNIO(
bool set )
78 static RTUJack s2j(
const std::string& jack );
79 static std::string j2s( RTUJack j );
81 long getInt( RTUJack jack,
unsigned short channel, UniversalIO::IOType t );
82 float getFloat( RTUJack jack,
unsigned short channel, UniversalIO::IOType t );
83 bool getState( RTUJack jack,
unsigned short channel, UniversalIO::IOType t );
85 static ModbusRTU::ModbusData getRegister( RTUJack jack,
unsigned short channel, UniversalIO::IOType t );
87 static ModbusRTU::SlaveFunctionCode getFunction( RTUJack jack,
unsigned short channel, UniversalIO::IOType t );
92 friend std::ostream& operator<<(std::ostream& os,
RTUStorage& m );
93 friend std::ostream& operator<<(std::ostream& os,
RTUStorage* m );
96 ModbusRTU::ModbusAddr addr;
119 #endif // _RTUSTORAGE_H_