You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
82 lines
1.4 KiB
82 lines
1.4 KiB
#ifndef USBCONTROL_H |
|
#define USBCONTROL_H |
|
#include "qt_windows.h" |
|
|
|
#include <QObject> |
|
#include <QThread> |
|
|
|
#include <QByteArray> |
|
|
|
#include <QTimer> |
|
#include <chrono> |
|
|
|
|
|
#include <CyAPI.h> |
|
#include <QObject> |
|
#include <QtSerialPort/QSerialPort> |
|
#include <QtSerialPort/QSerialPortInfo> |
|
|
|
class usbcontrol:public QObject |
|
{ |
|
Q_OBJECT |
|
public: |
|
explicit usbcontrol(QObject *parent = nullptr); |
|
|
|
int sendMessage(char* msg, int msglen); |
|
|
|
void initEndPoint(); |
|
|
|
public slots: |
|
void bit14(bool b); |
|
void tec(bool b); |
|
void onepoint(); |
|
void savelow(); |
|
void savehigh(); |
|
|
|
void calck(); |
|
void savek(); |
|
void openk(bool b); |
|
void saveb(); |
|
void openb(bool b); |
|
void openbila(bool b); |
|
void setDDE(int v); |
|
void setGPOL(int value); |
|
void setIT(double value); |
|
double getIT(); |
|
void setkf(int v); |
|
void sethist(int gray); |
|
void setsag(bool b); |
|
|
|
|
|
void mpset(int index, unsigned short avg); |
|
void mpflash(int index); |
|
void mpstatus(bool b); |
|
void mppop(int index); |
|
void mpset1(int index, unsigned short avg); |
|
|
|
void setge(bool b); |
|
|
|
void slotsetspname(QString); |
|
|
|
|
|
void setid(QString); |
|
signals: |
|
void signalSendMessage(QString); |
|
|
|
|
|
|
|
|
|
|
|
|
|
private: |
|
CCyUSBDevice *device; |
|
CCyBulkEndPoint* bulkinPoint ; |
|
unsigned char* buffer; |
|
unsigned char* contexts; |
|
OVERLAPPED inOvLap; |
|
|
|
QSerialPort sp; |
|
|
|
}; |
|
|
|
#endif // USBCONTROL_H
|
|
|