#ifndef __DATAFIFO_H__
#define __DATAFIFO_H__

#include <QObject>
#include <QThread>

class DataFifo : public QObject
{
    Q_OBJECT

public:
    explicit DataFifo(QObject *parent = nullptr);

    void start();
    void stop();
    const qint64 recvTimestamp();

private:
    QThread m_thread;
    bool m_isRunning;
    qint64 m_recvTimestamp;

signals:
    void updateScreen(const QJsonObject &obj);

private slots:
    void doWork();

};


#endif  // DATAFIFO_H