KatanaNativeInterface  $VERSION$
Public Member Functions | Static Protected Member Functions | Protected Attributes | Private Attributes | List of all members
CCdlCOM Class Reference

Encapsulates the serial port device. More...

#include <cdlCOM.h>

Inheritance diagram for CCdlCOM:
Inheritance graph
Collaboration diagram for CCdlCOM:
Collaboration graph

Public Member Functions

 CCdlCOM (TCdlCOMDesc ccd, const char *dev_name=0)
 Construct a CCdlCOM class. More...
 
virtual ~CCdlCOM ()
 Destructs the class. More...
 
virtual int send (const void *buf, int size)
 Sends data to the device. More...
 
virtual int recv (void *buf, int size)
 Receives data from the device. More...
 
- Public Member Functions inherited from CCdlBase
virtual ~CCdlBase ()
 destructor More...
 

Static Protected Member Functions

static char digit (const int _val)
 Converts an integer to a char. More...
 

Protected Attributes

TCdlCOMDesc _ccd
 Stores the attributes of the serial port device. More...
 
int _prtHdl
 port handle More...
 
struct termios _oto
 old timeouts More...
 

Private Attributes

std::string _deviceName
 

Detailed Description

Encapsulates the serial port device.

This class is responsible for direct communication with the serial port device. It builds the lowest layer for communication and uses the system API functions to get access the to the device.

Definition at line 73 of file cdlCOM.h.

Constructor & Destructor Documentation

◆ CCdlCOM()

CCdlCOM::CCdlCOM ( TCdlCOMDesc  ccd,
const char *  dev_name = 0 
)

Construct a CCdlCOM class.

To this constructor a 'TCdlCOMDesc' parameter has to be given, which describes the desired serial port. An attempt to open a connection to the desired device will be tried.

◆ ~CCdlCOM()

virtual CCdlCOM::~CCdlCOM ( )
virtual

Destructs the class.

Member Function Documentation

◆ digit()

static char CCdlCOM::digit ( const int  _val)
inlinestaticprotected

Converts an integer to a char.

Definition at line 99 of file cdlCOM.h.

◆ recv()

virtual int CCdlCOM::recv ( void *  buf,
int  size 
)
virtual

Receives data from the device.

Implements CCdlBase.

◆ send()

virtual int CCdlCOM::send ( const void *  buf,
int  size 
)
virtual

Sends data to the device.

Implements CCdlBase.

Member Data Documentation

◆ _ccd

TCdlCOMDesc CCdlCOM::_ccd
protected

Stores the attributes of the serial port device.

Definition at line 79 of file cdlCOM.h.

◆ _deviceName

std::string CCdlCOM::_deviceName
private

Definition at line 75 of file cdlCOM.h.

◆ _oto

struct termios CCdlCOM::_oto
protected

old timeouts

Definition at line 90 of file cdlCOM.h.

◆ _prtHdl

int CCdlCOM::_prtHdl
protected

port handle

Definition at line 89 of file cdlCOM.h.


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