45
45
#include " lorawan/system/lorawan_data_structures.h"
46
46
#include " LoRaMacCommand.h"
47
47
#include " events/EventQueue.h"
48
- #include " LoRaMacMlme.h"
49
- #include " LoRaMacMcps.h"
50
48
#include " LoRaMacChannelPlan.h"
51
49
#include " loraphy_target.h"
52
50
@@ -104,7 +102,7 @@ class LoRaMac {
104
102
* not fit into the payload size on the related datarate, the LoRaMAC will
105
103
* omit the MAC commands.
106
104
*/
107
- uint8_t query_tx_possible (uint8_t size);
105
+ uint8_t get_max_possible_tx_size (uint8_t size);
108
106
109
107
/* *
110
108
* @brief nwk_joined Checks if device has joined to network
@@ -292,9 +290,8 @@ class LoRaMac {
292
290
/* *
293
291
* @brief enable_adaptive_datarate Enables or disables adaptive datarate.
294
292
* @param adr_enabled Flag indicating is adr enabled or disabled.
295
- * @return LORAWAN_STATUS_OK or a negative error code on failure.
296
293
*/
297
- lorawan_status_t enable_adaptive_datarate (bool adr_enabled);
294
+ void enable_adaptive_datarate (bool adr_enabled);
298
295
299
296
/* * Sets up the data rate.
300
297
*
@@ -491,6 +488,28 @@ class LoRaMac {
491
488
*/
492
489
lorawan_status_t send_frame_on_channel (uint8_t channel);
493
490
491
+ /* *
492
+ * @brief reset_mcps_confirmation Resets the MCPS confirmation struct
493
+ */
494
+ void reset_mcps_confirmation ();
495
+
496
+ /* *
497
+ * @brief reset_mlme_confirmation Resets the MLME confirmation struct
498
+ */
499
+ void reset_mlme_confirmation ();
500
+
501
+ /* *
502
+ * @brief set_tx_continuous_wave Puts the system in continuous transmission mode
503
+ * @param [in] channel A Channel to use
504
+ * @param [in] datarate A datarate to use
505
+ * @param [in] tx_power A RF output power to use
506
+ * @param [in] max_eirp A maximum possible EIRP to use
507
+ * @param [in] antenna_gain Antenna gain to use
508
+ * @param [in] timeout Time in seconds while the radio is kept in continuous wave mode
509
+ */
510
+ void set_tx_continuous_wave (uint8_t channel, int8_t datarate, int8_t tx_power,
511
+ float max_eirp, float antenna_gain, uint16_t timeout);
512
+
494
513
/* *
495
514
* Prototypes for ISR handlers
496
515
*/
@@ -518,16 +537,6 @@ class LoRaMac {
518
537
*/
519
538
LoRaMacCommand mac_commands;
520
539
521
- /* *
522
- * MLME subsystem handle
523
- */
524
- LoRaMacMlme mlme;
525
-
526
- /* *
527
- * MCPS subsystem handle
528
- */
529
- LoRaMacMcps mcps;
530
-
531
540
/* *
532
541
* Channel planning subsystem
533
542
*/
@@ -553,6 +562,26 @@ class LoRaMac {
553
562
*/
554
563
events::EventQueue *ev_queue;
555
564
565
+ /* *
566
+ * Structure to hold MCPS indication data.
567
+ */
568
+ loramac_mcps_indication_t _mcps_indication;
569
+
570
+ /* *
571
+ * Structure to hold MCPS confirm data.
572
+ */
573
+ loramac_mcps_confirm_t _mcps_confirmation;
574
+
575
+ /* *
576
+ * Structure to hold MLME indication data.
577
+ */
578
+ loramac_mlme_indication_t _mlme_indication;
579
+
580
+ /* *
581
+ * Structure to hold MLME confirm data.
582
+ */
583
+ loramac_mlme_confirm_t _mlme_confirmation;
584
+
556
585
loramac_tx_message_t _ongoing_tx_msg;
557
586
558
587
bool _is_nwk_joined;
0 commit comments