#ifndef LORAMODULEINTERFACEDATA_H
#define LORAMODULEINTERFACEDATA_H

#include <QtGlobal>
#include <QDataStream>

class CLoraModuleInterfaceStatus
{
public:

    enum eE220UartRates
    {
        E220_UART_1200 = 0,
        E220_UART_2400,
        E220_UART_4800,
        E220_UART_9600,
        E220_UART_19200,
        E220_UART_38400,
        E220_UART_57600,
        E220_UART_115200

    };


    enum eE220ParityBit
    {
        E220_UART_8N1=0,
        E220_UART_8O1,
        E220_UART_8E1,
        E220_UART_8N1_bis
    };


    enum e220AirDataRates
    {
        E220_AIR_RATE_24K = 0,
        E220_AIR_RATE_24K_1,
        E220_AIR_RATE_24K_2,
        E220_AIR_RATE_48K,
        E220_AIR_RATE_96K,
        E220_AIR_RATE_192K,
        E220_AIR_RATE_384K,
        E220_AIR_RATE_625K
    };


    enum e220PacketSizes
    {
        E220_PACKET_200,
        E220_PACKET_128,
        E220_PACKET_64,
        E220_PACKET_32
    };


    enum e220TransmitPower
    {
        E220_TX_PWR_30,
        E220_TX_PWR_27,
        E220_TX_PWR_24,
        E220_TX_PWR_21
    };


    enum e220WORCycles
    {
        E220_WOR_500MS,
        E220_WOR_1000MS,
        E220_WOR_1500MS,
        E220_WOR_2000MS,
        E220_WOR_2500MS,
        E220_WOR_3000MS,
        E220_WOR_3500MS,
        E220_WOR_4000MS
    };



    CLoraModuleInterfaceStatus();

    quint8 mModuleModel;
    quint16 mModuleInternalAddress;
    quint8 mModuleUARTParity;
    quint8 mModuleUARTRate;
    quint8 mModuleAirRate;
    quint8 mModuleSubPacket;
    quint8 mModuleRSSIEnabled;
    quint8 mModuleTxPower;
    quint8 mModuleInternalChannel;
    quint8 mModuleRSSIByteEnabled;
    quint8 mModuleTxMethod;
    quint8 mModuleLBTEnabled;
    quint8 mModuleWORCycle;

    quint8 mModuleAmbientRSSI;
    quint8 mModuleLastRxRSSI;

    quint8 mIPAddress1;
    quint8 mIPAddress2;
    quint8 mIPAddress3;
    quint8 mIPAddress4;

    CLoraModuleInterfaceStatus& operator=(const CLoraModuleInterfaceStatus &rhs);

};

QDataStream &operator<<(QDataStream &out, const CLoraModuleInterfaceStatus &source);
QDataStream &operator>>(QDataStream &in, CLoraModuleInterfaceStatus &dest);

#endif // LORAMODULEINTERFACEDATA_H
