Developer Documentation
RAVL, Recognition And Vision Library
USER HOME PAGE CLASS LIST CONTENTS
Ravl - OS - Hardware - SerialCtrlC
 

  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 "Ravl/OS/SerialIO.hh"
Created:31/12/1999 
Source file:Ravl/OS/Misc/SerialIO.hh
User Level:Normal
Library:RavlOS
In Scope:RavlN

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;

bool 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)

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

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

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

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

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

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

bool 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)

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

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

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

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

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

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


Maintainer:Fangxiang Cheng, Created: 31/12/1999, Documentation by CxxDoc: Tue Aug 13 09:59:30 2002