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
Raw Permalink Normal View History

2023-04-08 15:06:36 +02:00
#ifndef SERIAL_INC_H
#define SERIAL_INC_H
2023-04-29 15:15:19 +02:00
//#include <QDebug>
2023-04-08 15:06:36 +02:00
#include <sys/wait.h>
#include <QSerialPort>
2023-04-13 00:27:20 +02:00
#include <QSerialPortInfo>
2023-04-08 15:06:36 +02:00
#include <QApplication>
#include <iostream>
2023-04-29 15:15:19 +02:00
class SerialManager : public QSerialPort
2023-04-08 15:06:36 +02:00
{
Q_OBJECT
public:
//QSerialPort * sp;
QByteArray dataRead;
QByteArray dataWrite;
qint64 dataWriteSize;
QString serialDevicePath;
2023-04-13 00:27:20 +02:00
QString deviceName;
QString portName;
QString serialDeviceDescription;
QString serialDeviceManufacturer;
QString serialDeviceNumber;
QString serialDeviceVendor;
QString serialDeviceProduct;
quint32 baudRate = 115200;
void write(QByteArray datas);
2023-04-29 15:15:19 +02:00
SerialManager();
~SerialManager();
void initSerial();
2023-04-13 00:27:20 +02:00
bool findSerialDevice();
2023-04-29 15:15:19 +02:00
//void getData();
2023-04-08 15:06:36 +02:00
2023-04-29 15:15:19 +02:00
signals:
void datasReady(QByteArray);
public slots:
2023-04-08 15:06:36 +02:00
2023-04-29 15:15:19 +02:00
};
2023-04-08 15:06:36 +02:00
#endif // SERIAL_INC_H