Beam-lib 2.15.1 |
#include <BoapMc.h>
Public Member Functions | |
BoapMcComms (Bool threaded=0, BUInt rxQueueSize=4) | |
virtual | ~BoapMcComms () |
void | setCommsMode (Bool slave, BUInt txQueueSize) |
Sets slave 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 (BUInt8 addressTo, BUInt8 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... | |
virtual BError | processRx (BTimeout timeoutUs=BTimeoutForever) |
Process any RX packets queuing them as needed. More... | |
virtual BError | processRequests (BTimeout timeoutUs=BTimeoutForever) |
Check and process all requests. More... | |
virtual BError | processRequest (BTimeout timeoutUs=BTimeoutForever) |
Check and process any request. More... | |
virtual BError | processPacket (BoapMcPacket &rx, BoapMcPacket &tx) |
Process a recieved packet. More... | |
Protected Member Functions | |
BError | performCall () |
Performs a RPC call to the remote side. More... | |
BError | performSend () |
Performs a RPC send to the remote side. More... | |
BError | packetSend (BoapMcPacket &packet) |
Receives a packet. More... | |
BError | packetRecv (BoapMcPacket &packet) |
Receives a packet. More... | |
Protected Attributes | |
Bool | othreaded |
BMutex | olockCall |
Lock for RPC calls. Only one at a time. More... | |
BMutex | olockTx |
Lock for TX. More... | |
BComms * | ocomms |
BUInt32 | oapiVersion |
Bool | oslave |
Set slave mode. More... | |
BUInt32 | otimeout |
The timeout in us for calls. More... | |
BUInt8 | oaddressTo |
BUInt8 | oaddressFrom |
BoapMcPacket | opacket |
Packet RX buffer. More... | |
BoapMcPacket | opacketTx |
Packet TX buffer for calls. More... | |
BoapMcPacket | opacketRx |
Packet RX buffer for calls. More... | |
BSemaphore | opacketRxSema |
Wait RX semaphore. More... | |
BoapMcPacket | opacketReqTx |
Packet TX buffer for requests. More... | |
BoapMcPacket | opacketReqRx |
Packet RX buffer for requests. More... | |
BQueue< BoapMcPacket > | opacketReqQueue |
Packet RX buffer queue for requests. More... | |
BFifo< BoapMcPacket > | opacketTxQueue |
Packet TX Queue. More... | |
BSemaphoreCount | opacketTxQueueWriteNum |
Packet TX Queue number. More... | |
BSemaphore | opacketTxSema |
Wait for TX semaphore. More... | |
Constructor & Destructor Documentation
◆ BoapMcComms()
◆ ~BoapMcComms()
| virtual |
Member Function Documentation
◆ getApiVersion()
BUInt32 BoapMcComms::getApiVersion | ( | ) |
Returns the API version.
◆ packetRecv()
| protected |
Receives a packet.
◆ packetSend()
| protected |
Receives a packet.
◆ performCall()
| protected |
Performs a RPC call to the remote side.
◆ performSend()
| protected |
Performs a RPC send to the remote side.
◆ processPacket()
| virtual |
Process a recieved packet.
◆ processRequest()
| virtual |
Check and process any request.
◆ processRequests()
| virtual |
Check and process all requests.
◆ processRx()
| virtual |
Process any RX packets queuing them as needed.
!!! This should wait on comms for timeoutUs !!!
◆ setAddress()
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()
◆ setTimeout()
Sets the call timeout returning the current value.
Member Data Documentation
◆ oaddressFrom
| protected |
◆ oaddressTo
| protected |
◆ oapiVersion
| protected |
◆ ocomms
| protected |
◆ olockCall
| protected |
Lock for RPC calls. Only one at a time.
◆ olockTx
| protected |
Lock for TX.
◆ opacket
| protected |
Packet RX buffer.
◆ opacketReqQueue
| protected |
Packet RX buffer queue for requests.
◆ opacketReqRx
| protected |
Packet RX buffer for requests.
◆ opacketReqTx
| protected |
Packet TX buffer for requests.
◆ opacketRx
| protected |
Packet RX buffer for calls.
◆ opacketRxSema
| protected |
Wait RX semaphore.
◆ opacketTx
| protected |
Packet TX buffer for calls.
◆ opacketTxQueue
| protected |
Packet TX Queue.
◆ opacketTxQueueWriteNum
| protected |
Packet TX Queue number.
◆ opacketTxSema
| protected |
Wait for TX semaphore.
◆ oslave
| protected |
Set slave mode.
◆ othreaded
| protected |
◆ otimeout
| protected |
The timeout in us for calls.
The documentation for this class was generated from the following files:
Generated by 1.8.14