6 #ifndef REALTIMESERIALCONNECTION_H_
7 #define REALTIMESERIALCONNECTION_H_
9 #include "ocurvesconfig.h"
11 #include "realtimeconnection.h"
13 #include <QHostAddress>
31 virtual QString
name()
const override;
38 bool open(
const QString &name, quint32 baudRate,
bool readOnly);
49 int send(
const QByteArray &buffer)
override;
53 int read(QByteArray &buffer)
override;
59 #endif // REALTIMESERIALCONNECTION_H_
RealTimeSerialConnection()
Create an unconnected serial connection.
bool isConnected() const override
Is the port open and connected?
bool open(const QString &name, quint32 baudRate, bool readOnly)
Open a serial connection, first disconnecting any existing connection.
void disconnect() override
Disconnect if connected.
int read(QByteArray &buffer) override
Read data into the given buffer.
A RealTimeConnection which reads from a serial port.
Definition: realtimeserialconnection.h:20
int send(const QByteArray &buffer) override
Send the given buffer to the source.
This is the base class for data source which provides data in real time.
Definition: realtimeconnection.h:16
virtual QString name() const override
The name of the serial port being used.
~RealTimeSerialConnection()
Destructor, ensures disconnect() is called.