Skip to content

Commit 781573a

Browse files
authored
Merge pull request #7839 from kivaisan/change_loramac_internal_methods_as_private
Lora: Change visibility of LoRaMac internal methods as private
2 parents 582b414 + 223e6a2 commit 781573a

File tree

1 file changed

+35
-66
lines changed

1 file changed

+35
-66
lines changed

features/lorawan/lorastack/mac/LoRaMac.h

Lines changed: 35 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -96,32 +96,12 @@ class LoRaMac {
9696
*/
9797
void disconnect(void);
9898

99-
/**
100-
* @brief Queries the LoRaMAC the maximum possible FRMPayload size to send.
101-
* The LoRaMAC takes the scheduled MAC commands into account and returns
102-
* corresponding value.
103-
*
104-
* @param fopts_len [in] Number of mac commands in the queue pending.
105-
*
106-
* @return Size of the biggest packet that can be sent.
107-
* Please note that if the size of the MAC commands in the queue do
108-
* not fit into the payload size on the related datarate, the LoRaMAC will
109-
* omit the MAC commands.
110-
*/
111-
uint8_t get_max_possible_tx_size(uint8_t fopts_len);
112-
11399
/**
114100
* @brief nwk_joined Checks if device has joined to network
115101
* @return True if joined to network, false otherwise
116102
*/
117103
bool nwk_joined();
118104

119-
/**
120-
* @brief set_nwk_joined This is used for ABP mode for which real joining does not happen
121-
* @param joined True if device has joined in network, false otherwise
122-
*/
123-
void set_nwk_joined(bool joined);
124-
125105
/**
126106
* @brief Adds a channel plan to the system.
127107
*
@@ -219,12 +199,6 @@ class LoRaMac {
219199
*/
220200
void bind_phy(LoRaPHY &phy);
221201

222-
/**
223-
* @brief Configures the events to trigger an MLME-Indication with
224-
* a MLME type of MLME_SCHEDULE_UPLINK.
225-
*/
226-
void set_mlme_schedule_ul_indication(void);
227-
228202
/**
229203
* @brief Schedules the frame for sending.
230204
*
@@ -243,37 +217,6 @@ class LoRaMac {
243217
lorawan_status_t send(loramac_mhdr_t *mac_hdr, const uint8_t fport,
244218
const void *fbuffer, uint16_t fbuffer_size);
245219

246-
/**
247-
* @brief Puts the system in continuous transmission mode
248-
*
249-
* @remark Uses the radio parameters set on the previous transmission.
250-
*
251-
* @param [in] timeout Time in seconds while the radio is kept in continuous wave mode
252-
*
253-
* @return status Status of the operation. LORAWAN_STATUS_OK in case
254-
* of success and a negative error code in case of
255-
* failure.
256-
*/
257-
lorawan_status_t set_tx_continuous_wave(uint16_t timeout);
258-
259-
/**
260-
* @brief Puts the system in continuous transmission mode
261-
*
262-
* @param [in] timeout Time in seconds while the radio is kept in continuous wave mode
263-
* @param [in] frequency RF frequency to be set.
264-
* @param [in] power RF output power to be set.
265-
*
266-
* @return status Status of the operation. LORAWAN_STATUS_OK in case
267-
* of success and a negative error code in case of
268-
* failure.
269-
*/
270-
lorawan_status_t set_tx_continuous_wave1(uint16_t timeout, uint32_t frequency, uint8_t power);
271-
272-
/**
273-
* @brief Resets MAC specific parameters to default
274-
*/
275-
void reset_mac_parameters(void);
276-
277220
/**
278221
* @brief get_default_tx_datarate Gets the default TX datarate
279222
* @return default TX datarate.
@@ -357,11 +300,6 @@ class LoRaMac {
357300
void set_device_class(const device_class_t &device_class,
358301
mbed::Callback<void(void)>ack_expiry_handler);
359302

360-
/**
361-
* @brief opens a continuous RX2 window for Class C devices
362-
*/
363-
void open_continuous_rx_window(void);
364-
365303
/**
366304
* @brief setup_link_check_request Adds link check request command
367305
* to be put on next outgoing message (when it fits)
@@ -489,10 +427,36 @@ class LoRaMac {
489427
#endif
490428

491429
private:
492-
typedef mbed::ScopedLock<LoRaMac> Lock;
493-
#if MBED_CONF_RTOS_PRESENT
494-
rtos::Mutex _mutex;
495-
#endif
430+
/**
431+
* @brief Queries the LoRaMAC the maximum possible FRMPayload size to send.
432+
* The LoRaMAC takes the scheduled MAC commands into account and returns
433+
* corresponding value.
434+
*
435+
* @param fopts_len [in] Number of mac commands in the queue pending.
436+
*
437+
* @return Size of the biggest packet that can be sent.
438+
* Please note that if the size of the MAC commands in the queue do
439+
* not fit into the payload size on the related datarate, the LoRaMAC will
440+
* omit the MAC commands.
441+
*/
442+
uint8_t get_max_possible_tx_size(uint8_t fopts_len);
443+
444+
/**
445+
* @brief set_nwk_joined This is used for ABP mode for which real joining does not happen
446+
* @param joined True if device has joined in network, false otherwise
447+
*/
448+
void set_nwk_joined(bool joined);
449+
450+
/**
451+
* @brief Configures the events to trigger an MLME-Indication with
452+
* a MLME type of MLME_SCHEDULE_UPLINK.
453+
*/
454+
void set_mlme_schedule_ul_indication(void);
455+
456+
/**
457+
* @brief Resets MAC specific parameters to default
458+
*/
459+
void reset_mac_parameters(void);
496460

497461
/**
498462
* Handles a Join Accept frame
@@ -630,6 +594,11 @@ class LoRaMac {
630594
float max_eirp, float antenna_gain, uint16_t timeout);
631595

632596
private:
597+
typedef mbed::ScopedLock<LoRaMac> Lock;
598+
#if MBED_CONF_RTOS_PRESENT
599+
rtos::Mutex _mutex;
600+
#endif
601+
633602
/**
634603
* Timer subsystem handle
635604
*/

0 commit comments

Comments
 (0)