Nakuja Flight Computer Testing and Simulation Engine (NaFCTSE) 1.0
A testing and verification tool for the Nakuja Rocket Project flight computers
Loading...
Searching...
No Matches
serialport.h
1#ifndef SERIALPORT_H
2#define SERIALPORT_H
3
4#include <QObject>
5#include <QSerialPort>
6#include <QTimer>
7
8class SerialPort : public QObject
9{
10 Q_OBJECT
11public:
12 explicit SerialPort(QObject *parent = nullptr);
13 bool connectToSerial(QString portName, QString baudRate);
14 void closeSerial();
15 quint64 writeToSerial(QByteArray &data);
16 ~SerialPort(); // destructor
17
18private:
19 QSerialPort* _serialPort;
20
21signals:
22 // void dataReceived(QByteArray(b));
23 void dataReceived(QString s);
24
25private slots:
26 void dataReady();
27
28};
29
30#endif // SERIALPORT_H
~SerialPort()
SerialPort::~serialPort.
Definition serialport.cpp:15
quint64 writeToSerial(QByteArray &data)
SerialPort::writeToSerial write data to serial.
Definition serialport.cpp:66
bool connectToSerial(QString portName, QString baudRate)
SerialPort::scanSerial scan the available serial ports.
Definition serialport.cpp:27
void closeSerial()
SerialPort::closeSerial Close serial connection.
Definition serialport.cpp:55