#ifndef LORAMODULEINTERFACE_H
#define LORAMODULEINTERFACE_H

#include <QByteArray>
#include <QObject>
#include <QSerialPort>
#include "NetworkProtocol.h"
#include "AbstractNetworkInterface.h"
#include "NetworkDevice.h"
#include <QTimer>
#include <QSerialPort>

class CLoraModuleInterface : public QObject, public CNetworkProtocol, public CAbstractNetworkCommIF
{
    Q_OBJECT

public:
    CLoraModuleInterface();
    ~CLoraModuleInterface();

    int SetLoraModuleInterfaceParameters(QString ComPort,qint32 BaudRate);

    QTimer *mLoraModuleIFStatusTimer;
    QSerialPort mLoraModuleIFSerialPort;
    QString mLoraModuleIFComPortName;
    qint32 mLoraModuleIFComPortBaudRate;





    //NetworkProtocol implementation
  virtual int NewFrameReceived(int DeviceID, int DeviceAddress, int MessageID, int DataSize, QByteArray Data);

  //NetworkCommIF implementation
  virtual int SendNetworkMessage(int DeviceID, int DeviceAddress, int MessageID, int DataSize, QByteArray *Data);

public slots:
    void LoraModuleStatusTimerExpired();
    void NewLoraModuleIFDataReady();
};

#endif // LORAMODULEINTERFACE_H
