#ifndef DEVICETYPEINFLUXDBWRITER_H
#define DEVICETYPEINFLUXDBWRITER_H

#include <QObject>
#include <QTimer>
#include <QList>
#include <QDateTime>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>
#include "qreplytimeout.h"
#include "logthread.h"
#include "mqttthread.h"

class DeviceTypeInfluxdbWriter : public QObject
{
    Q_OBJECT
public:
    explicit DeviceTypeInfluxdbWriter(QObject *parent = nullptr);
    ~DeviceTypeInfluxdbWriter();
    void start();

signals:

public slots:
    void dataListLog(QString log);
    void receiveDevData(QString data);

    void time_out();
    void reply_timeout();
    void finishedSlot(QNetworkReply *reply);

private:
    logThread *logthread;
    MqttThread *mqttthread;
    QTimer *timer;

    QStringList datalist;
    bool isSend;
    QNetworkAccessManager *networkmanager;

};


#endif // DEVICETYPEINFLUXDBWRITER_H
