Masterctrl/Sources/Ispindel/IspindelDevice.h

40 lines
849 B
C++

#ifndef ISPINDELDEVICE_H
#define ISPINDELDEVICE_H
#include <QObject>
#include <QTcpServer>
#include <QTcpSocket>
#include "IspindelData.h"
#include "IspindelDataLogger.h"
#include <QList>
class CIspindelDevice: public QObject
{
Q_OBJECT
public:
CIspindelDevice();
~CIspindelDevice();
QTcpServer *mISpindelServer;
QTcpSocket *mIspindelClientConnection;
QList<CIspindelData*> mIspindelLog;
CIspindelDataLogger mDataLogger;
CIspindelData *GetLastestIspindelData();
QList<CIspindelData*> *GetAllData(){return &mIspindelLog;}
QByteArray GetAllDataBuffer();
QByteArray GetLastestIspindelDataBuffer();
public slots:
void IspindelClientConnected();
void IspindelClientDataAvail();
void IspindelClientDisconnected();
signals:
void NewIspindelDataReceived();
};
#endif // ISPINDELDEVICE_H