#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