Common interface for all application packages.
More...
#include <LoRaWANPacMan.h>
|
|
| LoRaWANPackage (const LoRaWANPackage &obj)=delete |
| virtual size_t | processData (const uint8_t *dataIn, size_t lenIn, uint8_t *dataOut, size_t *lenOut, LoRaWANEvent_t *event) |
| | Process a single package command, writing any answer into the buffer provided by the package manager.
|
| virtual bool | handleTask (RadioLibTime_t *tNext, bool *uplinkDue) |
| | Execute any scheduled task that is due now and report when this package next needs servicing. When an uplink is due now it reports so via uplinkDue; the bytes are produced later by buildUplink() at the actual moment of transmission.
|
| virtual size_t | buildUplink (uint8_t *dataOut) |
| | Build the uplink that handleTask() reported as due, at the moment of transmission, and advance the package's transmit schedule.
|
| RadioLibTime_t | getSeconds () |
| | Get current time via the stored callback.
|
Common interface for all application packages.
◆ buildUplink()
| size_t LoRaWANPackage::buildUplink |
( |
uint8_t * | dataOut | ) |
|
|
virtual |
Build the uplink that handleTask() reported as due, at the moment of transmission, and advance the package's transmit schedule.
- Parameters
-
| dataOut | Pointer to the manager's answer buffer (write uplink here) |
- Returns
- Number of uplink bytes written (0 if nothing to send)
Reimplemented in LoRaWANPackageTS003.
◆ getSeconds()
Get current time via the stored callback.
- Returns
- Current time in seconds from the callback
◆ handleTask()
| bool LoRaWANPackage::handleTask |
( |
RadioLibTime_t * | tNext, |
|
|
bool * | uplinkDue ) |
|
virtual |
Execute any scheduled task that is due now and report when this package next needs servicing. When an uplink is due now it reports so via uplinkDue; the bytes are produced later by buildUplink() at the actual moment of transmission.
- Parameters
-
| tNext | Pointer that receives the time of the next task. |
| uplinkDue | Pointer set to true if an uplink is ready to be sent now. |
- Returns
- true if the package has a pending or scheduled task, false otherwise
Reimplemented in LoRaWANPackageTS003.
◆ processData()
| size_t LoRaWANPackage::processData |
( |
const uint8_t * | dataIn, |
|
|
size_t | lenIn, |
|
|
uint8_t * | dataOut, |
|
|
size_t * | lenOut, |
|
|
LoRaWANEvent_t * | event ) |
|
virtual |
Process a single package command, writing any answer into the buffer provided by the package manager.
- Parameters
-
| dataIn | Pointer to incoming command data |
| lenIn | Length of incoming data |
| dataOut | Pointer to the manager's answer buffer (write answer here) |
| lenOut | Pointer that receives the number of answer bytes written |
| event | Downlink event details |
- Returns
- Number of bytes consumed
Reimplemented in LoRaWANPackageTS003, and LoRaWANPackageTS009.
The documentation for this class was generated from the following files:
- src/protocols/LoRaWAN/LoRaWANPacMan.h
- src/protocols/LoRaWAN/LoRaWANPacMan.cpp