LoRaWAN Application package for TS003 Application Time.
More...
#include <LoRaWANPackageTS003.h>
|
|
| LoRaWANPackageTS003 (const LoRaWANPackageTS003 &obj)=delete |
| size_t | processData (const uint8_t *dataDown, size_t lenDown, uint8_t *dataOut, size_t *lenOut, LoRaWANEvent_t *event) override |
| | Process a single TS003 command, writing any answer into the provided buffer.
|
| int16_t | requestAppTime (bool force=false) |
| | Schedule an application time request to be sent at the next opportunity.
|
|
void | setSecondsCb (SetSecondsCb_t setSecondsCb) |
| bool | handleTask (RadioLibTime_t *tNext, bool *uplinkDue) override |
| | Report when the next AppTimeReq is due and whether one is due now. Does not build the payload (see buildUplink).
|
| size_t | buildUplink (uint8_t *dataOut) override |
| | Build the due AppTimeReq with the current time and advance the schedule. Called at the moment of transmission so the timestamp stays fresh.
|
|
| LoRaWANPackage (const LoRaWANPackage &obj)=delete |
| RadioLibTime_t | getSeconds () |
| | Get current time via the stored callback.
|
LoRaWAN Application package for TS003 Application Time.
◆ SetSecondsCb_t
Set the setSeconds callback function.
- Parameters
-
| setSeconds | Callback function to set device time |
◆ buildUplink()
| size_t LoRaWANPackageTS003::buildUplink |
( |
uint8_t * | dataOut | ) |
|
|
overridevirtual |
Build the due AppTimeReq with the current time and advance the schedule. Called at the moment of transmission so the timestamp stays fresh.
- Parameters
-
| dataOut | Pointer to the manager's answer buffer |
- Returns
- Number of uplink bytes written
Reimplemented from LoRaWANPackage.
◆ handleTask()
| bool LoRaWANPackageTS003::handleTask |
( |
RadioLibTime_t * | tNext, |
|
|
bool * | uplinkDue ) |
|
overridevirtual |
Report when the next AppTimeReq is due and whether one is due now. Does not build the payload (see buildUplink).
- Parameters
-
| tNext | Pointer that receives the time of the next task |
| uplinkDue | Pointer set to true if an AppTimeReq uplink is due now |
- Returns
- true if a task is pending or scheduled, false otherwise
Reimplemented from LoRaWANPackage.
◆ processData()
| size_t LoRaWANPackageTS003::processData |
( |
const uint8_t * | dataDown, |
|
|
size_t | lenDown, |
|
|
uint8_t * | dataOut, |
|
|
size_t * | lenOut, |
|
|
LoRaWANEvent_t * | event ) |
|
overridevirtual |
Process a single TS003 command, writing any answer into the provided buffer.
- Parameters
-
| dataDown | Pointer to received command data |
| lenDown | Length of command data |
| dataOut | Pointer to the manager's answer buffer |
| lenOut | Pointer that receives the number of answer bytes written |
| event | Pointer to downlink event data |
- Returns
- Number of bytes consumed
Reimplemented from LoRaWANPackage.
◆ requestAppTime()
| int16_t LoRaWANPackageTS003::requestAppTime |
( |
bool | force = false | ) |
|
Schedule an application time request to be sent at the next opportunity.
- Parameters
-
| force | Require a response, even if the clock is already in sync |
- Returns
- Status Codes
The documentation for this class was generated from the following files: