Cern
LibTmsApi 2.3.0

#include <BoapMc.h>

Public Member Functions

 BoapMcComms (Bool threaded=0, BUInt rxQueueSize=4)
 
virtual ~BoapMcComms ()
 
void setCommsMode (Bool slave, BUInt txQueueSize)
 Sets slave mode.
 
void setComms (BComms &comms)
 Sets the communications interface to use.
 
void setComms (BComms *comms)
 Sets the communications interface to use.
 
void setAddress (BUInt8 addressTo, BUInt8 addressFrom)
 Sets the to and from addresses.
 
BUInt32 getApiVersion ()
 Returns the API version.
 
BUInt32 setTimeout (BUInt32 timeoutUs)
 Sets the call timeout returning the current value.
 
virtual BError processRx (BTimeout timeoutUs=BTimeoutForever)
 Process any RX packets queuing them as needed.
 
virtual BError processRequests (BTimeout timeoutUs=BTimeoutForever)
 Check and process all requests.
 
virtual BError processRequest (BTimeout timeoutUs=BTimeoutForever)
 Check and process any request.
 
virtual BError processPacket (BoapMcPacket &rx, BoapMcPacket &tx)
 Process a recieved packet.
 

Protected Member Functions

BError performCall ()
 Performs a RPC call to the remote side.
 
BError performSend ()
 Performs a RPC send to the remote side.
 
BError packetSend (BoapMcPacket &packet)
 Receives a packet.
 
BError packetRecv (BoapMcPacket &packet)
 Receives a packet.
 

Protected Attributes

Bool othreaded
 
BMutex olockCall
 Lock for RPC calls. Only one at a time.
 
BMutex olockTx
 Lock for TX.
 
BCommsocomms
 
BUInt32 oapiVersion
 
Bool oslave
 Set slave mode.
 
BUInt32 otimeout
 The timeout in us for calls.
 
BUInt8 oaddressTo
 
BUInt8 oaddressFrom
 
BoapMcPacket opacket
 Packet RX buffer.
 
BoapMcPacket opacketTx
 Packet TX buffer for calls.
 
BoapMcPacket opacketRx
 Packet RX buffer for calls.
 
BSemaphore opacketRxSema
 Wait RX semaphore.
 
BoapMcPacket opacketReqTx
 Packet TX buffer for requests.
 
BoapMcPacket opacketReqRx
 Packet RX buffer for requests.
 
BQueue< BoapMcPacketopacketReqQueue
 Packet RX buffer queue for requests.
 
BFifo< BoapMcPacketopacketTxQueue
 Packet TX Queue.
 
BSemaphoreCount opacketTxQueueWriteNum
 Packet TX Queue number.
 
BSemaphore opacketTxSema
 Wait for TX semaphore.
 

Constructor & Destructor Documentation

◆ BoapMcComms()

BoapMcComms::BoapMcComms ( Bool  threaded = 0,
BUInt  rxQueueSize = 4 
)

◆ ~BoapMcComms()

BoapMcComms::~BoapMcComms ( )
virtual

Member Function Documentation

◆ getApiVersion()

BUInt32 BoapMcComms::getApiVersion ( )

Returns the API version.

◆ packetRecv()

BError BoapMcComms::packetRecv ( BoapMcPacket packet)
protected

Receives a packet.

◆ packetSend()

BError BoapMcComms::packetSend ( BoapMcPacket packet)
protected

Receives a packet.

◆ performCall()

BError BoapMcComms::performCall ( )
protected

Performs a RPC call to the remote side.

◆ performSend()

BError BoapMcComms::performSend ( )
protected

Performs a RPC send to the remote side.

◆ processPacket()

BError BoapMcComms::processPacket ( BoapMcPacket rx,
BoapMcPacket tx 
)
virtual

Process a recieved packet.

◆ processRequest()

BError BoapMcComms::processRequest ( BTimeout  timeoutUs = BTimeoutForever)
virtual

Check and process any request.

◆ processRequests()

BError BoapMcComms::processRequests ( BTimeout  timeoutUs = BTimeoutForever)
virtual

Check and process all requests.

◆ processRx()

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

Process any RX packets queuing them as needed.

!!! This should wait on comms for timeoutUs !!!

◆ setAddress()

void BoapMcComms::setAddress ( BUInt8  addressTo,
BUInt8  addressFrom 
)

Sets the to and from addresses.

◆ setComms() [1/2]

void BoapMcComms::setComms ( BComms comms)

Sets the communications interface to use.

◆ setComms() [2/2]

void BoapMcComms::setComms ( BComms comms)

Sets the communications interface to use.

◆ setCommsMode()

void BoapMcComms::setCommsMode ( Bool  slave,
BUInt  txQueueSize 
)

Sets slave mode.

◆ setTimeout()

BUInt32 BoapMcComms::setTimeout ( BUInt32  timeoutUs)

Sets the call timeout returning the current value.

Member Data Documentation

◆ oaddressFrom

BUInt8 BoapMcComms::oaddressFrom
protected

◆ oaddressTo

BUInt8 BoapMcComms::oaddressTo
protected

◆ oapiVersion

BUInt32 BoapMcComms::oapiVersion
protected

◆ ocomms

BComms* BoapMcComms::ocomms
protected

◆ olockCall

BMutex BoapMcComms::olockCall
protected

Lock for RPC calls. Only one at a time.

◆ olockTx

BMutex BoapMcComms::olockTx
protected

Lock for TX.

◆ opacket

BoapMcPacket BoapMcComms::opacket
protected

Packet RX buffer.

◆ opacketReqQueue

BQueue<BoapMcPacket> BoapMcComms::opacketReqQueue
protected

Packet RX buffer queue for requests.

◆ opacketReqRx

BoapMcPacket BoapMcComms::opacketReqRx
protected

Packet RX buffer for requests.

◆ opacketReqTx

BoapMcPacket BoapMcComms::opacketReqTx
protected

Packet TX buffer for requests.

◆ opacketRx

BoapMcPacket BoapMcComms::opacketRx
protected

Packet RX buffer for calls.

◆ opacketRxSema

BSemaphore BoapMcComms::opacketRxSema
protected

Wait RX semaphore.

◆ opacketTx

BoapMcPacket BoapMcComms::opacketTx
protected

Packet TX buffer for calls.

◆ opacketTxQueue

BFifo<BoapMcPacket> BoapMcComms::opacketTxQueue
protected

Packet TX Queue.

◆ opacketTxQueueWriteNum

BSemaphoreCount BoapMcComms::opacketTxQueueWriteNum
protected

Packet TX Queue number.

◆ opacketTxSema

BSemaphore BoapMcComms::opacketTxSema
protected

Wait for TX semaphore.

◆ oslave

Bool BoapMcComms::oslave
protected

Set slave mode.

◆ othreaded

Bool BoapMcComms::othreaded
protected

◆ otimeout

BUInt32 BoapMcComms::otimeout
protected

The timeout in us for calls.


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