Flexiport 2.0.0
|
Classes | |
class | PortException |
Exception thrown by the Port class and its derivatives. More... | |
class | LogFile |
class | LogReaderPort |
Simulated port using a log file. More... | |
class | LogWriterPort |
Logging implementation of the Port class. More... | |
class | Port |
Base Port class. More... | |
class | SerialPort |
Serial implementation of the Port class. More... | |
class | TCPPort |
TCP implementation of the Port class. More... | |
class | Timeout |
An object used to represent timeouts. More... | |
class | UDPPort |
UDP implementation of the Port class. More... | |
Functions | |
FLEXIPORT_EXPORT Port * | CreatePort (std::map< std::string, std::string > options) |
Function to create a Port object of the necessary port type. | |
FLEXIPORT_EXPORT Port * | CreatePort (std::string options) |
Overloaded factory function. |
FLEXIPORT_EXPORT Port* flexiport::CreatePort | ( | std::map< std::string, std::string > | options | ) |
Function to create a Port object of the necessary port type.
This factory function is the only way to create a Port object matching the type of port you need. Options are passed in as key/value pairs in the options argument. A minimum of one option is necessary, the "type" option. This specifies the type of port to be created. An object of the correct class (SerialPort, TCPPort or LogReaderPort, for example) will be created based on the value of this option. All other options, including both universal options and type-specific options, will be passed on to the created object.
See Options for a list of options accepted by all port types. See each port type's description for a list of options accepted by that port type.
options | A map of port creation options as key/value pairs. |
FLEXIPORT_EXPORT Port* flexiport::CreatePort | ( | std::string | options | ) |
Overloaded factory function.
Accepts options as a string.
This overload accepts the options as a string. For example: "type=serial device=/dev/ttyS0 baud=4800 readwrite" Options may be separated by any of: spaces, tabs, new lines or commas. Do not put whitespace around an equals sign.
options | A string containing the port creation options. |