1
0
This repository has been archived on 2023-11-30. You can view files and clone it, but cannot push or open issues or pull requests.
dtux__zigbeemanager/serial.inc.h

45 lines
955 B
C++

#ifndef SERIAL_INC_H
#define SERIAL_INC_H
//#include <QDebug>
#include <sys/wait.h>
#include <QSerialPort>
#include <QSerialPortInfo>
#include <QApplication>
#include <iostream>
class SerialManager : public QSerialPort
{
Q_OBJECT
public:
//QSerialPort * sp;
QByteArray dataRead;
QByteArray dataWrite;
qint64 dataWriteSize;
QString serialDevicePath;
QString deviceName;
QString portName;
QString serialDeviceDescription;
QString serialDeviceManufacturer;
QString serialDeviceNumber;
QString serialDeviceVendor;
QString serialDeviceProduct;
quint32 baudRate = 115200;
void write(QByteArray datas);
SerialManager();
~SerialManager();
void initSerial();
bool findSerialDevice();
//void getData();
signals:
void datasReady(QByteArray);
public slots:
};
#endif // SERIAL_INC_H