ArmSys Support
ArmsysApi  0.12.18

#include <BComms.h>

Inheritance diagram for BComms:
BCan BSocket BSocketTls BUart BUartBasic BUsbRaw BUsbSerial BUsbSerialLock

Public Types

enum  Flush { FlushRead, FlushWrite, FlushReadWrite }
 

Public Member Functions

 BComms ()
 
virtual ~BComms ()
 
virtual BError init ()
 
virtual void close ()
 
virtual const char * name ()
 The name of this interface. More...
 
virtual BUInt32 byteRate ()
 The byte rate of this interface. More...
 
virtual BError setPacketMode (Bool packetMode)
 Set packet mode. More...
 
virtual Bool packetMode ()
 Device is in packet mode. More...
 
virtual BError setTimeout (BTimeout timeoutUs)
 Set communication timeout. More...
 
virtual BError connect (const char *resource)
 Create a connection. More...
 
virtual Bool isConnected ()
 
virtual BError disconnect ()
 Disconnect. More...
 
virtual void flush (Flush flush)
 
virtual BUInt writeAvailable ()
 
virtual BError write (const void *data, BUInt32 nBytes, BUInt32 &nTrans)=0
 
virtual BError writeChunks (const BDataChunk *chunks, BUInt nChunks, BUInt32 &nTrans)
 
virtual BUInt readAvailable ()
 
virtual BError read (void *data, BUInt32 num, BUInt32 &nTrans)=0
 
virtual BError wait (BUInt32 eventSet, BTimeout timeoutUs=BTimeoutForever, BUInt32 num=1)
 
virtual void eventQueue (BEventQueue *eventQueue, BUInt32 event, BUInt32 eventSet, BUInt num=1)
 
virtual void eventEnable (Bool on)
 Enable events to be sent. More...
 

Protected Attributes

Bool oconnected
 
Bool opacketMode
 
BTimeout otimeout
 
BEventQueueoeventQueue
 
Bool oeventEnabled
 
BUInt32 oevent
 
BUInt32 oeventSet
 
BUInt oeventNum
 

Member Enumeration Documentation

◆ Flush

Enumerator
FlushRead 
FlushWrite 
FlushReadWrite 

Constructor & Destructor Documentation

◆ BComms()

BComms::BComms ( )

◆ ~BComms()

BComms::~BComms ( )
virtual

Member Function Documentation

◆ byteRate()

BUInt32 BComms::byteRate ( )
virtual

The byte rate of this interface.

Reimplemented in BUsbRaw.

◆ close()

void BComms::close ( )
virtual

Reimplemented in BUsbRaw, BUsbSerial, BSocketTls, and BSocket.

◆ connect()

BError BComms::connect ( const char *  resource)
virtual

Create a connection.

◆ disconnect()

BError BComms::disconnect ( )
virtual

Disconnect.

◆ eventEnable()

void BComms::eventEnable ( Bool  on)
virtual

Enable events to be sent.

◆ eventQueue()

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

◆ flush()

void BComms::flush ( Flush  flush)
virtual

◆ init()

BError BComms::init ( )
virtual

◆ isConnected()

Bool BComms::isConnected ( )
virtual

◆ name()

const char * BComms::name ( )
virtual

The name of this interface.

Reimplemented in BUsbRaw.

◆ packetMode()

Bool BComms::packetMode ( )
virtual

Device is in packet mode.

Reimplemented in BCan.

◆ read()

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

◆ readAvailable()

BUInt BComms::readAvailable ( )
virtual

Reimplemented in BUsbRaw, BUsbSerial, BCan, BUart, BUartBasic, and BUsbSerialLock.

◆ setPacketMode()

BError BComms::setPacketMode ( Bool  packetMode)
virtual

Set packet mode.

◆ setTimeout()

BError BComms::setTimeout ( BTimeout  timeoutUs)
virtual

Set communication timeout.

◆ wait()

BError BComms::wait ( BUInt32  eventSet,
BTimeout  timeoutUs = BTimeoutForever,
BUInt32  num = 1 
)
virtual

Reimplemented in BUsbSerial, and BUart.

◆ write()

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

◆ writeAvailable()

BUInt BComms::writeAvailable ( )
virtual

Reimplemented in BUsbRaw, BUsbSerial, BCan, BUart, BUartBasic, and BUsbSerialLock.

◆ writeChunks()

BError BComms::writeChunks ( const BDataChunk chunks,
BUInt  nChunks,
BUInt32 nTrans 
)
virtual

Member Data Documentation

◆ oconnected

Bool BComms::oconnected
protected

◆ oevent

BUInt32 BComms::oevent
protected

◆ oeventEnabled

Bool BComms::oeventEnabled
protected

◆ oeventNum

BUInt BComms::oeventNum
protected

◆ oeventQueue

BEventQueue* BComms::oeventQueue
protected

◆ oeventSet

BUInt32 BComms::oeventSet
protected

◆ opacketMode

Bool BComms::opacketMode
protected

◆ otimeout

BTimeout BComms::otimeout
protected

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