Implementation. More...
#include "GetSerialPortState.h"#include <osvr/Util/MacroToolsC.h>#include <osvr/Util/Finally.h>#include <stdexcept>Go to the source code of this file.
Functions | |
| SerialPortState | getSerialPortStateImpl (std::string const &port) |
| SerialPortState | getSerialPortState (std::string const &port) |
| Returns an enum value indicating the apparent state of the port. | |
| std::string | normalizeSerialPort (std::string const &port) |
| Normalizes the name of a serial port. More... | |
| void | verifySerialPort (std::string const &port, std::string const &origPort) |
| Verifies the accessibility of a serial port and throws a std::exception unless it is available. More... | |
| std::string | normalizeAndVerifySerialPort (std::string const &port) |
| Normalizes and verifies the accessibility of a serial port and throws a std::exception unless it is available. More... | |
|
inline |
Definition at line 65 of file GetSerialPortState.cpp.
| std::string normalizeSerialPort | ( | std::string const & | port | ) |
Normalizes the name of a serial port.
On Windows, this takes care of prefixing \, for instance.
| port | The serial port name as supplied |
Definition at line 79 of file GetSerialPortState.cpp.
| void verifySerialPort | ( | std::string const & | port, |
| std::string const & | origPort = std::string() |
||
| ) |
Verifies the accessibility of a serial port and throws a std::exception unless it is available.
| port | The serial port name (already normalized) |
| origPort | If specified (and non-empty), the port name pre-normalization, for use in exceptions. |
safety catch-all
Definition at line 94 of file GetSerialPortState.cpp.
| std::string normalizeAndVerifySerialPort | ( | std::string const & | port | ) |
Normalizes and verifies the accessibility of a serial port and throws a std::exception unless it is available.
On Windows, this takes care of prefixing \, for instance.
| port | The serial port name as supplied |
Definition at line 116 of file GetSerialPortState.cpp.