OpenCPN Partial API docs
|
#include <limits>
#include <vector>
#include <string>
#include <cstring>
#include <sstream>
#include <exception>
#include <stdexcept>
#include <serial/v8stdint.h>
Go to the source code of this file.
Classes | |
struct | serial::Timeout |
Structure for setting the timeout of the serial port, times are in milliseconds. More... | |
class | serial::Serial |
Class that provides a portable serial port interface. More... | |
class | serial::SerialException |
class | serial::IOException |
class | serial::PortNotOpenedException |
struct | serial::PortInfo |
Structure that describes a serial device. More... | |
Macros | |
#define | THROW(exceptionClass, message) |
Enumerations | |
enum | serial::bytesize_t { fivebits = 5 , sixbits = 6 , sevenbits = 7 , eightbits = 8 } |
Enumeration defines the possible bytesizes for the serial port. More... | |
enum | serial::parity_t { parity_none = 0 , parity_odd = 1 , parity_even = 2 , parity_mark = 3 , parity_space = 4 } |
Enumeration defines the possible parity types for the serial port. More... | |
enum | serial::stopbits_t { stopbits_one = 1 , stopbits_two = 2 , stopbits_one_point_five } |
Enumeration defines the possible stopbit types for the serial port. More... | |
enum | serial::flowcontrol_t { flowcontrol_none = 0 , flowcontrol_software , flowcontrol_hardware } |
Enumeration defines the possible flowcontrol types for the serial port. More... | |
Functions | |
std::vector< PortInfo > | serial::list_ports () |
Lists the serial ports available on the system. | |
The MIT License
Copyright (c) 2012 William Woodall
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This provides a cross platform interface for interacting with Serial Ports.
Definition in file serial.h.
#define THROW | ( | exceptionClass, | |
message | |||
) |
enum serial::bytesize_t |
enum serial::parity_t |
enum serial::stopbits_t |
std::vector< PortInfo > serial::list_ports | ( | ) |
Lists the serial ports available on the system.
Returns a vector of available serial ports, each represented by a serial::PortInfo data structure: