6#include <unordered_set>
9#include "modbus/ModbusRTUSlaveSlot.h"
16 MBSlave(
const std::unordered_set<uniset::ModbusRTU::ModbusAddr>&
vaddr,
const std::string& dev,
const std::string& speed,
bool use485 =
false );
19 inline void setVerbose(
bool state )
24 inline void setReply(
long val )
28 inline void setReply2(
long val )
32 inline void setReply3(
long val )
37 void setRandomReply(
long min,
long max );
41 void setLog( std::shared_ptr<DebugStream> dlog );
45 void sigterm(
int signo );
102 std::unordered_set<uniset::ModbusRTU::ModbusAddr>
vaddr;
105 std::random_device rnd;
106 std::unique_ptr<std::mt19937> gen = {
nullptr };
107 std::unique_ptr<std::uniform_int_distribution<>> rndgen = {
nullptr };
109 typedef std::unordered_map<uniset::ModbusRTU::mbErrCode, unsigned int> ExchangeErrorMap;
110 ExchangeErrorMap errmap;
111 uniset::ModbusRTU::mbErrCode prev;
119 typedef std::unordered_map<int, std::string> FileList;
Definition Utilities/MBTester/MBSlave.h:14
uniset::ModbusRTU::mbErrCode readCoilStatus(uniset::ModbusRTU::ReadCoilMessage &query, uniset::ModbusRTU::ReadCoilRetMessage &reply)
Definition Utilities/MBTester/mbslave.cc:117
uniset::ModbusRTU::mbErrCode remoteService(uniset::ModbusRTU::RemoteServiceMessage &query, uniset::ModbusRTU::RemoteServiceRetMessage &reply)
Definition Utilities/MBTester/mbslave.cc:394
uniset::ModbusRTU::mbErrCode forceMultipleCoils(uniset::ModbusRTU::ForceCoilsMessage &query, uniset::ModbusRTU::ForceCoilsRetMessage &reply)
Definition Utilities/MBTester/mbslave.cc:299
std::unordered_set< uniset::ModbusRTU::ModbusAddr > vaddr
Definition Utilities/MBTester/MBSlave.h:102
uniset::ModbusRTU::mbErrCode readInputRegisters(uniset::ModbusRTU::ReadInputMessage &query, uniset::ModbusRTU::ReadInputRetMessage &reply)
Definition Utilities/MBTester/mbslave.cc:198
uniset::ModbusRTU::mbErrCode writeOutputSingleRegister(uniset::ModbusRTU::WriteSingleOutputMessage &query, uniset::ModbusRTU::WriteSingleOutputRetMessage &reply)
Definition Utilities/MBTester/mbslave.cc:322
uniset::ModbusRTU::mbErrCode readInputStatus(uniset::ModbusRTU::ReadInputStatusMessage &query, uniset::ModbusRTU::ReadInputStatusRetMessage &reply)
Definition Utilities/MBTester/mbslave.cc:145
uniset::ModbusRTU::mbErrCode forceSingleCoil(uniset::ModbusRTU::ForceSingleCoilMessage &query, uniset::ModbusRTU::ForceSingleCoilRetMessage &reply)
Definition Utilities/MBTester/mbslave.cc:333
uniset::ModbusRTU::mbErrCode readOutputRegisters(uniset::ModbusRTU::ReadOutputMessage &query, uniset::ModbusRTU::ReadOutputRetMessage &reply)
Definition Utilities/MBTester/mbslave.cc:248
void execute()
Definition Utilities/MBTester/mbslave.cc:86
uniset::ModbusRTU::mbErrCode setDateTime(uniset::ModbusRTU::SetDateTimeMessage &query, uniset::ModbusRTU::SetDateTimeRetMessage &reply)
Definition Utilities/MBTester/mbslave.cc:382
uniset::ModbusRTUSlaveSlot * rscomm
Definition Utilities/MBTester/MBSlave.h:101
uniset::ModbusRTU::mbErrCode journalCommand(uniset::ModbusRTU::JournalCommandMessage &query, uniset::ModbusRTU::JournalCommandRetMessage &reply)
Definition Utilities/MBTester/mbslave.cc:345
uniset::ModbusRTU::mbErrCode writeOutputRegisters(uniset::ModbusRTU::WriteOutputMessage &query, uniset::ModbusRTU::WriteOutputRetMessage &reply)
Definition Utilities/MBTester/mbslave.cc:310
Definition ModbusRTUSlaveSlot.h:21
Definition ModbusTypes.h:1118
Definition ModbusTypes.h:1176
Definition ModbusTypes.h:1575
Definition ModbusTypes.h:1603
Definition ModbusTypes.h:727
Definition ModbusTypes.h:804
Definition ModbusTypes.h:937
Definition ModbusTypes.h:988
Definition ModbusTypes.h:1310
Definition ModbusTypes.h:1333
Definition ModbusTypes.h:1188
Definition ModbusTypes.h:1243
Definition ModbusTypes.h:347
Definition ModbusTypes.h:378
Definition ModbusTypes.h:548
Definition ModbusTypes.h:577
Definition ModbusTypes.h:1456
Definition ModbusTypes.h:1489
Definition ModbusTypes.h:1398
Definition ModbusTypes.h:1436
Definition ModbusTypes.h:844
Definition ModbusTypes.h:898
Definition ModbusTypes.h:1033
Definition ModbusTypes.h:1079