Interface to manage multiple LoRaWAN application packages.
More...
#include <LoRaWANPacMan.h>
|
| | LoRaWANPackageManager (LoRaWANNode *node, GetSecondsCb_t secondsCb) |
| | Create a package manager.
|
| |
| int16_t | enableTS003 (uint8_t fPort, SetSecondsCb_t setSecondsFunc) |
| | Enable TS003 Application Time Synchronization package.
|
| |
| int16_t | enableTS009 (PhysicalLayer *radio, DelaySecondsCb_t delayCb, UplinkIntervalCb_t intervalCb, RebootCb_t rebootCb) |
| | Enable TS009 Certification Protocol package.
|
| |
| void | requestAppTime () |
| | Send an application time request.
|
| |
| bool | getConfirmed () |
| | Check whether subsequent uplinks should be confirmed.
|
| |
| int16_t | processDownlink (const uint8_t *data, size_t len, LoRaWANEvent_t *eventDown) |
| | Process a multi-package downlink payload (TS007 section 3.1).
|
| |
| LoRaWANTaskInfo | hasTask () |
| | Query the next scheduled task across all packages and return the first.
|
| |
| bool | getUplinkData (uint8_t *dataOut, size_t *lenOut, uint8_t *fPort) |
| | Fetch uplink data from the first package reporting an UPLINK task.
|
| |
| bool | doAction () |
| | Execute the first applicable ACTION task (calls package->doAction()).
|
| |
| size_t | processPackageManagerData (uint8_t *dataDown, size_t lenDown, uint8_t *ansOut, size_t *ansLen) |
| | Process TS007 package management commands at the manager level.
|
| |
|
bool | isEnabledFPort (uint8_t fPort) |
| |
Interface to manage multiple LoRaWAN application packages.
◆ LoRaWANPackageManager()
| LoRaWANPackageManager::LoRaWANPackageManager |
( |
LoRaWANNode * |
node, |
|
|
GetSecondsCb_t |
secondsCb |
|
) |
| |
Create a package manager.
- Parameters
-
| node | Pointer to the LoRaWAN node |
| getSeconds | Pointer to getSeconds() function for time handling |
◆ doAction()
| bool LoRaWANPackageManager::doAction |
( |
| ) |
|
Execute the first applicable ACTION task (calls package->doAction()).
- Returns
- true if an action was performed, false otherwise
◆ enableTS003()
| int16_t LoRaWANPackageManager::enableTS003 |
( |
uint8_t |
fPort, |
|
|
SetSecondsCb_t |
setSecondsFunc |
|
) |
| |
Enable TS003 Application Time Synchronization package.
- Parameters
-
| fPort | The FPort to which this package will listen |
| setSecondsFunc | Pointer to setSeconds() function |
- Returns
- Status Codes
◆ enableTS009()
| int16_t LoRaWANPackageManager::enableTS009 |
( |
PhysicalLayer * |
radio, |
|
|
DelaySecondsCb_t |
delayCb, |
|
|
UplinkIntervalCb_t |
intervalCb, |
|
|
RebootCb_t |
rebootCb |
|
) |
| |
Enable TS009 Certification Protocol package.
- Parameters
-
| radio | Pointer to the PhysicalLayer radio instance for RF testing |
| delayCb | Callback to delay for a number of seconds during RF testing |
| intervalCb | Callback to set the uplink interval for the device |
| rebootCb | Callback to perform a device reboot |
- Returns
- Status Codes
◆ getConfirmed()
| bool LoRaWANPackageManager::getConfirmed |
( |
| ) |
|
Check whether subsequent uplinks should be confirmed.
- Returns
- true if uplinks should be confirmed, false otherwise
◆ getUplinkData()
| bool LoRaWANPackageManager::getUplinkData |
( |
uint8_t * |
dataOut, |
|
|
size_t * |
lenOut, |
|
|
uint8_t * |
fPort |
|
) |
| |
Fetch uplink data from the first package reporting an UPLINK task.
- Parameters
-
| dataOut | Pointer to uplink buffer |
| lenOut | Pointer to uplink length |
| fPort | Pointer to uplink FPort |
- Returns
- true if data was fetched, false otherwise
◆ hasTask()
Query the next scheduled task across all packages and return the first.
- Returns
- LoRaWANTaskInfo struct with time and action fields
◆ processDownlink()
| int16_t LoRaWANPackageManager::processDownlink |
( |
const uint8_t * |
data, |
|
|
size_t |
len, |
|
|
LoRaWANEvent_t * |
eventDown |
|
) |
| |
Process a multi-package downlink payload (TS007 section 3.1).
- Parameters
-
| data | Pointer to incoming payload |
| len | Length of incoming payload |
| eventDown | Pointer to LoRaWANEvent_t downlink event struct |
- Returns
- Status Codes
◆ processPackageManagerData()
| size_t LoRaWANPackageManager::processPackageManagerData |
( |
uint8_t * |
dataDown, |
|
|
size_t |
lenDown, |
|
|
uint8_t * |
ansOut, |
|
|
size_t * |
ansLen |
|
) |
| |
Process TS007 package management commands at the manager level.
- Parameters
-
| dataDown | Pointer to received downlink data |
| lenDown | Length of downlink data |
| ansOut | Pointer to buffer for answer |
| ansLen | Pointer to store answer length |
- Returns
- Number of bytes consumed from dataDown
◆ requestAppTime()
| void LoRaWANPackageManager::requestAppTime |
( |
| ) |
|
The documentation for this class was generated from the following files:
- src/protocols/LoRaWAN/LoRaWANPacMan.h
- src/protocols/LoRaWAN/LoRaWANPacMan.cpp