#ifndef CHALETDATALOGGER_H
#define CHALETDATALOGGER_H

#include <QObject>
#include <QFile>
#include "ChaletData.h"
#include <QTimer>


//#define CHALET_LORA_DATA_LOG_FILENAME "./ChaletLogs/ChaletLora.csv"
#define CHALET_LORA_DATA_LOG_DIR "D:/Main/Chalet/LoraLogs/"

class CChaletMainStatus;

class CChaletDataLogger : public QObject
{
    Q_OBJECT
public:
    explicit CChaletDataLogger(QObject *parent = 0);
    ~CChaletDataLogger();

    bool LogChaletLORAData(CChaletMainStatus *Data);
    QByteArray *GetTodaysData();
    QByteArray *GetChaletData(QDate StartDate);

    QFile *mChaletLogFile;
    QTimer *mChaletNewLogFileTimer;
    QDate mTodaysDate;





private:
    int OpenTodaysFile();

signals:


public slots:
    void NewLogFileTimerExpired();
};

#endif // CHALETDATALOGGER_H
