@@ -44,15 +44,15 @@ class LoRaWANInterface: public LoRaWANBase {
44
44
*
45
45
* @return 0 on success, a negative error code on failure.
46
46
*/
47
- virtual lora_mac_status_t initialize (events::EventQueue *ev_queue) ;
47
+ virtual lorawan_status_t initialize (events::EventQueue *ev_queue) ;
48
48
49
49
/* * Connect OTAA or ABP using Mbed-OS config system
50
50
*
51
51
* Connect by Over The Air Activation or Activation By Personalization.
52
52
* You need to configure the connection properly via the Mbed OS configuration
53
53
* system.
54
54
*
55
- * When connecting via OTAA, the return code for success (LORA_MAC_STATUS_CONNECT_IN_PROGRESS ) is negative.
55
+ * When connecting via OTAA, the return code for success (LORAWAN_STATUS_CONNECT_IN_PROGRESS ) is negative.
56
56
* However, this is not a real error. It tells you that the connection is in progress and you will
57
57
* be notified of the completion via an event. By default, after the Join Accept message
58
58
* is received, base stations may provide the node with a CF-List that replaces
@@ -78,17 +78,17 @@ class LoRaWANInterface: public LoRaWANBase {
78
78
* is important, at least for ABP. That's why we try to restore frame counters from
79
79
* session information after a disconnection.
80
80
*
81
- * @return LORA_MAC_STATUS_OK or LORA_MAC_STATUS_CONNECT_IN_PROGRESS
81
+ * @return LORAWAN_STATUS_OK or LORAWAN_STATUS_CONNECT_IN_PROGRESS
82
82
* on success, or a negative error code on failure.
83
83
*/
84
- virtual lora_mac_status_t connect ();
84
+ virtual lorawan_status_t connect ();
85
85
86
86
/* * Connect OTAA or ABP with parameters
87
87
*
88
88
* All connection parameters are chosen by the user and provided in the
89
89
* data structure passed down.
90
90
*
91
- * When connecting via OTAA, the return code for success (LORA_MAC_STATUS_CONNECT_IN_PROGRESS ) is negative.
91
+ * When connecting via OTAA, the return code for success (LORAWAN_STATUS_CONNECT_IN_PROGRESS ) is negative.
92
92
* However, this is not a real error. It tells you that connection is in progress and you will
93
93
* be notified of completion via an event. By default, after Join Accept message
94
94
* is received, base stations may provide the node with a CF-List which replaces
@@ -118,17 +118,17 @@ class LoRaWANInterface: public LoRaWANBase {
118
118
*
119
119
* @param connect Options for an end device connection to the gateway.
120
120
*
121
- * @return LORA_MAC_STATUS_OK or LORA_MAC_STATUS_CONNECT_IN_PROGRESS ,
121
+ * @return LORAWAN_STATUS_OK or LORAWAN_STATUS_CONNECT_IN_PROGRESS ,
122
122
* a negative error code on failure.
123
123
*/
124
- virtual lora_mac_status_t connect (const lorawan_connect_t &connect);
124
+ virtual lorawan_status_t connect (const lorawan_connect_t &connect);
125
125
126
126
/* * Disconnect the current session.
127
127
*
128
- * @return LORA_MAC_STATUS_OK on success, a negative error code on
128
+ * @return LORAWAN_STATUS_OK on success, a negative error code on
129
129
* failure.
130
130
*/
131
- virtual lora_mac_status_t disconnect ();
131
+ virtual lorawan_status_t disconnect ();
132
132
133
133
/* * Validate the connectivity with the network.
134
134
*
@@ -145,7 +145,7 @@ class LoRaWANInterface: public LoRaWANBase {
145
145
*
146
146
* This API is usable only when the 'link_check_resp' callback is set by
147
147
* the application. See add_lora_app_callbacks API. If the above mentioned
148
- * callback is not set, a LORA_MAC_STATUS_PARAMETER_INVALID error is thrown.
148
+ * callback is not set, a LORAWAN_STATUS_PARAMETER_INVALID error is thrown.
149
149
*
150
150
* First parameter to callback function is the demodulation margin and
151
151
* the second parameter is the number of gateways that successfully received
@@ -155,11 +155,11 @@ class LoRaWANInterface: public LoRaWANBase {
155
155
* transmission, until/unless application explicitly turns it off using
156
156
* remove_link_check_request() API.
157
157
*
158
- * @return LORA_MAC_STATUS_OK on successfully queuing a request, or
158
+ * @return LORAWAN_STATUS_OK on successfully queuing a request, or
159
159
* a negative error code on failure.
160
160
*
161
161
*/
162
- virtual lora_mac_status_t add_link_check_request ();
162
+ virtual lorawan_status_t add_link_check_request ();
163
163
164
164
/* * Removes link check request sticky MAC command.
165
165
*
@@ -176,28 +176,28 @@ class LoRaWANInterface: public LoRaWANBase {
176
176
* @param data_rate The intended data rate, for example DR_0 or DR_1.
177
177
* Please note, that the macro DR_* can mean different
178
178
* things in different regions.
179
- * @return LORA_MAC_STATUS_OK if everything goes well, otherwise
179
+ * @return LORAWAN_STATUS_OK if everything goes well, otherwise
180
180
* a negative error code.
181
181
*/
182
- virtual lora_mac_status_t set_datarate (uint8_t data_rate);
182
+ virtual lorawan_status_t set_datarate (uint8_t data_rate);
183
183
184
184
/* * Enables adaptive data rate (ADR).
185
185
*
186
186
* The underlying LoRaPHY and LoRaMac layers handle the data rate automatically
187
187
* for the user, based upon the radio conditions (network congestion).
188
188
*
189
- * @return LORA_MAC_STATUS_OK or negative error code otherwise.
189
+ * @return LORAWAN_STATUS_OK or negative error code otherwise.
190
190
*/
191
- virtual lora_mac_status_t enable_adaptive_datarate ();
191
+ virtual lorawan_status_t enable_adaptive_datarate ();
192
192
193
193
/* * Disables adaptive data rate.
194
194
*
195
195
* When adaptive data rate (ADR) is disabled, you can either set a certain
196
196
* data rate or the MAC layer selects a default value.
197
197
*
198
- * @return LORA_MAC_STATUS_OK or negative error code otherwise.
198
+ * @return LORAWAN_STATUS_OK or negative error code otherwise.
199
199
*/
200
- virtual lora_mac_status_t disable_adaptive_datarate ();
200
+ virtual lorawan_status_t disable_adaptive_datarate ();
201
201
202
202
/* * Sets up the retry counter for confirmed messages.
203
203
*
@@ -212,9 +212,9 @@ class LoRaWANInterface: public LoRaWANBase {
212
212
*
213
213
* @param count The number of retries for confirmed messages.
214
214
*
215
- * @return LORA_MAC_STATUS_OK or a negative error code.
215
+ * @return LORAWAN_STATUS_OK or a negative error code.
216
216
*/
217
- virtual lora_mac_status_t set_confirmed_msg_retries (uint8_t count);
217
+ virtual lorawan_status_t set_confirmed_msg_retries (uint8_t count);
218
218
219
219
/* * Sets the channel plan.
220
220
*
@@ -240,10 +240,10 @@ class LoRaWANInterface: public LoRaWANBase {
240
240
*
241
241
* @param channel_plan The channel plan to set.
242
242
*
243
- * @return LORA_MAC_STATUS_OK on success, a negative error
243
+ * @return LORAWAN_STATUS_OK on success, a negative error
244
244
* code on failure.
245
245
*/
246
- virtual lora_mac_status_t set_channel_plan (const lora_channelplan_t &channel_plan);
246
+ virtual lorawan_status_t set_channel_plan (const lorawan_channelplan_t &channel_plan);
247
247
248
248
/* * Gets the channel plans from the LoRa stack.
249
249
*
@@ -254,31 +254,31 @@ class LoRaWANInterface: public LoRaWANBase {
254
254
*
255
255
* @param channel_plan The current channel plan information.
256
256
*
257
- * @return LORA_MAC_STATUS_OK on success, a negative error
257
+ * @return LORAWAN_STATUS_OK on success, a negative error
258
258
* code on failure.
259
259
*/
260
- virtual lora_mac_status_t get_channel_plan (lora_channelplan_t &channel_plan);
260
+ virtual lorawan_status_t get_channel_plan (lorawan_channelplan_t &channel_plan);
261
261
262
262
/* * Removes an active channel plan.
263
263
*
264
264
* You cannot remove default channels (the channels the base stations are listening to).
265
265
* When a plan is abolished, only the non-default channels are removed.
266
266
*
267
- * @return LORA_MAC_STATUS_OK on success, a negative error
267
+ * @return LORAWAN_STATUS_OK on success, a negative error
268
268
* code on failure.
269
269
*/
270
- virtual lora_mac_status_t remove_channel_plan ();
270
+ virtual lorawan_status_t remove_channel_plan ();
271
271
272
272
/* * Removes a single channel.
273
273
*
274
274
* You cannot remove default channels (the channels the base stations are listening to).
275
275
*
276
276
* @param index The channel index.
277
277
*
278
- * @return LORA_MAC_STATUS_OK on success, a negative error
278
+ * @return LORAWAN_STATUS_OK on success, a negative error
279
279
* code on failure.
280
280
*/
281
- virtual lora_mac_status_t remove_channel (uint8_t index);
281
+ virtual lorawan_status_t remove_channel (uint8_t index);
282
282
283
283
/* * Send message to gateway
284
284
*
@@ -311,7 +311,7 @@ class LoRaWANInterface: public LoRaWANBase {
311
311
*
312
312
*
313
313
* @return The number of bytes sent, or
314
- * LORA_MAC_STATUS_WOULD_BLOCK if another TX is
314
+ * LORAWAN_STATUS_WOULD_BLOCK if another TX is
315
315
* ongoing, or a negative error code on failure.
316
316
*/
317
317
virtual int16_t send (uint8_t port, const uint8_t * data, uint16_t length,
@@ -352,7 +352,7 @@ class LoRaWANInterface: public LoRaWANBase {
352
352
* @return It could be one of these:
353
353
* i) 0 if there is nothing else to read.
354
354
* ii) Number of bytes written to user buffer.
355
- * iii) LORA_MAC_STATUS_WOULD_BLOCK if there is
355
+ * iii) LORAWAN_STATUS_WOULD_BLOCK if there is
356
356
* nothing available to read at the moment.
357
357
* iv) A negative error code on failure.
358
358
*/
@@ -427,7 +427,7 @@ class LoRaWANInterface: public LoRaWANBase {
427
427
* @param callbacks A pointer to the structure containing application
428
428
* callbacks.
429
429
*/
430
- virtual lora_mac_status_t add_app_callbacks (lorawan_app_callbacks_t *callbacks);
430
+ virtual lorawan_status_t add_app_callbacks (lorawan_app_callbacks_t *callbacks);
431
431
432
432
private:
433
433
bool _link_check_requested;
0 commit comments