Radio Control Layer (RCL)
|
The generic Tx Repeat command allows to repeatedly transmit a packet. The following sections describe how the command can be configured and used, its life cycle, and how it fits into the RCL architecture.
In order to submit a Generic Tx Repeat command, the following steps must have taken place:
Once these steps have been completed, RCL_Command_submit and RCL_Command_pend are called to effectively send and then wait for the command to conclude. Once this has happened, the callback and the command status can be used for error checking and the application can proceed according to its specification.
The Generic Tx Repeat command can be employed for various reasons. It is mostly meant to be used for testing purposes, but it can also be used for periodic transmissions of the same packet. This means that the application must also consider the time period or repeated transmissions (back-to-back), and the number of times that the packet is to be sent.
The following code snippet shows a normal use-case for the command.
Just like a regular Generic Tx command, it is up to the application to define how the packet is built while also considering the internal packet format used to store packets in the LRF FIFOs.
This can be accomplished by using a struct to define the various fields that need to be considered when building the the packet.
The following function serves as an example of how packets can be generated so that they are compatible with the internal packet format of the LRF.
It's worth mentioning the that use of the Generic Tx Repeat command for periodic transmissions is discouraged, given that it keeps the device from going into a low power mode during the waiting period between transmissions.
The Generic Tx Repeat command handler has a life cycle that mostly depends on the packet being sent, the number of times that is supposed to be sent and the time period.
RCL Event (In) | Description |
---|---|
setup | Setup has been performed |
timerStart | Timer-based start signalled |
hardStop | Timer/api-based hard-stop signalled |
gracefulStop | Timer/api-based graceful-stop signalled |
RCL Event (Out) | Description |
---|---|
lastCmdDone | The RCL is finished with the command |
cmdStarted | Command handler has accepted and started executing |
LRF Event | Description |
---|---|
opDone | The PBE operation has finished |
opError | Something went wrong. Cause located in the PBE ENDCAUSE register |
systim1 | SYSTIM1 event indicating that a graceful stop wsa observed |