INTRODUCTION Overview Download and Install Documentation Publications REPOSITORY Libraries DEVELOPER Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
flexiport Namespace ReferenceFlexiPort data communications library.
More...
|
Classes | |
class | PortException |
Exception thrown by the Port class and its derivatives. More... | |
class | LogReaderPort |
Simulated port using a log file. More... | |
class | LogWriterPort |
Logging implementation of the Port class. An underlying Port object is used to perform the actual communications. All actions taken by that port are logged, including data transferred. The log file can be used with a LogReaderPort to simulate a Port object and perform testing. 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. This class provides UDP communication between two known end points. It cannot send to any address other than the configured address. More... | |
Functions | |
FLEXIPORT_EXPORT Port * | CreatePort (std::map< std::string, std::string > options) |
Factory function to create a Port object of the necessary port type. | |
FLEXIPORT_EXPORT Port * | CreatePort (std::string options) |
Overloaded factory function. Accepts options as a string. |
This namespace is part of the FlexiPort library.
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.
FLEXIPORT_EXPORT Port* flexiport::CreatePort | ( | std::map< std::string, std::string > | options | ) |
Factory 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.