#include <serial_port.h>
Inheritance diagram for SerialPort:

Definition at line 44 of file serial_port.h.
Public Types | |
| enum | Errors { ErrorUnspecified = -100, ErrorInvalidPort = -101, ErrorPortInUse = -102, ErrorInvalidSettings = -103, ErrorTransmitError = -104, ErrorReceiveError = -105 } |
Public Member Functions | |
| virtual int | Open (unsigned port)=0 |
| virtual int | Initialise (unsigned baud)=0 |
| virtual int | Out (const uint8_t *data, size_t size, unsigned timeout)=0 |
| virtual int | In (uint8_t *data, size_t maxSize, unsigned timeout)=0 |
| virtual void | Close ()=0 |
| virtual | ~SerialPort ()=0 |
Static Public Member Functions | |
| static SerialPort * | New () |
|
|
Enumeration of possible error values.
Definition at line 116 of file serial_port.h. |
|
|
Destructor which also performs a Close(). Definition at line 315 of file serial_port.cpp. |
|
|
Construct a serial port.
Definition at line 309 of file serial_port.cpp. |
|
|
Open port for communications over a specified port number.
Implemented in WindowsSerialPort, and LinuxSerialPort. |
|
|
Initialise port.
Implemented in WindowsSerialPort, and LinuxSerialPort. |
|
||||||||||||||||
|
Transmit data. This function does not wait if only some of data could be transmitted, instead it returns immediately.
Implemented in WindowsSerialPort, and LinuxSerialPort. |
|
||||||||||||||||
|
Receive data.
Implemented in WindowsSerialPort, and LinuxSerialPort. |
|
|
Close port. Port must not be used again until Open() has been called. Implemented in WindowsSerialPort, and LinuxSerialPort. |
1.4.4