#ifndef MODBUSHISTORIENMASTER_H
#define MODBUSHISTORIENMASTER_H

#include "ModbusBackend.h"
#include <QTimer>

class CHistorianPage;

class CModbusHistorienMaster : public CModbusBackend
{
    Q_OBJECT
public:
    CModbusHistorienMaster(CModbusRepository *HistorienRepo);
    virtual ~CModbusHistorienMaster();
    int ConnectToZTRequest(QString IP, int port);
    int DisconnectFromZTRequest();

    void RegistersDatabaseUpdated(quint16 StartAddress, quint16 Length);
    //Master signals
    void ModbusResponseException(quint8 ExceptionCode, quint8 FctCode);

  //  QTcpSocket *mHistorianZTSocket;
    CHistorianPage *mPageHandle;
    QTimer *mHistorienPollTimer;

public slots:
    void SocketConnected();
    void SocketDisconnected();
    void HistorienPollTimerExpired();
};

#endif // MODBUSHISTORIENMASTER_H
