Electronics and Software
Engineering Innovation
Beam-lib  2.15.1

#include <BoapMc1.h>

Public Member Functions

 BoapMc1Comms (Bool threaded=0, BUInt reqSize=512)
 
virtual ~BoapMc1Comms ()
 
void setCommsMode (Bool halfDuplex)
 Sets half duplex mode. More...
 
void setComms (BComms &comms)
 Sets the communications interface to use. More...
 
void setComms (BComms *comms)
 Sets the communications interface to use. More...
 
void setAddress (BUInt16 addressTo, BUInt16 addressFrom)
 Sets the to and from addresses. More...
 
BUInt32 getApiVersion ()
 Returns the API version. More...
 
BUInt32 setTimeout (BUInt32 timeoutUs)
 Sets the call timeout returning the current value. More...
 
BoapMc1PacketpacketRx ()
 returns a reference to the current RX packet More...
 
virtual BError processRx (BTimeout timeoutUs=BTimeoutForever)
 Process any RX packets queuing them as needed. More...
 

Protected Member Functions

virtual BError processRequests (BTimeout timeoutUs=BTimeoutForever)
 Check and process any requests. More...
 
virtual BError processRequest (BTimeout timeoutUs=BTimeoutForever)
 Check and process any request. More...
 
BError packetTx (BDataChunk *chunks, BUInt nChunks, BUInt16 waitCmdReply)
 
BError packetRxData (void *data, BUInt nBytes)
 
BError packetRxEnd ()
 

Protected Attributes

Bool othreaded
 Threaded operation. More...
 
BUInt32 oreqSize
 The maximum request size. More...
 
BMutex olockCall
 Lock for RPC calls. Only one at a time. More...
 
BMutex olockTx
 Lock for TX. More...
 
BCommsocomms
 
BUInt32 oapiVersion
 
Bool ohalfDuplex
 Half duplex mode. More...
 
BUInt32 otimeout
 The timeout in us for calls. More...
 
BUInt16 oaddressTo
 
BUInt16 oaddressFrom
 
BoapMc1Packet opacketRxBase
 
BoapMc1PacketopacketRx
 The RX packet. More...
 
BoapMc1Packet opacketTxBase
 
BoapMc1PacketopacketTx
 The TX packet. More...
 
BUInt opacketRpcCmd
 Waiting for RPC reply to cmd. More...
 
BSemaphore opacketRpcSema
 Wait RPC reply semaphore. More...
 
BSemaphore opacketRpcDoneSema
 Wait RPC complete semaphore. More...
 
BoapMc1Error oerror
 The call return error;. More...
 

Constructor & Destructor Documentation

◆ BoapMc1Comms()

BoapMc1Comms::BoapMc1Comms ( Bool  threaded = 0,
BUInt  reqSize = 512 
)

◆ ~BoapMc1Comms()

BoapMc1Comms::~BoapMc1Comms ( )
virtual

Member Function Documentation

◆ getApiVersion()

BUInt32 BoapMc1Comms::getApiVersion ( )

Returns the API version.

◆ packetRx()

BoapMc1Packet * BoapMc1Comms::packetRx ( )

returns a reference to the current RX packet

◆ packetRxData()

BError BoapMc1Comms::packetRxData ( void *  data,
BUInt  nBytes 
)
protected

◆ packetRxEnd()

BError BoapMc1Comms::packetRxEnd ( )
protected

◆ packetTx()

BError BoapMc1Comms::packetTx ( BDataChunk chunks,
BUInt  nChunks,
BUInt16  waitCmdReply 
)
protected

◆ processRequest()

BError BoapMc1Comms::processRequest ( BTimeout  timeoutUs = BTimeoutForever)
protectedvirtual

Check and process any request.

◆ processRequests()

BError BoapMc1Comms::processRequests ( BTimeout  timeoutUs = BTimeoutForever)
protectedvirtual

Check and process any requests.

◆ processRx()

BError BoapMc1Comms::processRx ( BTimeout  timeoutUs = BTimeoutForever)
virtual

Process any RX packets queuing them as needed.

◆ setAddress()

void BoapMc1Comms::setAddress ( BUInt16  addressTo,
BUInt16  addressFrom 
)

Sets the to and from addresses.

◆ setComms() [1/2]

void BoapMc1Comms::setComms ( BComms comms)

Sets the communications interface to use.

◆ setComms() [2/2]

void BoapMc1Comms::setComms ( BComms comms)

Sets the communications interface to use.

◆ setCommsMode()

void BoapMc1Comms::setCommsMode ( Bool  halfDuplex)

Sets half duplex mode.

◆ setTimeout()

BUInt32 BoapMc1Comms::setTimeout ( BUInt32  timeoutUs)

Sets the call timeout returning the current value.

Member Data Documentation

◆ oaddressFrom

BUInt16 BoapMc1Comms::oaddressFrom
protected

◆ oaddressTo

BUInt16 BoapMc1Comms::oaddressTo
protected

◆ oapiVersion

BUInt32 BoapMc1Comms::oapiVersion
protected

◆ ocomms

BComms* BoapMc1Comms::ocomms
protected

◆ oerror

BoapMc1Error BoapMc1Comms::oerror
protected

The call return error;.

◆ ohalfDuplex

Bool BoapMc1Comms::ohalfDuplex
protected

Half duplex mode.

◆ olockCall

BMutex BoapMc1Comms::olockCall
protected

Lock for RPC calls. Only one at a time.

◆ olockTx

BMutex BoapMc1Comms::olockTx
protected

Lock for TX.

◆ opacketRpcCmd

BUInt BoapMc1Comms::opacketRpcCmd
protected

Waiting for RPC reply to cmd.

◆ opacketRpcDoneSema

BSemaphore BoapMc1Comms::opacketRpcDoneSema
protected

Wait RPC complete semaphore.

◆ opacketRpcSema

BSemaphore BoapMc1Comms::opacketRpcSema
protected

Wait RPC reply semaphore.

◆ opacketRx

BoapMc1Packet* BoapMc1Comms::opacketRx
protected

The RX packet.

◆ opacketRxBase

BoapMc1Packet BoapMc1Comms::opacketRxBase
protected

◆ opacketTx

BoapMc1Packet* BoapMc1Comms::opacketTx
protected

The TX packet.

◆ opacketTxBase

BoapMc1Packet BoapMc1Comms::opacketTxBase
protected

◆ oreqSize

BUInt32 BoapMc1Comms::oreqSize
protected

The maximum request size.

◆ othreaded

Bool BoapMc1Comms::othreaded
protected

Threaded operation.

◆ otimeout

BUInt32 BoapMc1Comms::otimeout
protected

The timeout in us for calls.


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