INTRODUCTION
Overview
Download and Install
Documentation
Publications

REPOSITORY
Libraries

DEVELOPER
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

FlexiPort data communications library. More...

Namespaces

 flexiport
 FlexiPort data communications library.
 

Classes

class  flexiport::PortException
 Exception thrown by the Port class and its derivatives. More...
 
class  flexiport::LogReaderPort
 Simulated port using a log file. More...
 
class  flexiport::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  flexiport::Port
 Base Port class. More...
 
class  flexiport::SerialPort
 Serial implementation of the Port class. More...
 
class  flexiport::TCPPort
 TCP implementation of the Port class. More...
 
class  flexiport::Timeout
 An object used to represent timeouts. More...
 
class  flexiport::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...
 

Detailed Description

FlexiPort data communications library.

Provides a consistent interface for communicating over a range of data port types. Currently serial and TCP ports are supported. Support for USB ports is planned for when I get a suitable USB device to test with. Logging is possible, which allows communications sessions to be played back at a later date without the original hardware present.

The SerialPort and TCPPort port types are cross-platform, usable on Linux, Mac OSX and Microsoft Windows. If this library is compiled as static on Windows, you must define the FLEXIPORT_STATIC preprocessor variable when compiling code that includes port.h, flexiport.h or timeout.h.

For a full list of classes and functions, see flexiport.

Header file

Necessary:

#include <flexiport/flexiport.h>
#include <flexiport/port.h>

Optional if port type-specific features are required: For SerialPort:

#include <flexiport/serialport.h>

For TCPPort:

#include <flexiport/tcpport.h>

For logging ports:

#include <flexiport/logwriterport.h>
#include <flexiport/logreaderport.h>
Example
See test/tcp_example.cpp and test/serial_example.cpp.
Style
  • Naming conventions:
    • Class methods start with a capital letter.
    • variableNamesLikeThis.
    • Private member variables start with an underscore _like _this.
    • Avoid using #defines. #define'd values in all capitals when necessary.
  • Formatting:
    • 1 tab indentation at start of lines, spaces only for inside lines (e.g. before commands).
    • Function declarations on one line.
    • Space between function name and arguments.
  • C++ API.
    • Functionality provided through classes.
Copyright
Geoffrey Biggs
Responsible Developer
Geoffrey Biggs
License
LGPL
Dependencies
  • None
 

Generated for GearBox by  doxygen 1.4.5