Cern
LibTmsApi 2.3.0

#include <BComms.h>

Public Types

enum  Wait { WaitNone = 0x00 , WaitRead = 0x01 , WaitWrite = 0x02 , WaitError = 0x04 }
 

Public Member Functions

 BComms ()
 
virtual ~BComms ()
 
virtual BError init ()
 
virtual BError setPacketMode (Bool packetMode)
 Set packet mode.
 
virtual Bool packetMode ()
 Device is in packet mode.
 
virtual BError setTimeout (BInt timeoutMs)
 Set communication timeout.
 
virtual BUInt writeAvailable ()
 
virtual BError write (const void *data, BUInt32 nBytes, BUInt32 &nTrans)=0
 
virtual BUInt readAvailable ()
 
virtual BError read (void *data, BUInt32 num, BUInt32 &nTrans)=0
 
virtual BError wait (BUInt8 events, BInt timeout=-1, BUInt32 num=1)
 
virtual void eventQueue (BEventQueue *eventQueue, BInt32 event, BUInt num=1)
 

Protected Attributes

Bool opacketMode
 
BInt32 otimeout
 
BEventQueueoeventQueue
 
BInt32 oevent
 
BUInt oeventNum
 

Member Enumeration Documentation

◆ Wait

Enumerator
WaitNone 
WaitRead 
WaitWrite 
WaitError 

Constructor & Destructor Documentation

◆ BComms()

BComms::BComms ( )

◆ ~BComms()

BComms::~BComms ( )
virtual

Member Function Documentation

◆ eventQueue()

void BComms::eventQueue ( BEventQueue eventQueue,
BInt32  event,
BUInt  num = 1 
)
virtual

◆ init()

BError BComms::init ( )
virtual

◆ packetMode()

Bool BComms::packetMode ( )
virtual

Device is in packet mode.

◆ read()

virtual BError BComms::read ( void *  data,
BUInt32  num,
BUInt32 nTrans 
)
pure virtual

◆ readAvailable()

BUInt BComms::readAvailable ( )
virtual

◆ setPacketMode()

BError BComms::setPacketMode ( Bool  packetMode)
virtual

Set packet mode.

◆ setTimeout()

BError BComms::setTimeout ( BInt  timeoutMs)
virtual

Set communication timeout.

◆ wait()

BError BComms::wait ( BUInt8  events,
BInt  timeout = -1,
BUInt32  num = 1 
)
virtual

◆ write()

virtual BError BComms::write ( const void *  data,
BUInt32  nBytes,
BUInt32 nTrans 
)
pure virtual

◆ writeAvailable()

BUInt BComms::writeAvailable ( )
virtual

Member Data Documentation

◆ oevent

BInt32 BComms::oevent
protected

◆ oeventNum

BUInt BComms::oeventNum
protected

◆ oeventQueue

BEventQueue* BComms::oeventQueue
protected

◆ opacketMode

Bool BComms::opacketMode
protected

◆ otimeout

BInt32 BComms::otimeout
protected

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