#ifndef CMODBUSSEIMGR_H #define CMODBUSSEIMGR_H #include #include "ModbusBackend.h" #include #include #include class CModbusSEIMgr : public CModbusBackend { Q_OBJECT public: explicit CModbusSEIMgr(CModbusRepository *Repo, QHostAddress ServerIP, int ModbusPort, int DevID); ~CModbusSEIMgr(); int ConnectToSlave(QHostAddress SlaveIP, int SlavePort); int DisconnectFromSlave(); int ReadModbusRegisters(); int StartSEICommunication(); int SEISettingsChanged(QHostAddress ServerIP, int ModbusPort, int DevID); virtual void RegistersDatabaseUpdated(quint16 StartAddress, quint16 Length); virtual void ModbusResponseException(quint8 ExceptionCode, quint8 FctCode); QTimer *mConnectionTimer; QTimer *mSEIWatchdogTimer; QElapsedTimer mConnectionTimeout; private: int mModbusPort; QHostAddress mSEIIPAddress; signals: void ModbusMasterConnected(qint32 LocalIP, qint32 RemoteIP); void ModbusMasterDisconnected(); void ModbusMasterRepositoryUpdated(); public slots: void SocketConnected(); void SocketDisconnected(); void ConnectionTimerExpired(); }; #endif // CMODBUSSEIMGR_H