BDS Public
Beamlib 3.3.4
This is the Beam C++ class library.
Loading...
Searching...
No Matches

#include <BoapMc1.h>

Public Member Functions

 BoapMc1Comms (Bool threaded=0, BUInt reqSize=512)
 
virtual ~BoapMc1Comms ()
 
void setCommsMode (Bool halfDuplex)
 Sets half duplex mode.
 
void setComms (BComms &comms)
 Sets the communications interface to use.
 
void setComms (BComms *comms)
 Sets the communications interface to use.
 
void setAddress (BUInt16 addressTo, BUInt16 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 validate ()
 Validate the request.
 
BoapMc1PacketpacketRx ()
 Returns a reference to the current RX packet.
 
virtual BError processRx ()
 Process any RX packets queuing them as needed.
 

Protected Member Functions

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

Protected Attributes

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

Constructor & Destructor Documentation

◆ BoapMc1Comms()

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

◆ ~BoapMc1Comms()

BoapMc1Comms::~BoapMc1Comms ( )
virtual

Member Function Documentation

◆ setCommsMode()

void BoapMc1Comms::setCommsMode ( Bool  halfDuplex)

Sets half duplex mode.

◆ 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.

◆ setAddress()

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

Sets the to and from addresses.

◆ getApiVersion()

BUInt32 BoapMc1Comms::getApiVersion ( )

Returns the API version.

◆ setTimeout()

BUInt32 BoapMc1Comms::setTimeout ( BUInt32  timeoutUs)

Sets the call timeout returning the current value.

◆ validate()

BError BoapMc1Comms::validate ( )
virtual

Validate the request.

◆ packetRx()

BoapMc1Packet * BoapMc1Comms::packetRx ( )

Returns a reference to the current RX packet.

◆ processRx()

BError BoapMc1Comms::processRx ( )
virtual

Process any RX packets queuing them as needed.

◆ processRequests()

BError BoapMc1Comms::processRequests ( )
protectedvirtual

Check and process any requests.

◆ processRequest()

BError BoapMc1Comms::processRequest ( )
protectedvirtual

Check and process any request.

◆ packetTx()

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

◆ packetRxData()

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

◆ packetRxEnd()

BError BoapMc1Comms::packetRxEnd ( )
protected

Member Data Documentation

◆ othreaded

Bool BoapMc1Comms::othreaded
protected

Threaded operation.

◆ oreqSize

BUInt32 BoapMc1Comms::oreqSize
protected

The maximum request size.

◆ olockCall

BMutex BoapMc1Comms::olockCall
protected

Lock for RPC calls. Only one at a time.

◆ olockTx

BMutex BoapMc1Comms::olockTx
protected

Lock for TX.

◆ ocomms

BComms* BoapMc1Comms::ocomms
protected

◆ oapiVersion

BUInt32 BoapMc1Comms::oapiVersion
protected

◆ ohalfDuplex

Bool BoapMc1Comms::ohalfDuplex
protected

Half duplex mode.

◆ otimeout

BUInt32 BoapMc1Comms::otimeout
protected

The timeout in us for calls.

◆ oaddressTo

BUInt16 BoapMc1Comms::oaddressTo
protected

◆ oaddressFrom

BUInt16 BoapMc1Comms::oaddressFrom
protected

◆ opacketRxBase

BoapMc1Packet BoapMc1Comms::opacketRxBase
protected

◆ opacketRx

BoapMc1Packet* BoapMc1Comms::opacketRx
protected

The RX packet.

◆ opacketTxBase

BoapMc1Packet BoapMc1Comms::opacketTxBase
protected

◆ opacketTx

BoapMc1Packet* BoapMc1Comms::opacketTx
protected

The TX packet.

◆ opacketRpcCmd

BUInt BoapMc1Comms::opacketRpcCmd
protected

Waiting for RPC reply to cmd.

◆ opacketRpcSema

BSemaphore BoapMc1Comms::opacketRpcSema
protected

Wait RPC reply semaphore.

◆ opacketRpcDoneSema

BSemaphore BoapMc1Comms::opacketRpcDoneSema
protected

Wait RPC complete semaphore.

◆ oerror

BoapMc1Error BoapMc1Comms::oerror
protected

The call return error;.


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