Public Types | Public Member Functions

cedrus::port_settings_t Class Reference

Handles serial port settings used by the XID devices. More...

#include <xid_device_driver/port_settings_t.h>

List of all members.

Public Types

enum  bitparity { BITPARITY_NONE = 0, BITPARITY_ODD = 1, BITPARITY_EVEN = 2 }
enum  stopbits { STOP_BIT_1 = 0, STOP_BIT_2 = 1 }
enum  bytesize { BYTESIZE_6 = 6, BYTESIZE_7 = 7, BYTESIZE_8 = 8, FIRST_BYTESIZE = BYTESIZE_6 }
enum  handshaking { HANDSHAKE_NONE = 0, HANDSHAKE_XON_XOFF = 1, HANDSHAKE_HARDWARE = 2 }

Public Member Functions

 port_settings_t ()
 port_settings_t (const std::wstring &port_name, int port_speed, bytesize byte_size=BYTESIZE_8, bitparity bit_parity=BITPARITY_NONE, stopbits stop_bits=STOP_BIT_1)
virtual ~port_settings_t (void)
const std::wstring & port_name () const
int baud_rate () const
void baud_rate (int speed)
bitparity bit_parity () const
void bit_parity (bitparity parity)
bytesize byte_size () const
void byte_size (bytesize size)
handshaking handshake () const
void handshake (handshaking shake)
stopbits stop_bits () const
void stop_bits (stopbits bits)

Detailed Description

Handles serial port settings used by the XID devices.

This is an internal class used by xid_con_t and shouldn't be needed by users of the library.

Definition at line 46 of file port_settings_t.h.


Member Enumeration Documentation

Enumerator:
BITPARITY_NONE 
BITPARITY_ODD 
BITPARITY_EVEN 

Definition at line 49 of file port_settings_t.h.

Enumerator:
BYTESIZE_6 
BYTESIZE_7 
BYTESIZE_8 
FIRST_BYTESIZE 

Definition at line 62 of file port_settings_t.h.

Enumerator:
HANDSHAKE_NONE 
HANDSHAKE_XON_XOFF 
HANDSHAKE_HARDWARE 

Definition at line 71 of file port_settings_t.h.

Enumerator:
STOP_BIT_1 
STOP_BIT_2 

Definition at line 56 of file port_settings_t.h.


Constructor & Destructor Documentation

cedrus::port_settings_t::port_settings_t (  ) [inline]

Definition at line 77 of file port_settings_t.h.

cedrus::port_settings_t::port_settings_t ( const std::wstring &  port_name,
int  port_speed,
bytesize  byte_size = BYTESIZE_8,
bitparity  bit_parity = BITPARITY_NONE,
stopbits  stop_bits = STOP_BIT_1 
)

Definition at line 35 of file port_settings_t.cpp.

cedrus::port_settings_t::~port_settings_t ( void   ) [virtual]

Definition at line 51 of file port_settings_t.cpp.


Member Function Documentation

int cedrus::port_settings_t::baud_rate (  ) const

Definition at line 60 of file port_settings_t.cpp.

void cedrus::port_settings_t::baud_rate ( int  speed )

Definition at line 65 of file port_settings_t.cpp.

cedrus::port_settings_t::bitparity cedrus::port_settings_t::bit_parity (  ) const

Definition at line 70 of file port_settings_t.cpp.

void cedrus::port_settings_t::bit_parity ( bitparity  parity )

Definition at line 75 of file port_settings_t.cpp.

cedrus::port_settings_t::bytesize cedrus::port_settings_t::byte_size (  ) const

Definition at line 80 of file port_settings_t.cpp.

void cedrus::port_settings_t::byte_size ( bytesize  size )

Definition at line 85 of file port_settings_t.cpp.

void cedrus::port_settings_t::handshake ( handshaking  shake )

Definition at line 95 of file port_settings_t.cpp.

cedrus::port_settings_t::handshaking cedrus::port_settings_t::handshake (  ) const

Definition at line 90 of file port_settings_t.cpp.

const std::wstring & cedrus::port_settings_t::port_name (  ) const

Definition at line 55 of file port_settings_t.cpp.

void cedrus::port_settings_t::stop_bits ( stopbits  bits )

Definition at line 105 of file port_settings_t.cpp.

cedrus::port_settings_t::stopbits cedrus::port_settings_t::stop_bits (  ) const

Definition at line 100 of file port_settings_t.cpp.


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