|
| ModbusRTUSlaveSlot (ComPort *com) |
|
| ModbusRTUSlaveSlot (const std::string &dev, bool use485=false, bool tr_ctl=false) |
|
virtual void | terminate () override |
|
ComPort * | getComPort () |
|
| 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 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 () |
|
void | connectReadCoil (ReadCoilSlot sl) |
|
void | connectReadInputStatus (ReadInputStatusSlot sl) |
|
void | connectReadOutput (ReadOutputSlot sl) |
|
void | connectReadInput (ReadInputSlot sl) |
|
void | connectForceSingleCoil (ForceSingleCoilSlot sl) |
|
void | connectWriteSingleOutput (WriteSingleOutputSlot sl) |
|
void | connectDiagnostics (DiagnosticsSlot sl) |
|
void | connectMEIRDI (MEIRDISlot sl) |
|
void | connectForceCoils (ForceCoilsSlot sl) |
|
void | connectWriteOutput (WriteOutputSlot sl) |
|
void | connectJournalCommand (JournalCommandSlot sl) |
|
void | connectSetDateTime (SetDateTimeSlot sl) |
|
void | connectRemoteService (RemoteServiceSlot sl) |
|
void | connectFileTransfer (FileTransferSlot sl) |
|
|
virtual ModbusRTU::mbErrCode | readCoilStatus (ModbusRTU::ReadCoilMessage &query, ModbusRTU::ReadCoilRetMessage &reply) override |
|
virtual ModbusRTU::mbErrCode | readInputStatus (ModbusRTU::ReadInputStatusMessage &query, ModbusRTU::ReadInputStatusRetMessage &reply) override |
|
virtual ModbusRTU::mbErrCode | readOutputRegisters (ModbusRTU::ReadOutputMessage &query, ModbusRTU::ReadOutputRetMessage &reply) override |
|
virtual ModbusRTU::mbErrCode | readInputRegisters (ModbusRTU::ReadInputMessage &query, ModbusRTU::ReadInputRetMessage &reply) override |
|
virtual ModbusRTU::mbErrCode | forceSingleCoil (ModbusRTU::ForceSingleCoilMessage &query, ModbusRTU::ForceSingleCoilRetMessage &reply) override |
|
virtual ModbusRTU::mbErrCode | writeOutputSingleRegister (ModbusRTU::WriteSingleOutputMessage &query, ModbusRTU::WriteSingleOutputRetMessage &reply) override |
|
virtual ModbusRTU::mbErrCode | forceMultipleCoils (ModbusRTU::ForceCoilsMessage &query, ModbusRTU::ForceCoilsRetMessage &reply) override |
|
virtual ModbusRTU::mbErrCode | writeOutputRegisters (ModbusRTU::WriteOutputMessage &query, ModbusRTU::WriteOutputRetMessage &reply) override |
|
virtual ModbusRTU::mbErrCode | diagnostics (ModbusRTU::DiagnosticMessage &query, ModbusRTU::DiagnosticRetMessage &reply) override |
|
virtual ModbusRTU::mbErrCode | read4314 (ModbusRTU::MEIMessageRDI &query, ModbusRTU::MEIMessageRetRDI &reply) override |
|
virtual ModbusRTU::mbErrCode | journalCommand (ModbusRTU::JournalCommandMessage &query, ModbusRTU::JournalCommandRetMessage &reply) override |
|
virtual ModbusRTU::mbErrCode | setDateTime (ModbusRTU::SetDateTimeMessage &query, ModbusRTU::SetDateTimeRetMessage &reply) override |
|
virtual ModbusRTU::mbErrCode | remoteService (ModbusRTU::RemoteServiceMessage &query, ModbusRTU::RemoteServiceRetMessage &reply) override |
|
virtual ModbusRTU::mbErrCode | fileTransfer (ModbusRTU::FileTransferMessage &query, ModbusRTU::FileTransferRetMessage &reply) override |
|
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 | 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 |
|
typedef sigc::slot< ModbusRTU::mbErrCode, ModbusRTU::ReadCoilMessage &, ModbusRTU::ReadCoilRetMessage & > | ReadCoilSlot |
|
typedef sigc::slot< ModbusRTU::mbErrCode, ModbusRTU::ReadInputStatusMessage &, ModbusRTU::ReadInputStatusRetMessage & > | ReadInputStatusSlot |
|
typedef sigc::slot< ModbusRTU::mbErrCode, ModbusRTU::ReadOutputMessage &, ModbusRTU::ReadOutputRetMessage & > | ReadOutputSlot |
|
typedef sigc::slot< ModbusRTU::mbErrCode, ModbusRTU::ReadInputMessage &, ModbusRTU::ReadInputRetMessage & > | ReadInputSlot |
|
typedef sigc::slot< ModbusRTU::mbErrCode, ModbusRTU::ForceSingleCoilMessage &, ModbusRTU::ForceSingleCoilRetMessage & > | ForceSingleCoilSlot |
|
typedef sigc::slot< ModbusRTU::mbErrCode, ModbusRTU::WriteSingleOutputMessage &, ModbusRTU::WriteSingleOutputRetMessage & > | WriteSingleOutputSlot |
|
typedef sigc::slot< ModbusRTU::mbErrCode, ModbusRTU::ForceCoilsMessage &, ModbusRTU::ForceCoilsRetMessage & > | ForceCoilsSlot |
|
typedef sigc::slot< ModbusRTU::mbErrCode, ModbusRTU::WriteOutputMessage &, ModbusRTU::WriteOutputRetMessage & > | WriteOutputSlot |
|
typedef sigc::slot< ModbusRTU::mbErrCode, ModbusRTU::DiagnosticMessage &, ModbusRTU::DiagnosticRetMessage & > | DiagnosticsSlot |
|
typedef sigc::slot< ModbusRTU::mbErrCode, ModbusRTU::MEIMessageRDI &, ModbusRTU::MEIMessageRetRDI & > | MEIRDISlot |
|
typedef sigc::slot< ModbusRTU::mbErrCode, ModbusRTU::JournalCommandMessage &, ModbusRTU::JournalCommandRetMessage & > | JournalCommandSlot |
|
typedef sigc::slot< ModbusRTU::mbErrCode, ModbusRTU::SetDateTimeMessage &, ModbusRTU::SetDateTimeRetMessage & > | SetDateTimeSlot |
|
typedef sigc::slot< ModbusRTU::mbErrCode, ModbusRTU::RemoteServiceMessage &, ModbusRTU::RemoteServiceRetMessage & > | RemoteServiceSlot |
|
typedef sigc::slot< ModbusRTU::mbErrCode, ModbusRTU::FileTransferMessage &, ModbusRTU::FileTransferRetMessage & > | FileTransferSlot |
|
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) |
|
std::string | dev |
|
ComPort * | port |
|
bool | myport |
|
std::timed_mutex | recvMutex |
|
timeout_t | recvTimeOut_ms = { 50 } |
|
timeout_t | replyTimeout_ms = { 2000 } |
|
timeout_t | aftersend_msec = { 0 } |
|
timeout_t | sleepPause_msec = { 10 } |
|
bool | onBroadcast = { false } |
|
bool | crcNoCheckit = { false } |
|
bool | cleanBeforeSend = { false } |
|
PassiveTimer | tmProcessing |
|
std::shared_ptr< DebugStream > | dlog |
|
size_t | askCount = { 0 } |
|
ExchangeErrorMap | errmap |
|
PreReceiveSignal | m_pre_signal |
|
PostReceiveSignal | m_post_signal |
|
ReadCoilSlot | slReadCoil |
|
ReadInputStatusSlot | slReadInputStatus |
|
ReadOutputSlot | slReadOutputs |
|
ReadInputSlot | slReadInputs |
|
ForceCoilsSlot | slForceCoils |
|
WriteOutputSlot | slWriteOutputs |
|
ForceSingleCoilSlot | slForceSingleCoil |
|
WriteSingleOutputSlot | slWriteSingleOutputs |
|
DiagnosticsSlot | slDiagnostics |
|
MEIRDISlot | slMEIRDI |
|
JournalCommandSlot | slJournalCommand |
|
SetDateTimeSlot | slSetDateTime |
|
RemoteServiceSlot | slRemoteService |
|
FileTransferSlot | slFileTransfer |
|
Реализация позволяющая добавлять обработчики не наследуясь от ModbusRTUSlave. Основана на использовании слотов.
- Предупреждения
- Пока реализована возможность подключения ТОЛЬКО ОДНОГО обработчика