Skip to content

Commit 223e6a2

Browse files
author
Kimmo Vaisanen
committed
Lora: Change visibility of LoRaMac internal methods as private
Some LoRaMac methods were defined as public even though there were used only internally. Also removed definition of some methods which were not even implemented nor used.
1 parent f15dbf2 commit 223e6a2

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)
@@ -487,10 +425,36 @@ class LoRaMac {
487425
#endif
488426

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

495459
/**
496460
* Handles a Join Accept frame
@@ -628,6 +592,11 @@ class LoRaMac {
628592
float max_eirp, float antenna_gain, uint16_t timeout);
629593

630594
private:
595+
typedef mbed::ScopedLock<LoRaMac> Lock;
596+
#if MBED_CONF_RTOS_PRESENT
597+
rtos::Mutex _mutex;
598+
#endif
599+
631600
/**
632601
* Timer subsystem handle
633602
*/

0 commit comments

Comments
 (0)