|
| ModbusRTUSlave (const std::string &dev, bool use485=false, bool tr_ctl=false) |
|
| ModbusRTUSlave (ComPort *com) |
|
void | setSpeed (ComPort::Speed s) |
|
void | setSpeed (const std::string &s) |
|
ComPort::Speed | getSpeed () |
|
void | setParity (ComPort::Parity p) |
|
void | setParity (const std::string &p) |
|
void | setStopBits (ComPort::StopBits b) |
|
void | setCharSize (ComPort::CharacterSize s) |
|
virtual void | cleanupChannel () override |
|
virtual void | terminate () override |
|
virtual bool | isActive () const override |
|
void | initLog (uniset::Configuration *conf, const std::string &name, const std::string &logfile="") |
|
void | setLog (std::shared_ptr< DebugStream > dlog) |
|
std::shared_ptr< DebugStream > | log () |
|
ModbusRTU::mbErrCode | receive (const std::unordered_set< ModbusRTU::ModbusAddr > &vaddr, timeout_t msecTimeout) |
|
virtual ModbusRTU::mbErrCode | receive_one (const ModbusRTU::ModbusAddr addr, timeout_t msec) |
|
PreReceiveSignal | signal_pre_receive () |
|
PostReceiveSignal | signal_post_receive () |
|
timeout_t | setAfterSendPause (timeout_t msec) |
|
timeout_t | setReplyTimeout (timeout_t msec) |
|
void | setRecvTimeout (timeout_t msec) |
|
void | setSleepPause (timeout_t msec) |
|
void | setCRCNoCheckit (bool set) |
|
bool | isCRCNoCheckit () const |
|
void | setBroadcastMode (bool set) |
|
bool | getBroadcastMode () const |
|
void | setCleanBeforeSend (bool set) |
|
bool | getCleanBeforeSend () const |
|
ExchangeErrorMap | getErrorMap () |
|
size_t | getErrCount (ModbusRTU::mbErrCode e) const |
|
size_t | resetErrCount (ModbusRTU::mbErrCode e, size_t set=0) |
|
size_t | getAskCount () const noexcept |
|
void | resetAskCounter () |
|
|
virtual ModbusRTU::mbErrCode | realReceive (const std::unordered_set< ModbusRTU::ModbusAddr > &vmbaddr, timeout_t msecTimeout) override |
|
virtual size_t | getNextData (unsigned char *buf, int len) override |
|
virtual void | setChannelTimeout (timeout_t msec) override |
|
virtual ModbusRTU::mbErrCode | sendData (unsigned char *buf, int len) override |
|
virtual void | iowait (timeout_t usec) |
|
virtual ModbusRTU::mbErrCode | readCoilStatus (ModbusRTU::ReadCoilMessage &query, ModbusRTU::ReadCoilRetMessage &reply)=0 |
|
virtual ModbusRTU::mbErrCode | readInputStatus (ModbusRTU::ReadInputStatusMessage &query, ModbusRTU::ReadInputStatusRetMessage &reply)=0 |
|
virtual ModbusRTU::mbErrCode | readOutputRegisters (ModbusRTU::ReadOutputMessage &query, ModbusRTU::ReadOutputRetMessage &reply)=0 |
|
virtual ModbusRTU::mbErrCode | readInputRegisters (ModbusRTU::ReadInputMessage &query, ModbusRTU::ReadInputRetMessage &reply)=0 |
|
virtual ModbusRTU::mbErrCode | forceSingleCoil (ModbusRTU::ForceSingleCoilMessage &query, ModbusRTU::ForceSingleCoilRetMessage &reply)=0 |
|
virtual ModbusRTU::mbErrCode | writeOutputSingleRegister (ModbusRTU::WriteSingleOutputMessage &query, ModbusRTU::WriteSingleOutputRetMessage &reply)=0 |
|
virtual ModbusRTU::mbErrCode | forceMultipleCoils (ModbusRTU::ForceCoilsMessage &query, ModbusRTU::ForceCoilsRetMessage &reply)=0 |
|
virtual ModbusRTU::mbErrCode | writeOutputRegisters (ModbusRTU::WriteOutputMessage &query, ModbusRTU::WriteOutputRetMessage &reply)=0 |
|
virtual ModbusRTU::mbErrCode | diagnostics (ModbusRTU::DiagnosticMessage &query, ModbusRTU::DiagnosticRetMessage &reply)=0 |
|
virtual ModbusRTU::mbErrCode | read4314 (ModbusRTU::MEIMessageRDI &query, ModbusRTU::MEIMessageRetRDI &reply)=0 |
|
virtual ModbusRTU::mbErrCode | journalCommand (ModbusRTU::JournalCommandMessage &query, ModbusRTU::JournalCommandRetMessage &reply)=0 |
|
virtual ModbusRTU::mbErrCode | setDateTime (ModbusRTU::SetDateTimeMessage &query, ModbusRTU::SetDateTimeRetMessage &reply)=0 |
|
virtual ModbusRTU::mbErrCode | remoteService (ModbusRTU::RemoteServiceMessage &query, ModbusRTU::RemoteServiceRetMessage &reply)=0 |
|
virtual ModbusRTU::mbErrCode | fileTransfer (ModbusRTU::FileTransferMessage &query, ModbusRTU::FileTransferRetMessage &reply)=0 |
|
virtual ModbusRTU::mbErrCode | send (ModbusRTU::ModbusMessage &buf) |
|
virtual ModbusRTU::mbErrCode | make_adu_header (ModbusRTU::ModbusMessage &request) |
|
virtual ModbusRTU::mbErrCode | post_send_request (ModbusRTU::ModbusMessage &request) |
|
virtual ModbusRTU::mbErrCode | processing (ModbusRTU::ModbusMessage &buf) |
|
ModbusRTU::mbErrCode | recv (const std::unordered_set< ModbusRTU::ModbusAddr > &vaddr, ModbusRTU::ModbusMessage &buf, timeout_t timeout) |
|
ModbusRTU::mbErrCode | recv_pdu (ModbusRTU::ModbusMessage &rbuf, timeout_t timeout) |
|
void | printProcessingTime () |
|
|
typedef sigc::signal< ModbusRTU::mbErrCode, const std::unordered_set< ModbusRTU::ModbusAddr >, timeout_t > | PreReceiveSignal |
|
typedef sigc::signal< void, ModbusRTU::mbErrCode > | PostReceiveSignal |
|
typedef std::unordered_map< ModbusRTU::mbErrCode, size_t > | ExchangeErrorMap |
|
static std::unordered_set< ModbusRTU::ModbusAddr > | addr2vaddr (ModbusRTU::ModbusAddr &mbaddr) |
|
static bool | checkAddr (const std::unordered_set< ModbusRTU::ModbusAddr > &vaddr, const ModbusRTU::ModbusAddr addr) |
|
static std::string | vaddr2str (const std::unordered_set< ModbusRTU::ModbusAddr > &vaddr) |
|
static ModbusRTU::mbErrCode | replySetDateTime (ModbusRTU::SetDateTimeMessage &query, ModbusRTU::SetDateTimeRetMessage &reply, std::shared_ptr< DebugStream > dlog=nullptr) |
|
static ModbusRTU::mbErrCode | replyFileTransfer (const std::string &fname, ModbusRTU::FileTransferMessage &query, ModbusRTU::FileTransferRetMessage &reply, std::shared_ptr< DebugStream > dlog=nullptr) |
|
Modbus RTU slave mode Класс не самостоятельный и содержит "чисто" виртуальные функции для реализации ответов на запросы.