User Documentation
RAVL, Recognition And Vision Library
Ravl - OS - Hardware - OSerialC

OSerialC::OSerialC(const char *,bool)
OStreamC::form(const char *,...)
OStreamC::os(void) const
OStreamC::operator ostream &(void)
OStreamC::operator const ostream &(void) const
OStreamC::write(const char *,StreamSizeT)
OStreamC::operator <<(const char *)
OStreamC::operator <<(const DataT &)
OStreamC::Tell(void) const
OStreamC::tellp(void) const
SerialCtrlC::SetISpeed(const IntT)
SerialCtrlC::SetOSpeed(const IntT)
SerialCtrlC::SetStopBits(const IntT)
SerialCtrlC::SetCharSize(const IntT)
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 &)
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::IsHandleType(const DT &) const
RCHandleC::CheckHandleType(const DT &) const
RCHandleC::References(void) const
RCHandleC::operator <<(ostream &,const RCHandleC &)
RCHandleC::operator >>(istream &,RCHandleC &)

Output serial stream.
include "Ravl/OS/SerialIO.hh"
User Level:Normal
In Scope:RavlN

Parent Classes: Methods:
Default constructor.
Creates an invalid handle.

OSerialC(const char * dev,bool buffered = false)
Open a output serial stream.

#include "Ravl/Stream.hh"
ostream & form(const char * format,...)
Print to stream using good old 'C' sytle formating.
This isn't the saftest function, it uses a fixed buffer of 4096 bytes.

This is a duplication of the function GNU iostreams for those platforms that don't have this function.

ostream & os()
Access ostream.

const ostream & os() const
Access ostream.

operator ostream &()

operator const ostream &() const

ostream & write(const char * d,StreamSizeT n)
Write data.
ostream compatable.

ostream & put(char ch)
Put character.
ostream compatable.

ostream & operator <<(const char * txt)
Output text.

ostream & operator <<(const DataT & dat)

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

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

streampos tellp() const
Where are we in the stream.
ostream compatable.

ostream & seekp(streampos to)
Goto a position in the stream.
ostream compatable.

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

#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