User Documentation
RAVL, Recognition And Vision Library
DEVELOP HOME PAGE CLASS LIST CONTENTS
Ravl - OS - Hardware - ISerialC
 

  PUBLIC
ISerialC::ISerialC(void)
ISerialC::ISerialC(const char *,bool)
IStreamC::Unget(StringC)
IStreamC::Unget(const char *,int)
IStreamC::CopyTo(OStreamC &,IntT)
IStreamC::is(void)
IStreamC::is(void) const
IStreamC::operator istream &(void)
IStreamC::operator const istream &(void) const
IStreamC::read(char *,streamsize)
IStreamC::get(char &)
IStreamC::get(void)
IStreamC::get(char *,int)
IStreamC::getline(char *,int)
IStreamC::gcount(void)
IStreamC::operator >>(DataT &)
IStreamC::operator >>(char *)
IStreamC::Tell(void) const
IStreamC::Seek(streampos)
IStreamC::tellg(void) const
IStreamC::seekg(streampos)
IStreamC::seekg(streampos,SeekDirT)
IStreamC::IsEndOfStream(void)
IStreamC::GetChar(void)
IStreamC::SkipWhiteSpace(void)
IStreamC::Skip(const char *)
IStreamC::SkipTo(const StringC &)
IStreamC::SkipTo(char)
IStreamC::ClipTo(char)
IStreamC::ClipTo(const StringC &)
IStreamC::ClipWord(const char *,bool)
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)
StreamBaseC::Name(void) const
StreamBaseC::IsOpen(void) const
StreamBaseC::good(void) const
StreamBaseC::bad(void) const
StreamBaseC::eof(void) const
StreamBaseC::fail(void) const
StreamBaseC::operator !(void) const
StreamBaseC::operator void *(void) const
StreamBaseC::DiagnoseStream(ostream &)
StreamBaseC::Close(void)
HandleRefCounterC::SetDestructionOp(const TriggerC &)
HandleRefCounterC::References(void) const
RCHandleC::operator =(const RCHandleC &)
RCHandleC::DeepCopy(UIntT) const
RCHandleC::operator ==(const RCHandleC &) const
RCHandleC::operator !=(const RCHandleC &) const
RCHandleC::Hash(void) const
RCHandleC::IsValid(void) const
RCHandleC::Invalidate(void)
RCHandleC::IsHandleType(const DT &) const
RCHandleC::CheckHandleType(const DT &) const
RCHandleC::References(void) const
RCHandleC::operator <<(ostream &,const RCHandleC &)
RCHandleC::operator >>(istream &,RCHandleC &)

   ISerialC   
 
Input serial stream.
 
include "Ravl/OS/SerialIO.hh"
Created:31/12/1999 
User Level:Normal
Library:RavlOS
In Scope:RavlN

Parent Classes: Methods:
ISerialC()
Default constructor.
Creates an invalid handle.

ISerialC(const char * dev,bool buffered = false)
Open an input serial stream.

#include "Ravl/Stream.hh"
void Unget(StringC text)
Put string pack. (Puts a '\n')

void Unget(const char * dat,int len)
Put string pack.

IntT CopyTo(OStreamC & out,IntT maxChars = - 1)
Copy stream to output.

istream & is()
Access input stream.

const istream & is() const
Access input stream.

operator istream &()
Converter.

operator const istream &() const
Converter.

istream & read(char * d,streamsize n)
read data.
istream compatable function.

istream & get(char & ch)
Get character.
istream compatable function.

char get()
Get character.
istream compatable function.

istream & get(char * buff,int buffsize)
Read in a line.
istream compatable function.

istream & getline(char * buff,int buffsize)
Read in a line.
istream compatable function.

streamsize gcount()
Get number of character read in last operation.
istream compatable function.

istream & operator >>(DataT & dat)

istream & operator >>(char * dat)

streampos Tell() const
Where are we in the stream.

void Seek(streampos to)
Goto a position in the stream.

streampos tellg() const
Where are we in the stream.
istream compatable function.

istream & seekg(streampos to)
Goto a position in the stream.
istream compatable function.

istream & seekg(streampos to,SeekDirT dir)
Goto a position in the stream.
istream compatable.

bool IsEndOfStream()
Test if its the end of the stream is comming up...
Maybe there's a better way ?

Parsing Functions.

Some methods to help parse text streams.
char GetChar()
Get next character.
This will throw an ExceptionEndOfStreamC if the end of the input stream is found.

char SkipWhiteSpace()
Skip white space characters.
returns the first non-white space character found.

This will throw an ExceptionEndOfStreamC if the end of the input stream is found.


bool Skip(const char * delim = " \n\t\r")
Skip all 'delim' characters.
Leaves stream at first character this is not one of those listed in 'delim'. If end of stream is found before returns false.

bool SkipTo(const StringC & endStr)
Skip through stream until endStr is found.
this leaves the stream positioned at the first character after the string.

returns false if the end of the stream is found first.


bool SkipTo(char let)
Skip through stream until 'let' is found.
returns false if the end of the stream is found first.

StringC ClipTo(char let)
Return all characters before let.
the 'let' character is discarded.

If the end of stream is found, all data found upto that point is returned.


StringC ClipTo(const StringC & endStr)
Return all characters before 'endStr'.
this leaves the stream positioned at the first character after the string.

If the end of stream is found, all data found upto that point is returned.


StringC ClipWord(const char * delim = " \n\t\r",bool initalSkipDelim = false)
Clip word until one of 'delim' characters are found.

#include "Ravl/OS/SerialIO.hh"
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;

#include "Ravl/Stream.hh"
const StringC & Name() const
Returns the name of the stream.

bool IsOpen() const
Test if this stream is open.

bool good() const
Is stream good ?

bool bad() const
Is stream corrupted ?

bool eof() const
End of file ?

bool fail() const
Operation failed ?

bool operator !() const
Not failed ?

operator void *() const
Ok ?

bool DiagnoseStream(ostream & out)
Print diagnostic message about the streams state to out.

bool Close()
Close this stream.
After this is called no further IO should be attempted!

#include "Ravl/HandleRefCounter.hh"
void SetDestructionOp(const TriggerC & ntrig)
Set trigger to call on delete.

UIntT References() const
Returns the number of references to this object.

#include "Ravl/RefCounter.hh"
const RCHandleC<HandleRefCounterBodyC> & operator =(const RCHandleC<HandleRefCounterBodyC> & oth)
Assign handle.

RCHandleC<HandleRefCounterBodyC> DeepCopy(UIntT levels = ((UIntT))) const
Do a deep copy of the object.

bool operator ==(const RCHandleC<HandleRefCounterBodyC> & oth) const
Are handles to the same object ?

bool operator !=(const RCHandleC<HandleRefCounterBodyC> & oth) const
Are handles to different objects ?

UIntT Hash() const
Default hash function.
This hashes on the address of the body.

bool IsValid() const
Test if this is a valid handle.

void Invalidate()
Invalidate this handle.
Unattaches the body from the handle.

bool IsHandleType(const DT &) const
Is handle of given type ?

void CheckHandleType(const DT & dummy) const
Check handle type. Throw an expception if not.

UIntT References() const
Find the number of references to the body of this object.

ostream & operator <<(ostream & strm,const RCHandleC<HandleRefCounterBodyC> & obj)

istream & operator >>(istream & strm,RCHandleC<HandleRefCounterBodyC> & obj)


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