COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
covise::SerialCom Class Reference

#include <SerialCom.h>

Public Member Functions

 SerialCom (const char *device, int baudrate, int DataBits=8, int Parity= 'N', int StopBits=1)
 
virtual ~SerialCom ()
 Destructor : virtual in case we derive objects. More...
 
int read (void *data, int bufLen, int max_time=5)
 read a maximum of bufLen bytes into buffer, More...
 
int read (void *data, int bufLen, struct timeval &timeout)
 read a maximum of bufLen bytes into buffer, More...
 
int write (void *data, int bufLen)
 write a maximum of bufLen bytes into buffer, More...
 
bool isBad () const
 write a maximum of bufLen bytes into buffer, More...
 
const char * errorMessage () const
 

Protected Attributes

char d_error [1024]
 
int d_channel
 

Private Member Functions

 SerialCom (const SerialCom &)
 Copy-Constructor: NOT IMPLEMENTED, checked by assert. More...
 
SerialComoperator= (const SerialCom &)
 Assignment operator: NOT IMPLEMENTED, checked by assert. More...
 
 SerialCom ()
 Default constructor: NOT IMPLEMENTED, checked by assert. More...
 

Constructor & Destructor Documentation

covise::SerialCom::SerialCom ( const char *  device,
int  baudrate,
int  DataBits = 8,
int  Parity = 'N',
int  StopBits = 1 
)

Constructor

covise::SerialCom::~SerialCom ( )
virtual

Destructor : virtual in case we derive objects.

covise::SerialCom::SerialCom ( const SerialCom )
private

Copy-Constructor: NOT IMPLEMENTED, checked by assert.

covise::SerialCom::SerialCom ( )
private

Default constructor: NOT IMPLEMENTED, checked by assert.

Member Function Documentation

const char * covise::SerialCom::errorMessage ( ) const
bool covise::SerialCom::isBad ( ) const

write a maximum of bufLen bytes into buffer,

SerialCom& covise::SerialCom::operator= ( const SerialCom )
private

Assignment operator: NOT IMPLEMENTED, checked by assert.

int covise::SerialCom::read ( void data,
int  bufLen,
int  max_time = 5 
)

read a maximum of bufLen bytes into buffer,

int covise::SerialCom::read ( void data,
int  bufLen,
struct timeval &  timeout 
)

read a maximum of bufLen bytes into buffer,

int covise::SerialCom::write ( void data,
int  bufLen 
)

write a maximum of bufLen bytes into buffer,

Member Data Documentation

int covise::SerialCom::d_channel
protected
char covise::SerialCom::d_error[1024]
protected

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