37 lines
605 B
C++
37 lines
605 B
C++
#ifndef VHFMILLTHREAD_H
|
|
#define VHFMILLTHREAD_H
|
|
|
|
#include <QThread>
|
|
#include <QSerialPort>
|
|
#include <QTcpSocket>
|
|
|
|
#include "vhfmill.h"
|
|
|
|
class VhfMillThread : public QThread
|
|
{
|
|
Q_OBJECT
|
|
private:
|
|
const bool tcp;
|
|
const int port;
|
|
const QString serialPort;
|
|
const QString host;
|
|
|
|
public:
|
|
VhfMill* mill = nullptr;
|
|
QIODevice* masterIODevice = nullptr;
|
|
int ret = -1;
|
|
|
|
public:
|
|
VhfMillThread(bool tcpI, int portI, const QString& hostI, const QString& serialPortI, QObject *parent = nullptr);
|
|
~VhfMillThread();
|
|
|
|
signals:
|
|
void ready();
|
|
|
|
protected:
|
|
virtual void run() override;
|
|
};
|
|
|
|
|
|
#endif // VHFMILLTHREAD_H
|