219 virtual bool open(OpenMode aMode);
220 virtual void close();
233 virtual qint64
readData(
char* aData, qint64 aMaxSize);
234 virtual qint64
writeData(
const char *aData, qint64 aMaxSize);
Public include file for BPS CORE library macros.
#define BPSCORE_EXPORT
Declare class to be an import from the shared library.
Definition: bpscore_global.h:22
#define BPS_PRIVATE(Class)
Declare pointer to private object in a public class.
Definition: bpsglobals.h:102
BPS asynchronous IO communications class, based on QIODevice.
Definition: bpsasyncio.h:17
void setDataBits(DataBits aDataBits)
Set the number of data bits per word.
FlowControl
Flow control.
Definition: bpsasyncio.h:73
@ NoFlowControl
No flow control at all. DTR and RTS always on.
Definition: bpsasyncio.h:74
@ Soft
Software flow control by XON/XOFF. DTR and RTS always on.
Definition: bpsasyncio.h:76
@ Hard
Hardware flow control by DTR and RTS.
Definition: bpsasyncio.h:75
void unsetError()
Clears the error message returned by error().
BpsAsyncIO(QObject *aParent=nullptr)
FlowControl flowControl() const
quint32 writeTimeout() const
void error(const QString &aError)
Signal emitted whenever an error is registered.
DataBits
Number of data bits per word.
Definition: bpsasyncio.h:43
@ D7
7 bits per word.
Definition: bpsasyncio.h:46
@ D6
6 bits per word.
Definition: bpsasyncio.h:45
@ D5
5 bits per word.
Definition: bpsasyncio.h:44
void setFlowControl(FlowControl aFlowControl)
Set the flow control mode to use.
DataBits dataBits() const
void setBitRate(BitRate aBitRate)
Set the bit rate.
void setStopBits(StopBits aStopBits)
Set the number of stop bits to use.
StopBits
Number of stop bits per word.
Definition: bpsasyncio.h:64
@ S1_5
One and a half stop bits per word.
Definition: bpsasyncio.h:66
@ S1
One stop bit per word.
Definition: bpsasyncio.h:65
void setParity(Parity aParity)
Set the parity to use.
Parity
Parity settings.
Definition: bpsasyncio.h:53
@ Even
Even parity.
Definition: bpsasyncio.h:56
@ Odd
Odd parity.
Definition: bpsasyncio.h:55
@ NoParity
No parity at all.
Definition: bpsasyncio.h:54
@ Mark
Always mark.
Definition: bpsasyncio.h:57
void setup(const QMap< QString, QString > &aConfig)
Initialize by values given in the config map.
StopBits stopBits() const
void setPortName(const QString &aPortName)
Set the port name.
void setWriteTimeout(quint32 aMillisecs)
Set the write timeout in milliseconds.
QString error() const
The last error message saved.
static QStringList portNames()
Get a list of all asynchronous IO devices available on the current computer.
BitRate
Bits per second.
Definition: bpsasyncio.h:26
@ B4800
4800 bits/sec.
Definition: bpsasyncio.h:32
@ B110
110 bits/sec.
Definition: bpsasyncio.h:27
@ B2400
2400 bits/sec.
Definition: bpsasyncio.h:31
@ B19200
19200 bits/sec.
Definition: bpsasyncio.h:34
@ B300
300 bits/sec.
Definition: bpsasyncio.h:28
@ B1200
1200 bits/sec.
Definition: bpsasyncio.h:30
@ B9600
9600 bits/sec.
Definition: bpsasyncio.h:33
@ B38400
38400 bits/sec.
Definition: bpsasyncio.h:35
@ B600
600 bits/sec.
Definition: bpsasyncio.h:29
@ B57600
57600 bits/sec.
Definition: bpsasyncio.h:36
virtual bool isSequential() const const
virtual bool open(QIODevice::OpenMode mode)
virtual qint64 readData(char *data, qint64 maxSize)=0
virtual qint64 writeData(const char *data, qint64 maxSize)=0