COVISE Core
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

◆ SerialCom() [1/3]

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

Constructor

◆ ~SerialCom()

covise::SerialCom::~SerialCom ( )
virtual

Destructor : virtual in case we derive objects.

◆ SerialCom() [2/3]

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

Copy-Constructor: NOT IMPLEMENTED, checked by assert.

◆ SerialCom() [3/3]

covise::SerialCom::SerialCom ( )
private

Default constructor: NOT IMPLEMENTED, checked by assert.

Member Function Documentation

◆ errorMessage()

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

◆ isBad()

bool covise::SerialCom::isBad ( ) const

write a maximum of bufLen bytes into buffer,

◆ operator=()

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

Assignment operator: NOT IMPLEMENTED, checked by assert.

◆ read() [1/2]

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

read a maximum of bufLen bytes into buffer,

◆ read() [2/2]

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

read a maximum of bufLen bytes into buffer,

◆ write()

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

write a maximum of bufLen bytes into buffer,

Member Data Documentation

◆ d_channel

int covise::SerialCom::d_channel
protected

◆ d_error

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

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