Skip to content

Commit 7224fba

Browse files
author
Hasnain Virk
committed
Style Changes in MAC layer
Style changed according to Mbed-OS guidelines.
1 parent 20bce2f commit 7224fba

File tree

12 files changed

+1578
-1705
lines changed

12 files changed

+1578
-1705
lines changed

features/lorawan/LoRaWANStack.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ LoRaWANStack& LoRaWANStack::get_lorawan_stack()
130130
radio_events_t *LoRaWANStack::bind_radio_driver(LoRaRadio& radio)
131131
{
132132
// Store pointer to callback routines inside MAC layer (non-IRQ safe)
133-
_mac_handlers = _loramac.GetPhyEventHandlers();
133+
_mac_handlers = _loramac.get_phy_event_handlers();
134134
// passes the reference to radio driver down to PHY layer
135135
_lora_phy.set_radio_instance(radio);
136136
return _mac_handlers;
@@ -154,7 +154,7 @@ lorawan_status_t LoRaWANStack::initialize_mac_layer(EventQueue *queue)
154154
#endif
155155

156156
_lora_time.activate_timer_subsystem(queue);
157-
_loramac.LoRaMacInitialization(&LoRaMacPrimitives, &_lora_phy, queue);
157+
_loramac.initialize(&LoRaMacPrimitives, &_lora_phy, queue);
158158

159159
loramac_mib_req_confirm_t mib_req;
160160

@@ -267,7 +267,7 @@ lorawan_status_t LoRaWANStack::send_compliance_test_frame_to_mac()
267267
uint16_t LoRaWANStack::check_possible_tx_size(uint16_t size)
268268
{
269269
loramac_tx_info_t tx_info;
270-
if (_loramac.LoRaMacQueryTxPossible(size, &tx_info) == LORAWAN_STATUS_LENGTH_ERROR) {
270+
if (_loramac.query_tx_possible(size, &tx_info) == LORAWAN_STATUS_LENGTH_ERROR) {
271271
// Cannot transmit this much. Return how much data can be sent
272272
// at the moment
273273
return tx_info.max_possible_payload_size;
@@ -404,7 +404,7 @@ lorawan_status_t LoRaWANStack::add_channels(const lorawan_channelplan_t &channel
404404
return LORAWAN_STATUS_NOT_INITIALIZED;
405405
}
406406

407-
return _loramac.AddChannelPlan(channel_plan);
407+
return _loramac.add_channel_plan(channel_plan);
408408
}
409409

410410
lorawan_status_t LoRaWANStack::drop_channel_list()
@@ -414,7 +414,7 @@ lorawan_status_t LoRaWANStack::drop_channel_list()
414414
return LORAWAN_STATUS_NOT_INITIALIZED;
415415
}
416416

417-
return _loramac.RemoveChannelPlan();
417+
return _loramac.remove_channel_plan();
418418
}
419419

420420
lorawan_status_t LoRaWANStack::remove_a_channel(uint8_t channel_id)
@@ -425,7 +425,7 @@ lorawan_status_t LoRaWANStack::remove_a_channel(uint8_t channel_id)
425425
return LORAWAN_STATUS_NOT_INITIALIZED;
426426
}
427427

428-
return _loramac.RemoveSingleChannel(channel_id);
428+
return _loramac.remove_single_channel(channel_id);
429429
}
430430

431431
lorawan_status_t LoRaWANStack::get_enabled_channels(lorawan_channelplan_t& channel_plan)
@@ -438,7 +438,7 @@ lorawan_status_t LoRaWANStack::get_enabled_channels(lorawan_channelplan_t& chann
438438
return LORAWAN_STATUS_BUSY;
439439
}
440440

441-
return _loramac.GetChannelPlan(channel_plan);
441+
return _loramac.get_channel_plan(channel_plan);
442442
}
443443

444444
lorawan_status_t LoRaWANStack::enable_adaptive_datarate(bool adr_enabled)
@@ -771,7 +771,7 @@ lorawan_status_t LoRaWANStack::mlme_request_handler(loramac_mlme_req_t *mlme_req
771771
return LORAWAN_STATUS_PARAMETER_INVALID;
772772
}
773773

774-
return _loramac.LoRaMacMlmeRequest(mlme_request);
774+
return _loramac.mlme_request(mlme_request);
775775
}
776776

777777
/** MLME-Confirm event function
@@ -843,7 +843,7 @@ lorawan_status_t LoRaWANStack::mcps_request_handler(loramac_mcps_req_t *mcps_req
843843
return LORAWAN_STATUS_PARAMETER_INVALID;
844844
}
845845

846-
return _loramac.LoRaMacMcpsRequest(mcps_request);
846+
return _loramac.mcps_request(mcps_request);
847847
}
848848

849849
/** MCPS-Confirm event function
@@ -1154,15 +1154,15 @@ lorawan_status_t LoRaWANStack::mib_set_request(loramac_mib_req_confirm_t *mib_se
11541154
if (NULL == mib_set_params) {
11551155
return LORAWAN_STATUS_PARAMETER_INVALID;
11561156
}
1157-
return _loramac.LoRaMacMibSetRequestConfirm(mib_set_params);
1157+
return _loramac.mib_set_request_confirm(mib_set_params);
11581158
}
11591159

11601160
lorawan_status_t LoRaWANStack::mib_get_request(loramac_mib_req_confirm_t *mib_get_params)
11611161
{
11621162
if(NULL == mib_get_params) {
11631163
return LORAWAN_STATUS_PARAMETER_INVALID;
11641164
}
1165-
return _loramac.LoRaMacMibGetRequestConfirm(mib_get_params);
1165+
return _loramac.mib_get_request_confirm(mib_get_params);
11661166
}
11671167

11681168
lorawan_status_t LoRaWANStack::set_link_check_request()

0 commit comments

Comments
 (0)