Skip to content

Commit 2b95fd3

Browse files
author
Hasnain Virk
committed
Removing virtual modifier from LoRaWANInterface
Doing away with virtual modifier from LoRaWANInterface, gets rid of vtable for LoRaWANInterface.
1 parent ef1baa3 commit 2b95fd3

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

features/lorawan/LoRaWANInterface.h

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class LoRaWANInterface {
4949
*/
5050
LoRaWANInterface(LoRaRadio &radio, LoRaPHY &phy);
5151

52-
virtual ~LoRaWANInterface();
52+
~LoRaWANInterface();
5353

5454
/** Initialize the LoRa stack.
5555
*
@@ -60,7 +60,7 @@ class LoRaWANInterface {
6060
* @return LORAWAN_STATUS_OK on success, a negative error code on failure:
6161
* LORAWAN_STATUS_PARAMETER_INVALID is NULL queue is given.
6262
*/
63-
virtual lorawan_status_t initialize(events::EventQueue *queue);
63+
lorawan_status_t initialize(events::EventQueue *queue);
6464

6565
/** Connect OTAA or ABP using the Mbed OS config system
6666
*
@@ -104,7 +104,7 @@ class LoRaWANInterface {
104104
* LORAWAN_STATUS_ALREADY_CONNECTED (if a network was already joined successfully).
105105
* A 'CONNECTED' event is sent to the application when the JoinAccept is received.
106106
*/
107-
virtual lorawan_status_t connect();
107+
lorawan_status_t connect();
108108

109109
/** Connect OTAA or ABP with parameters
110110
*
@@ -149,14 +149,14 @@ class LoRaWANInterface {
149149
* (if a network was already joined successfully).
150150
* A 'CONNECTED' event is sent to the application when the JoinAccept is received.
151151
*/
152-
virtual lorawan_status_t connect(const lorawan_connect_t &connect);
152+
lorawan_status_t connect(const lorawan_connect_t &connect);
153153

154154
/** Disconnect the current session.
155155
*
156156
* @return LORAWAN_STATUS_DEVICE_OFF on success, a negative error code on failure:
157157
* LORAWAN_STATUS_NOT_INITIALIZED if system is not initialized with initialize(),
158158
*/
159-
virtual lorawan_status_t disconnect();
159+
lorawan_status_t disconnect();
160160

161161
/** Validate the connectivity with the network.
162162
*
@@ -185,13 +185,13 @@ class LoRaWANInterface {
185185
* LORAWAN_STATUS_PARAMETER_INVALID if link_check_resp callback method is not set.
186186
*
187187
*/
188-
virtual lorawan_status_t add_link_check_request();
188+
lorawan_status_t add_link_check_request();
189189

190190
/** Removes link check request sticky MAC command.
191191
*
192192
* Any already queued request may still be completed. However, no new requests will be made.
193193
*/
194-
virtual void remove_link_check_request();
194+
void remove_link_check_request();
195195

196196
/** Sets up a particular data rate
197197
*
@@ -201,7 +201,7 @@ class LoRaWANInterface {
201201
* LORAWAN_STATUS_NOT_INITIALIZED if system is not initialized with initialize(),
202202
* LORAWAN_STATUS_PARAMETER_INVALID if ADR is enabled or invalid data rate is given
203203
*/
204-
virtual lorawan_status_t set_datarate(uint8_t data_rate);
204+
lorawan_status_t set_datarate(uint8_t data_rate);
205205

206206
/** Enables adaptive data rate (ADR)
207207
*
@@ -211,7 +211,7 @@ class LoRaWANInterface {
211211
* @return LORAWAN_STATUS_OK on success, negative error code on failure:
212212
* LORAWAN_STATUS_NOT_INITIALIZED if system is not initialized with initialize()
213213
*/
214-
virtual lorawan_status_t enable_adaptive_datarate();
214+
lorawan_status_t enable_adaptive_datarate();
215215

216216
/** Disables adaptive data rate
217217
*
@@ -221,7 +221,7 @@ class LoRaWANInterface {
221221
* @return LORAWAN_STATUS_OK on success, negative error code on failure:
222222
* LORAWAN_STATUS_NOT_INITIALIZED if system is not initialized with initialize()
223223
*/
224-
virtual lorawan_status_t disable_adaptive_datarate();
224+
lorawan_status_t disable_adaptive_datarate();
225225

226226
/** Sets up the retry counter for confirmed messages.
227227
*
@@ -240,7 +240,7 @@ class LoRaWANInterface {
240240
* LORAWAN_STATUS_NOT_INITIALIZED if system is not initialized with initialize()
241241
* LORAWAN_STATUS_PARAMETER_INVALID if count >= 255
242242
*/
243-
virtual lorawan_status_t set_confirmed_msg_retries(uint8_t count);
243+
lorawan_status_t set_confirmed_msg_retries(uint8_t count);
244244

245245
/** Sets the channel plan.
246246
*
@@ -272,7 +272,7 @@ class LoRaWANInterface {
272272
* LORAWAN_STATUS_BUSY if TX currently ongoing,
273273
* LORAWAN_STATUS_SERVICE_UNKNOWN if custom channel plans are disabled in PHY
274274
*/
275-
virtual lorawan_status_t set_channel_plan(const lorawan_channelplan_t &channel_plan);
275+
lorawan_status_t set_channel_plan(const lorawan_channelplan_t &channel_plan);
276276

277277
/** Gets the channel plans from the LoRa stack.
278278
*
@@ -286,7 +286,7 @@ class LoRaWANInterface {
286286
* LORAWAN_STATUS_NOT_INITIALIZED if system is not initialized with initialize(),
287287
* LORAWAN_STATUS_SERVICE_UNKNOWN if custom channel plans are disabled in PHY
288288
*/
289-
virtual lorawan_status_t get_channel_plan(lorawan_channelplan_t &channel_plan);
289+
lorawan_status_t get_channel_plan(lorawan_channelplan_t &channel_plan);
290290

291291
/** Removes an active channel plan.
292292
*
@@ -298,7 +298,7 @@ class LoRaWANInterface {
298298
* LORAWAN_STATUS_BUSY if TX currently ongoing,
299299
* LORAWAN_STATUS_SERVICE_UNKNOWN if custom channel plans are disabled in PHY
300300
*/
301-
virtual lorawan_status_t remove_channel_plan();
301+
lorawan_status_t remove_channel_plan();
302302

303303
/** Removes a single channel.
304304
*
@@ -312,7 +312,7 @@ class LoRaWANInterface {
312312
* LORAWAN_STATUS_BUSY if TX currently ongoing,
313313
* LORAWAN_STATUS_SERVICE_UNKNOWN if custom channel plans are disabled in PHY
314314
*/
315-
virtual lorawan_status_t remove_channel(uint8_t index);
315+
lorawan_status_t remove_channel(uint8_t index);
316316

317317
/** Send message to gateway
318318
*
@@ -341,7 +341,7 @@ class LoRaWANInterface {
341341
* LORAWAN_STATUS_PORT_INVALID if trying to send to an invalid port (e.g. to 0)
342342
* LORAWAN_STATUS_PARAMETER_INVALID if NULL data pointer is given or flags are invalid.
343343
*/
344-
virtual int16_t send(uint8_t port, const uint8_t *data,
344+
int16_t send(uint8_t port, const uint8_t *data,
345345
uint16_t length, int flags);
346346

347347
/** Receives a message from the Network Server on a specific port.
@@ -378,7 +378,7 @@ class LoRaWANInterface {
378378
* LORAWAN_STATUS_PARAMETER_INVALID if NULL data or length is given,
379379
* LORAWAN_STATUS_WOULD_BLOCK if incorrect port or flags are given,
380380
*/
381-
virtual int16_t receive(uint8_t port, uint8_t *data, uint16_t length, int flags);
381+
int16_t receive(uint8_t port, uint8_t *data, uint16_t length, int flags);
382382

383383
/** Receives a message from the Network Server on any port.
384384
*
@@ -403,7 +403,7 @@ class LoRaWANInterface {
403403
* LORAWAN_STATUS_PARAMETER_INVALID if NULL data or length is given,
404404
* LORAWAN_STATUS_WOULD_BLOCK if there is nothing available to read at the moment.
405405
*/
406-
virtual int16_t receive(uint8_t *data, uint16_t length, uint8_t &port, int &flags);
406+
int16_t receive(uint8_t *data, uint16_t length, uint8_t &port, int &flags);
407407

408408
/** Add application callbacks to the stack.
409409
*
@@ -444,7 +444,7 @@ class LoRaWANInterface {
444444
* LORAWAN_STATUS_NOT_INITIALIZED if system is not initialized with initialize(),
445445
* LORAWAN_STATUS_PARAMETER_INVALID if events callback is not set
446446
*/
447-
virtual lorawan_status_t add_app_callbacks(lorawan_app_callbacks_t *callbacks);
447+
lorawan_status_t add_app_callbacks(lorawan_app_callbacks_t *callbacks);
448448

449449
/** Change device class
450450
*
@@ -456,7 +456,7 @@ class LoRaWANInterface {
456456
* LORAWAN_STATUS_NOT_INITIALIZED if system is not initialized with initialize(),
457457
* LORAWAN_STATUS_UNSUPPORTED if requested class is not supported
458458
*/
459-
virtual lorawan_status_t set_device_class(device_class_t device_class);
459+
lorawan_status_t set_device_class(device_class_t device_class);
460460

461461
/** Get hold of TX meta-data
462462
*
@@ -471,7 +471,7 @@ class LoRaWANInterface {
471471
* LORAWAN_STATUS_NOT_INITIALIZED if system is not initialized with initialize(),
472472
* LORAWAN_STATUS_METADATA_NOT_AVAILABLE if the meta-data is not available
473473
*/
474-
virtual lorawan_status_t get_tx_metadata(lorawan_tx_metadata &metadata);
474+
lorawan_status_t get_tx_metadata(lorawan_tx_metadata &metadata);
475475

476476
/** Get hold of RX meta-data
477477
*
@@ -486,7 +486,7 @@ class LoRaWANInterface {
486486
* LORAWAN_STATUS_NOT_INITIALIZED if system is not initialized with initialize(),
487487
* LORAWAN_STATUS_METADATA_NOT_AVAILABLE if the meta-data is not available
488488
*/
489-
virtual lorawan_status_t get_rx_metadata(lorawan_rx_metadata &metadata);
489+
lorawan_status_t get_rx_metadata(lorawan_rx_metadata &metadata);
490490

491491
/** Get hold of backoff time
492492
*
@@ -505,7 +505,7 @@ class LoRaWANInterface {
505505
* LORAWAN_STATUS_NOT_INITIALIZED if system is not initialized with initialize(),
506506
* LORAWAN_STATUS_METADATA_NOT_AVAILABLE if the meta-data is not available
507507
*/
508-
virtual lorawan_status_t get_backoff_metadata(int &backoff);
508+
lorawan_status_t get_backoff_metadata(int &backoff);
509509

510510
/** Cancel outgoing transmission
511511
*
@@ -521,7 +521,7 @@ class LoRaWANInterface {
521521
* LORAWAN_STATUS_BUSY if the send cannot be canceled
522522
* LORAWAN_STATUS_NO_OP if the operation cannot be completed (nothing to cancel)
523523
*/
524-
virtual lorawan_status_t cancel_sending(void);
524+
lorawan_status_t cancel_sending(void);
525525

526526
void lock(void)
527527
{

0 commit comments

Comments
 (0)