Trade equipment common library.  1.0.0
Public Member Functions | List of all members
QextSerialPort Class Reference

QT system independed serial port class. More...

Inheritance diagram for QextSerialPort:
TSerialPort

Public Member Functions

 QextSerialPort ()
 
 QextSerialPort (const char *name)
 
 QextSerialPort (PortSettings const &s)
 
 QextSerialPort (const char *name, PortSettings const &s)
 
 QextSerialPort (const QextSerialPort &s)
 
QextSerialPortoperator= (const QextSerialPort &)
 
virtual ~QextSerialPort ()
 

Detailed Description

QT system independed serial port class.

Version
0.70 (pre-alpha)
Author
Wayne Roth

A cross-platform serial port class. This class encapsulates a serial port on both POSIX and Windows systems. The user will be notified of errors and possible portability conflicts at run-time by default - this behavior can be turned off by defining TTY_NOWARN (to turn off all warnings) or TTY_NOWARN_PORT (to turn off portability warnings) in the project.

Note
On Windows NT/2000/XP this class uses Win32 serial port functions by default. The user may select POSIX behavior under NT, 2000, or XP ONLY by defining TTY_POSIX in the project. I can make no guarantees as to the quality of POSIX support under NT/2000 however.

Constructor & Destructor Documentation

◆ QextSerialPort() [1/5]

QextSerialPort::QextSerialPort ( )

Default constructor. Note that the naming convention used by a QextSerialPort constructed with this constructor will be determined by #defined constants, or lack thereof - the default behavior is the same as TTY_LINUX. Possible naming conventions and their associated constants are:

Constant         Used By         Naming Convention
----------       -------------   ------------------------
_TTY_WIN_        Windows         COM1, COM2
_TTY_IRIX_       SGI/IRIX        /dev/ttyf1, /dev/ttyf2
_TTY_HPUX_       HP-UX           /dev/tty1p0, /dev/tty2p0
_TTY_SUN_        SunOS/Solaris   /dev/ttya, /dev/ttyb
_TTY_DIGITAL_    Digital UNIX    /dev/tty01, /dev/tty02
_TTY_FREEBSD_    FreeBSD         /dev/ttyd0, /dev/ttyd1
_TTY_LINUX_      Linux           /dev/ttyS0, /dev/ttyS1
<none>           Linux           /dev/ttyS0, /dev/ttyS1

The object will be associated with the first port in the system, e.g. COM1 on Windows systems. See the other constructors if you need to use a port other than the first.

◆ QextSerialPort() [2/5]

QextSerialPort::QextSerialPort ( const char *  name)

Constructs a serial port attached to the port specified by name. name is the name of the device, which is windowsystem-specific, e.g."COM2" or "/dev/ttyS0".

◆ QextSerialPort() [3/5]

QextSerialPort::QextSerialPort ( PortSettings const &  settings)

Constructs a port with default name and settings specified by the settings parameter.

◆ QextSerialPort() [4/5]

QextSerialPort::QextSerialPort ( const char *  name,
PortSettings const &  settings 
)

Constructs a port with the name and settings specified.

◆ QextSerialPort() [5/5]

QextSerialPort::QextSerialPort ( const QextSerialPort s)

Copy constructor.

◆ ~QextSerialPort()

QextSerialPort::~QextSerialPort ( )
virtual

Standard destructor.

Member Function Documentation

◆ operator=()

QextSerialPort & QextSerialPort::operator= ( const QextSerialPort s)

Overrides the = operator.


The documentation for this class was generated from the following files: