Developer Documentation
Centre for Vision, Speech & Signal Processing
USER IN NAMESPACE AMMA TREE ROOT AMMA SEARCH AMMA HOME
 

  PUBLIC
SerialCtrlC::SerialCtrlC(void)
SerialCtrlC::SerialCtrlC(const char *,const char *)
SerialCtrlC::Setup(IntT,IntT,IntT,ParityT,IntT)
SerialCtrlC::SetISpeed(const IntT)
SerialCtrlC::SetOSpeed(const IntT)
SerialCtrlC::SetStopBits(const IntT)
SerialCtrlC::SetCharSize(const IntT)
SerialCtrlC::SetParity(ParityT)
SerialCtrlC::Getfd(void)
SerialCtrlC::SerialInit(IntT,IntT,IntT,IntT,ParityT,IntT)
SerialCtrlC::SpeedSetting(int)
SerialCtrlC::SetISpeed(termios &,IntT)
SerialCtrlC::SetOSpeed(termios &,IntT)
SerialCtrlC::SetCharSize(termios &,IntT)
SerialCtrlC::SetStopBits(termios &,IntT)
SerialCtrlC::SetParity(termios &,ParityT)
SerialCtrlC
 
Class to control unix serial ports.
 
include "amma/SerialIO.hh"
User Level:Default
Library:Msys
Example:exChild.cc
Section:Basic_Types.IO.IOSerial
In Scope:std

Derived Classes:

Enumerated types:
enum ParityT { PARITY_ODD, PARITY_EVEN, PARITY_SET, PARITY_NONE } ;

Variables:
IntT fid;

Methods:
SerialCtrlC()
defualt constructor;

SerialCtrlC(const char * dev,const char * perm)
open a device for initialize;

BooleanT Setup(IntT i_speed = 9600,IntT o_speed = 9600,IntT stop_bit = 1,ParityT par = PARITY_NONE,IntT char_size = 8)
Setup the port.
with the given parameters: Input speed, Output speed, stop bit(1,2), parity(exist or not exist), parity type(odd or even) and charactoe size(5,6,7,8)

BooleanT SetISpeed(const IntT i_speed)
set the input speed of the port;

BooleanT SetOSpeed(const IntT o_speed)
set the output speed of the port;

BooleanT SetStopBits(const IntT stop_bit)
set the number of stop bits : 1 or 2;

BooleanT SetCharSize(const IntT char_size)
set the charactor size: 5,6,7,8;

BooleanT SetParity(ParityT par)
parity type: Odd or Even or None or 1

IntT Getfd()
Get the file discriptor of the port;

BooleanT SerialInit(IntT fd,IntT i_speed = 9600,IntT o_speed = 9600,IntT stop_bit = 1,ParityT par = PARITY_NONE,IntT char_size = 8)
Initialize the port.
with the given parameters: Input speed, Output speed, stop bit(1,2), parity(exist or not exist), parity type(odd or even) and charactoe size(5,6,7,8)

int SpeedSetting(int bitrate)
Get setting to use for a bit rate.
returns -1 for illegal values.

BooleanT SetISpeed(termios & pb,IntT bitrate)
Set input bit rate.

BooleanT SetOSpeed(termios & pb,IntT bitrate)
Set ouput bit rate.

BooleanT SetCharSize(termios & pb,IntT bits)
Set bit rate.

BooleanT SetStopBits(termios & pb,IntT bits)
Set bit rate.

BooleanT SetParity(termios & pb,ParityT par)
parity type: Odd or Even or None or 1


Programmer:Fangxiang Cheng, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001