|
Beamlib 3.3.3
This is the Beam C++ class library.
|
#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... | |
|
virtual |
| void BoapMcComms::setComms | ( | BComms & | comms | ) |
Sets the communications interface to use.
| void BoapMcComms::setComms | ( | BComms * | comms | ) |
Sets the communications interface to use.
Sets the to and from addresses.
| BUInt32 BoapMcComms::getApiVersion | ( | ) |
Returns the API version.
Sets the call timeout returning the current value.
|
virtual |
Process any RX packets queuing them as needed.
!!! This should wait on comms for timeoutUs !!!
|
virtual |
Check and process all requests.
|
virtual |
Check and process any request.
|
virtual |
Process a recieved packet.
|
protected |
Performs a RPC call to the remote side.
|
protected |
Performs a RPC send to the remote side.
|
protected |
Receives a packet.
|
protected |
Receives a packet.
|
protected |
|
protected |
Lock for RPC calls. Only one at a time.
|
protected |
Lock for TX.
|
protected |
|
protected |
|
protected |
Set slave mode.
|
protected |
The timeout in us for calls.
|
protected |
|
protected |
|
protected |
Packet RX buffer.
|
protected |
Packet TX buffer for calls.
|
protected |
Packet RX buffer for calls.
|
protected |
Wait RX semaphore.
|
protected |
Packet TX buffer for requests.
|
protected |
Packet RX buffer for requests.
|
protected |
Packet RX buffer queue for requests.
|
protected |
Packet TX Queue.
|
protected |
Packet TX Queue number.
|
protected |
Wait for TX semaphore.