Appearance
SerialPortAPI
cpp
#include <VAmiga.h>cpp
class SerialPortAPIDefined in VAmiga.h:1873
API of the serial port.
Public Methods
| Return | Name | Description |
|---|---|---|
const SerialPortConfig & | getConfig const | Returns the component's current configuration. |
const SerialPortInfo & | getInfo const | Returns the component's current state. |
const SerialPortInfo & | getCachedInfo const | Returns the most recent state snapshot recorded by the emulator thread (see getInfo()). |
int | readIncomingPrintableByte const | Reads a printable character from the serial port buffers. |
int | readOutgoingPrintableByte const | Reads a character from the data the port has sent (see readIncomingPrintableByte()). |
getConfig
const
cpp
const SerialPortConfig & getConfig() constDefined in VAmiga.h:1883
Returns the component's current configuration.
getInfo
const
cpp
const SerialPortInfo & getInfo() constDefined in VAmiga.h:1894
Returns the component's current state.
getInfo() reads the live state on the calling thread. The result is only consistent if the emulator is paused or suspended. getCachedInfo() returns the snapshot the emulator thread has recorded most recently, which is the one to use while the emulator runs. Both return references that can be overwritten by a later call or by the emulator thread, so copy the data if you need to keep it.
getCachedInfo
const
cpp
const SerialPortInfo & getCachedInfo() constDefined in VAmiga.h:1896
Returns the most recent state snapshot recorded by the emulator thread (see getInfo()).
readIncomingPrintableByte
const
cpp
int readIncomingPrintableByte() constDefined in VAmiga.h:1907
Reads a printable character from the serial port buffers.
readIncomingPrintableByte() reads from the data the port has received, readOutgoingPrintableByte() from the data it has sent. The byte is removed from the buffer. Characters that are neither printable nor a line feed are skipped.
Returns
The character, or -1 if the buffer is empty.
readOutgoingPrintableByte
const
cpp
int readOutgoingPrintableByte() constDefined in VAmiga.h:1909
Reads a character from the data the port has sent (see readIncomingPrintableByte()).