@@ -436,6 +436,72 @@ class LoRaWANInterface: public LoRaWANBase {
436
436
*/
437
437
virtual lorawan_status_t set_device_class (const device_class_t device_class);
438
438
439
+ /* * Get hold of TX meta-data
440
+ *
441
+ * Use this method to acquire any TX meta-data related to previous
442
+ * transmission.
443
+ * TX meta-data is only available right after the transmission is completed.
444
+ * In other words, you can check for TX meta-data right after receiving the
445
+ * TX_DONE event.
446
+ *
447
+ * @param metadata the inbound structure that will be filled if the meta-data
448
+ * is available.
449
+ *
450
+ * @return LORAWAN_STATUS_OK if the meta-data is available, otherwise
451
+ * LORAWAN_STATUS_METADATA_NOT_AVAILABLE is returned.
452
+ */
453
+ virtual lorawan_status_t get_tx_metadata (lorawan_tx_metadata &metadata);
454
+
455
+ /* * Get hold of RX meta-data
456
+ *
457
+ * Use this method to acquire any RX meta-data related to current
458
+ * reception.
459
+ * RX meta-data is only available right after the reception is completed.
460
+ * In other words, you can check for RX meta-data right after receiving the
461
+ * RX_DONE event.
462
+ *
463
+ * @param metadata the inbound structure that will be filled if the meta-data
464
+ * is available.
465
+ *
466
+ * @return LORAWAN_STATUS_OK if the meta-data is available, otherwise
467
+ * LORAWAN_STATUS_METADATA_NOT_AVAILABLE is returned.
468
+ */
469
+ virtual lorawan_status_t get_rx_metadata (lorawan_rx_metadata &metadata);
470
+
471
+ /* * Get hold of backoff time
472
+ *
473
+ * In the TX path, because of automatic duty cycling, the transmission is delayed
474
+ * by a certain amount of time which is the backoff time. While the system schedules
475
+ * application data to be sent, the application can inquire about how much time is
476
+ * left in the actual transmission to happen.
477
+ *
478
+ * The system will provide you with a backoff time only if the application data is
479
+ * in the TX pipe. If however, the event is already queued for the transmission, this
480
+ * API returns a LORAWAN_STATUS_METADATA_NOT_AVAILABLE error code.
481
+ *
482
+ * @param backoff the inbound integer that will be carry the backoff time if it
483
+ * is available.
484
+ *
485
+ * @return LORAWAN_STATUS_OK if the meta-data regarding backoff is available,
486
+ * otherwise LORAWAN_STATUS_METADATA_NOT_AVAILABLE is returned.
487
+ *
488
+ */
489
+ virtual lorawan_status_t get_backoff_metadata (int &backoff);
490
+
491
+ /* * Cancel outgoing transmission
492
+ *
493
+ * This API is used to cancel any outstanding transmission in the TX pipe.
494
+ * If an event for transmission is not already queued at the end of backoff timer,
495
+ * the system can cancel the outstanding outgoing packet. Otherwise, the system is
496
+ * busy sending and can't be held back. The system will not try to re-send if the
497
+ * outgoing message was a CONFIRMED message even if the ack is not received.
498
+ *
499
+ * @return LORAWAN_STATUS_OK if the sending is cancelled.
500
+ * LORAWAN_STATUS_BUSY otherwise.
501
+ *
502
+ */
503
+ virtual lorawan_status_t cancel_sending (void );
504
+
439
505
void lock (void ) { _lw_stack.lock (); }
440
506
void unlock (void ) { _lw_stack.unlock (); }
441
507
0 commit comments