Kenji Arai / TYBLE16_mbedlized_os5_several_examples_1st

Dependencies:   nRF51_Vdd TextLCD BME280

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers LoRaPHY.h Source File

LoRaPHY.h

Go to the documentation of this file.
00001 /**
00002  *  @file LoRaPHY.h
00003  *
00004  *  @brief An abstract class providing radio object to children and
00005  *         provide base for implementing LoRa PHY layer
00006  *
00007  *  \code
00008  *   ______                              _
00009  *  / _____)             _              | |
00010  * ( (____  _____ ____ _| |_ _____  ____| |__
00011  *  \____ \| ___ |    (_   _) ___ |/ ___)  _ \
00012  *  _____) ) ____| | | || |_| ____( (___| | | |
00013  * (______/|_____)_|_|_| \__)_____)\____)_| |_|
00014  *   (C)2013 Semtech
00015  *  ___ _____ _   ___ _  _____ ___  ___  ___ ___
00016  * / __|_   _/_\ / __| |/ / __/ _ \| _ \/ __| __|
00017  * \__ \ | |/ _ \ (__| ' <| _| (_) |   / (__| _|
00018  * |___/ |_/_/ \_\___|_|\_\_| \___/|_|_\\___|___|
00019  * embedded.connectivity.solutions===============
00020  *
00021  * \endcode
00022  *
00023  * Description: LoRa PHY layer
00024  *
00025  * License: Revised BSD License, see LICENSE.TXT file include in the project
00026  *
00027  * Maintainer: Miguel Luis ( Semtech ), Gregory Cristian ( Semtech ) and Daniel Jaeckle ( STACKFORCE )
00028  *
00029  * Copyright (c) 2017, Arm Limited and affiliates.
00030  * SPDX-License-Identifier: BSD-3-Clause
00031  *
00032  */
00033 
00034 #ifndef MBED_OS_LORAPHY_BASE_
00035 #define MBED_OS_LORAPHY_BASE_
00036 
00037 #include "platform/NonCopyable.h"
00038 
00039 #include "system/LoRaWANTimer.h"
00040 #include "LoRaRadio.h"
00041 #include "lora_phy_ds.h"
00042 
00043 class LoRaPHY : private mbed::NonCopyable<LoRaPHY> {
00044 
00045 public:
00046     virtual ~LoRaPHY();
00047 
00048     /** Initialize LoRaPHY
00049      *
00050      *  LoRaMac calls this to initialize LoRaPHY.
00051      *
00052      * @param lora_time a pointer to LoRaWANTimeHandler object
00053      */
00054     void initialize(LoRaWANTimeHandler *lora_time);
00055 
00056     /** Stores a reference to Radio object.
00057      *
00058      * Application is responsible for constructing a 'LoRaRadio' object
00059      * which is passed down to the PHY layer.
00060      *
00061      * @param radio    a reference to radio driver object
00062      */
00063     void set_radio_instance(LoRaRadio &radio);
00064 
00065     /** Puts radio in sleep mode.
00066      *
00067      * Requests the radio driver to enter sleep mode.
00068      */
00069     void put_radio_to_sleep(void);
00070 
00071     /** Puts radio in standby mode.
00072      *
00073      * Requests the radio driver to enter standby mode.
00074      */
00075     void put_radio_to_standby(void);
00076 
00077     /** Puts radio in receive mode.
00078      *
00079      * Requests the radio driver to enter receive mode.
00080      */
00081     void handle_receive(void);
00082 
00083     /** Delegates MAC layer request to transmit packet.
00084      *
00085      * @param buf    a pointer to the data which needs to be transmitted
00086      *
00087      * @param size   size of the data in bytes
00088      */
00089     void handle_send(uint8_t *buf, uint8_t size);
00090 
00091     /** Enables/Disables public network mode.
00092      *
00093      * Public and private LoRaWAN network constitute different preambles and
00094      * Net IDs. This API isused to tell the radio which network mode is in use.
00095      *
00096      * @param set    true or false
00097      */
00098     void setup_public_network_mode(bool set);
00099 
00100     /** Provides a random number from radio.
00101      *
00102      * Returns a 32-bit random unsigned integer value based upon RSSI
00103      * measurements.
00104      *
00105      * @return    a 32-bit long random number
00106      *
00107      */
00108     uint32_t get_radio_rng();
00109 
00110     /**
00111      * @brief calculate_backoff Calculates and applies duty cycle back-off time.
00112      *                          Explicitly updates the band time-off.
00113      *
00114      * @param joined                Set to true, if the node has already joined a network, otherwise false.
00115      * @param last_tx_was_join_req  Set to true, if the last uplink was a join request.
00116      * @param dc_enabled            Set to true, if the duty cycle is enabled, otherwise false.
00117      * @param channel               The current channel index.
00118      * @param elapsed_time          Elapsed time since the start of the node.
00119      * @param tx_toa                Time-on-air of the last transmission.
00120      */
00121     void calculate_backoff(bool joined, bool last_tx_was_join_req, bool dc_enabled, uint8_t channel,
00122                            lorawan_time_t elapsed_time, lorawan_time_t tx_toa);
00123 
00124     /**
00125       * Tests if a channel is on or off in the channel mask
00126       */
00127     bool mask_bit_test(const uint16_t *mask, unsigned bit);
00128 
00129     /**
00130       * Tests if a channel is on or off in the channel mask
00131       */
00132     void mask_bit_set(uint16_t *mask, unsigned bit);
00133 
00134     /**
00135       * Tests if a channel is on or off in the channel mask
00136       */
00137     void mask_bit_clear(uint16_t *mask, unsigned bit);
00138 
00139     /** Entertain a new channel request MAC command.
00140      *
00141      * MAC command subsystem processes the new channel request coming form
00142      * the network server and then MAC layer asks the PHY layer to entertain
00143      * the request.
00144      *
00145      * @param channel_id The channel ID.
00146      * @param new_channel A pointer to the new channel's parameters.
00147      *
00148      * @return bit mask, according to the LoRaWAN spec 1.0.2.
00149      */
00150     virtual uint8_t request_new_channel(int8_t channel_id, channel_params_t* new_channel);
00151 
00152     /** Process PHY layer state after a successful transmission.
00153      * @brief set_last_tx_done Updates times of the last transmission for the particular channel and
00154      *                         band upon which last transmission took place.
00155      * @param channel The channel in use.
00156      * @param joined Boolean telling if node has joined the network.
00157      * @param last_tx_done_time The last TX done time.
00158      */
00159     virtual void set_last_tx_done(uint8_t channel, bool joined, lorawan_time_t last_tx_done_time);
00160 
00161     /** Enables default channels only.
00162      *
00163      * Falls back to a channel mask where only default channels are enabled, all
00164      * other channels are disabled.
00165      */
00166     virtual void restore_default_channels();
00167 
00168     /** Processes the incoming CF-list.
00169      *
00170      * Handles the payload containing CF-list and enables channels defined
00171      * therein.
00172      *
00173      * @param payload Payload to process.
00174      * @param size Size of the payload.
00175      *
00176      */
00177     virtual void apply_cf_list(const uint8_t* payload, uint8_t size);
00178 
00179     /** Calculates the next datarate to set, when ADR is on or off.
00180      *
00181      * @param restore_channel_mask    A boolean set restore channel mask in case
00182      *                                of failure.
00183      *
00184      * @param dr_out                  The calculated datarate for the next TX.
00185      *
00186      * @param tx_power_out            The TX power for the next TX.
00187      *
00188      * @param adr_ack_counter         The calculated ADR acknowledgement counter.
00189      *
00190      * @return True, if an ADR request should be performed.
00191      */
00192     bool get_next_ADR(bool restore_channel_mask, int8_t& dr_out,
00193                       int8_t& tx_power_out, uint32_t& adr_ack_counter);
00194 
00195     /** Configure radio reception.
00196      *
00197      * @param [in] config    A pointer to the RX configuration.
00198      *
00199      * @return True, if the configuration was applied successfully.
00200      */
00201     virtual bool rx_config(rx_config_params_t * config);
00202 
00203     /** Computing Receive Windows
00204      *
00205      * For more details please consult the following document, chapter 3.1.2.
00206      * http://www.semtech.com/images/datasheet/SX1272_settings_for_LoRaWAN_v2.0.pdf
00207      * or
00208      * http://www.semtech.com/images/datasheet/SX1276_settings_for_LoRaWAN_v2.0.pdf
00209      *
00210      *                 Downlink start: T = Tx + 1s (+/- 20 us)
00211      *                            |
00212      *             TRxEarly       |        TRxLate
00213      *                |           |           |
00214      *                |           |           +---+---+---+---+---+---+---+---+
00215      *                |           |           |       Latest Rx window        |
00216      *                |           |           +---+---+---+---+---+---+---+---+
00217      *                |           |           |
00218      *                +---+---+---+---+---+---+---+---+
00219      *                |       Earliest Rx window      |
00220      *                +---+---+---+---+---+---+---+---+
00221      *                            |
00222      *                            +---+---+---+---+---+---+---+---+
00223      *Downlink preamble 8 symbols |   |   |   |   |   |   |   |   |
00224      *                            +---+---+---+---+---+---+---+---+
00225      *
00226      *                     Worst case Rx window timings
00227      *
00228      * TRxLate  = DEFAULT_MIN_RX_SYMBOLS * tSymbol - RADIO_WAKEUP_TIME
00229      * TRxEarly = 8 - DEFAULT_MIN_RX_SYMBOLS * tSymbol - RxWindowTimeout - RADIO_WAKEUP_TIME
00230      *
00231      * TRxLate - TRxEarly = 2 * DEFAULT_SYSTEM_MAX_RX_ERROR
00232      *
00233      * RxOffset = ( TRxLate + TRxEarly ) / 2
00234      *
00235      * RxWindowTimeout = ( 2 * DEFAULT_MIN_RX_SYMBOLS - 8 ) * tSymbol + 2 * DEFAULT_SYSTEM_MAX_RX_ERROR
00236      * RxOffset = 4 * tSymbol - RxWindowTimeout / 2 - RADIO_WAKE_UP_TIME
00237      *
00238      * The minimum value of RxWindowTimeout must be 5 symbols which implies that the system always tolerates at least an error of 1.5 * tSymbol.
00239      */
00240     /*!
00241      * Computes the RX window timeout and offset.
00242      *
00243      * @param [in] datarate         The RX window datarate index to be used.
00244      *
00245      * @param [in] min_rx_symbols   The minimum number of symbols required to
00246      *                              detect an RX frame.
00247      *
00248      * @param [in] rx_error         The maximum timing error of the receiver
00249      *                              in milliseconds. The receiver will turn on
00250      *                              in a [-rxError : +rxError] ms interval around
00251      *                              RxOffset.
00252      *
00253      * @param [out] rx_conf_params  Pointer to the structure that needs to be
00254      *                              filled with receive window parameters.
00255      *
00256      */
00257     virtual void compute_rx_win_params(int8_t datarate, uint8_t min_rx_symbols,
00258                                        uint32_t rx_error,
00259                                        rx_config_params_t  *rx_conf_params);
00260 
00261     /** Configure radio transmission.
00262      *
00263      * @param [in]  tx_config    Structure containing tx parameters.
00264      *
00265      * @param [out] tx_power     The TX power which will be set.
00266      *
00267      * @param [out] tx_toa       The time-on-air of the frame.
00268      *
00269      * @return True, if the configuration was applied successfully.
00270      */
00271     virtual bool tx_config(tx_config_params_t* tx_config, int8_t* tx_power,
00272                            lorawan_time_t* tx_toa);
00273 
00274     /** Processes a Link ADR Request.
00275      *
00276      * @param [in]  params          A pointer ADR request parameters.
00277      *
00278      * @param [out] dr_out          The datarate applied.
00279      *
00280      * @param [out] tx_power_out    The TX power applied.
00281      *
00282      * @param [out] nb_rep_out      The number of repetitions to apply.
00283      *
00284      * @param [out] nb_bytes_parsed The number of bytes parsed.
00285      *
00286      * @return The status of the operation, according to the LoRaMAC specification.
00287      */
00288     virtual uint8_t link_ADR_request(adr_req_params_t* params,
00289                                      int8_t* dr_out, int8_t* tx_power_out,
00290                                      uint8_t* nb_rep_out,
00291                                      uint8_t* nb_bytes_parsed);
00292 
00293     /** Accept or rejects RxParamSetupReq MAC command
00294      *
00295      * The function processes a RX parameter setup request in response to
00296      * server MAC command for RX setup.
00297      *
00298      * @param [in] params    A pointer to rx parameter setup request.
00299      *
00300      * @return The status of the operation, according to the LoRaWAN specification.
00301      */
00302     virtual uint8_t accept_rx_param_setup_req(rx_param_setup_req_t* params);
00303 
00304     /**
00305      * @brief accept_tx_param_setup_req Makes decision whether to accept or reject TxParamSetupReq MAC command.
00306      *
00307      * @param ul_dwell_time The uplink dwell time.
00308      * @param dl_dwell_time The downlink dwell time.
00309      *
00310      * @return True to let the MAC know that the request is
00311      *         accepted and MAC can apply TX parameters received
00312      *         form Network Server. Otherwise false is returned.
00313      */
00314     virtual bool accept_tx_param_setup_req(uint8_t ul_dwell_time, uint8_t dl_dwell_time);
00315 
00316     /** Processes a DlChannelReq MAC command.
00317      *
00318      * @param channel_id The channel ID to add the frequency.
00319      * @param rx1_frequency The alternative frequency for the Rx1 window.
00320      *
00321      * @return The status of the operation, according to the LoRaWAN specification.
00322      */
00323     virtual uint8_t dl_channel_request(uint8_t channel_id, uint32_t rx1_frequency);
00324 
00325     /** Alternates the datarate of the channel for the join request.
00326      *
00327      * @param nb_trials    Number of trials to be made on one given data rate.
00328      *
00329      * @return             The datarate to apply .
00330      */
00331     virtual int8_t get_alternate_DR(uint8_t nb_trials);
00332 
00333     /** Searches and sets the next available channel.
00334      *
00335      * If there are multiple channels found available, one of them is selected
00336      * randomly.
00337      *
00338      * @param [in]  nextChanParams Parameters for the next channel.
00339      *
00340      * @param [out] channel The next channel to use for TX.
00341      *
00342      * @param [out] time The time to wait for the next transmission according to the duty cycle.
00343      *
00344      * @param [out] aggregatedTimeOff Updates the aggregated time off.
00345      *
00346      * @return Function status [1: OK, 0: Unable to find a channel on the current datarate].
00347      */
00348     virtual lorawan_status_t set_next_channel(channel_selection_params_t* nextChanParams,
00349                                               uint8_t* channel, lorawan_time_t* time,
00350                                               lorawan_time_t* aggregatedTimeOff);
00351 
00352     /** Adds a channel to the channel list.
00353      *
00354      * Verifies the channel parameters and if everything is found legitimate,
00355      * adds that particular channel to the channel list and updates the channel
00356      * mask.
00357      *
00358      * @param [in] new_channel A pointer to the parameters for the new channel.
00359      * @param [in] id          Channel ID
00360      *
00361      * @return LORAWAN_STATUS_OK if everything goes fine, negative error code
00362      *         otherwise.
00363      */
00364     virtual lorawan_status_t add_channel(const channel_params_t* new_channel, uint8_t id);
00365 
00366     /** Removes a channel from the channel list.
00367      *
00368      * @param [in] channel_id Index of the channel to be removed
00369      *
00370      * @return True, if the channel was removed successfully.
00371      */
00372     virtual bool remove_channel(uint8_t channel_id);
00373 
00374     /** Puts the radio into continuous wave mode.
00375      *
00376      * @param [in] continuous_wave   A pointer to the function parameters.
00377      *
00378      * @param [in] frequency         Frequency to transmit at
00379      */
00380     virtual void set_tx_cont_mode(cw_mode_params_t * continuous_wave,
00381                                   uint32_t frequency = 0);
00382 
00383     /** Computes new data rate according to the given offset
00384      *
00385      * @param [in] dr The current datarate.
00386      *
00387      * @param [in] dr_offset The offset to be applied.
00388      *
00389      * @return     The computed datarate.
00390      */
00391     virtual uint8_t apply_DR_offset(int8_t dr, int8_t dr_offset);
00392 
00393     /**
00394      * @brief reset_to_default_values resets some parameters to default values
00395      * @param params Pointer to MAC protocol parameters which will be reset
00396      * @param init If true, most of the values will be modified
00397      */
00398     void reset_to_default_values(loramac_protocol_params *params, bool init = false);
00399 
00400 public:
00401     /**
00402      * @brief get_next_lower_tx_datarate Gets the next lower datarate
00403      * @param datarate Current TX datarate
00404      * @return Lower datarate than given one or minimum if lower cannot be found anymore
00405      */
00406     int8_t get_next_lower_tx_datarate(int8_t datarate);
00407 
00408     /**
00409      * @brief get_minimum_rx_datarate Gets the minimum RX datarate supported by a device
00410      * @return Minimum RX datarate
00411      */
00412     uint8_t get_minimum_rx_datarate();
00413 
00414     /**
00415      * @brief get_minimum_tx_datarate Gets the minimum TX datarate supported by a device
00416      * @return Minimum TX datarate
00417      */
00418     uint8_t get_minimum_tx_datarate();
00419 
00420     /**
00421      * @brief get_default_tx_datarate Gets the default TX datarate
00422      * @return default TX datarate
00423      */
00424     uint8_t get_default_tx_datarate();
00425 
00426     /**
00427      * @brief get_default_max_tx_datarate Gets the maximum achievable data rate for
00428      *        LoRa modulation. This will always be the highest data rate achievable with
00429      *        LoRa as defined in the regional specifications.
00430      * @return Maximum achievable data rate with LoRa modulation.
00431      */
00432     uint8_t get_default_max_tx_datarate();
00433 
00434     /**
00435      * @brief get_default_tx_power Gets the default TX power
00436      * @return Default TX power
00437      */
00438     uint8_t get_default_tx_power();
00439 
00440     /**
00441      * @brief get_max_payload Gets maximum amount in bytes which device can send
00442      * @param datarate A datarate to use
00443      * @param use_repeater If true repeater table is used, otherwise payloads table is used
00444      * @return Maximum number of bytes for payload
00445      */
00446     uint8_t get_max_payload(uint8_t datarate, bool use_repeater = false);
00447 
00448     /**
00449      * @brief get_maximum_frame_counter_gap Gets maximum frame counter gap
00450      * @return Maximum frame counter gap
00451      */
00452     uint16_t get_maximum_frame_counter_gap();
00453 
00454     /**
00455      * @brief get_ack_timeout Gets timeout value for ACK to be received
00456      * @return ACK timeout
00457      */
00458     uint32_t get_ack_timeout();
00459 
00460     /**
00461      * @brief get_default_rx2_frequency Gets default RX2 frequency
00462      * @return RX2 frequency
00463      */
00464     uint32_t get_default_rx2_frequency();
00465 
00466     /**
00467      * @brief get_default_rx2_datarate Gets default RX2 datarate
00468      * @return RX2 datarate
00469      */
00470     uint8_t get_default_rx2_datarate();
00471 
00472     /**
00473      * @brief get_channel_mask Gets the channel mask
00474      * @param get_default If true the default mask is returned, otherwise the current mask is returned
00475      * @return A channel mask
00476      */
00477     uint16_t* get_channel_mask(bool get_default = false);
00478 
00479     /**
00480      * @brief get_max_nb_channels Gets maximum number of channels supported
00481      * @return Number of channels
00482      */
00483     uint8_t get_max_nb_channels();
00484 
00485     /**
00486      * @brief get_phy_channels Gets PHY channels
00487      * @return PHY channels
00488      */
00489     channel_params_t* get_phy_channels();
00490 
00491     /**
00492      * @brief is_custom_channel_plan_supported Checks if custom channel plan is supported
00493      * @return True if custom channel plan is supported, false otherwise
00494      */
00495     bool is_custom_channel_plan_supported();
00496 
00497 public: //Verifiers
00498 
00499     /**
00500      * @brief verify_rx_datarate Verifies that given RX datarate is valid
00501      * @param datarate Datarate to check
00502      * @return true if given datarate is valid, false otherwise
00503      */
00504     bool verify_rx_datarate(uint8_t datarate);
00505 
00506     /**
00507      * @brief verify_tx_datarate Verifies that given TX datarate is valid
00508      * @param datarate Datarate to check
00509      * @param use_default If true validation is done against default value
00510      * @return true if given datarate is valid, false otherwise
00511      */
00512     bool verify_tx_datarate(uint8_t datarate, bool use_default = false);
00513 
00514     /**
00515      * @brief verify_tx_power Verifies that given TX power is valid
00516      * @param tx_power Power to check
00517      * @return True if valid, false otherwise
00518      */
00519     bool verify_tx_power(uint8_t tx_power);
00520 
00521     /**
00522      * @brief verify_duty_cycle Verifies that given cycle is valid
00523      * @param cycle Cycle to check
00524      * @return True if valid, false otherwise
00525      */
00526     bool verify_duty_cycle(bool cycle);
00527 
00528     /**
00529      * @brief verify_nb_join_trials Verifies that given number of trials is valid
00530      * @param nb_join_trials Number to check
00531      * @return True if valid, false otherwise
00532      */
00533     bool verify_nb_join_trials(uint8_t nb_join_trials);
00534 
00535 protected:
00536     LoRaPHY();
00537 
00538     /**
00539      * Looks up corresponding band for a frequency. Returns -1 if not in any band.
00540      */
00541     int lookup_band_for_frequency(uint32_t freq) const;
00542 
00543     /**
00544      * Verifies, if a frequency is within a given band.
00545      */
00546     virtual bool verify_frequency_for_band(uint32_t freq, uint8_t band) const;
00547 
00548     /**
00549      * Verifies, if a value is in a given range.
00550      */
00551     bool val_in_range(int8_t value, int8_t min, int8_t max);
00552 
00553     /**
00554      * Verifies, if a datarate is available on an active channel.
00555      */
00556     bool verify_channel_DR(uint16_t* channelsMask, int8_t dr);
00557 
00558     /**
00559      * Disables a channel in a given channels mask.
00560      */
00561     bool disable_channel(uint16_t* channel_mask, uint8_t id, uint8_t max_channels);
00562 
00563     /**
00564      * Counts number of bits on in a given mask
00565      */
00566     uint8_t count_bits(uint16_t mask, uint8_t nb_bits);
00567 
00568     /**
00569      * Counts the number of active channels in a given channels mask.
00570      */
00571     uint8_t num_active_channels(uint16_t* channel_mask, uint8_t start_idx,
00572                                 uint8_t stop_idx);
00573 
00574     /**
00575      * Copy channel masks.
00576      */
00577     void copy_channel_mask(uint16_t* dest_mask, uint16_t* src_mask, uint8_t len);
00578 
00579     /**
00580      * Updates the time-offs of the bands.
00581      */
00582     lorawan_time_t update_band_timeoff(bool joined, bool dutyCycle, band_t * bands,
00583                                        uint8_t nb_bands);
00584 
00585     /**
00586      * Parses the parameter of an LinkAdrRequest.
00587      */
00588     uint8_t parse_link_ADR_req(const uint8_t* payload, link_adr_params_t* adr_params);
00589 
00590     /**
00591      * Verifies and updates the datarate, the TX power and the number of repetitions
00592      * of a LinkAdrRequest.
00593      */
00594     uint8_t verify_link_ADR_req(verify_adr_params_t* verify_params, int8_t* dr,
00595                                 int8_t* tx_pow, uint8_t* nb_rep);
00596 
00597     /**
00598      * Computes the RX window timeout and the RX window offset.
00599      */
00600     void get_rx_window_params(double t_symbol, uint8_t min_rx_symbols,
00601                               uint32_t rx_error, uint32_t wakeup_time,
00602                               uint32_t* window_timeout, int32_t* window_offset);
00603 
00604     /**
00605      * Computes the txPower, based on the max EIRP and the antenna gain.
00606      */
00607     int8_t compute_tx_power(int8_t txPowerIndex, float maxEirp, float antennaGain);
00608 
00609     /**
00610      * Provides a random number in the range provided.
00611      */
00612     int32_t get_random(int32_t min, int32_t max);
00613 
00614     /**
00615      * Get next lower data rate
00616      */
00617     int8_t get_next_lower_dr(int8_t dr, int8_t min_dr);
00618 
00619     /**
00620      * Get channel bandwidth depending upon data rate table index
00621      */
00622     uint8_t get_bandwidth(uint8_t dr_index);
00623 
00624     uint8_t enabled_channel_count(uint8_t datarate,
00625                                   const uint16_t *mask, uint8_t* enabledChannels,
00626                                   uint8_t* delayTx);
00627 
00628     bool is_datarate_supported(const int8_t datarate) const;
00629 
00630 private:
00631 
00632     /**
00633      * Computes the symbol time for LoRa modulation.
00634      */
00635     double compute_symb_timeout_lora(uint8_t phy_dr, uint32_t bandwidth );
00636 
00637     /**
00638      * Computes the symbol time for FSK modulation.
00639      */
00640     double compute_symb_timeout_fsk(uint8_t phy_dr);
00641 
00642 protected:
00643     LoRaRadio *_radio;
00644     LoRaWANTimeHandler *_lora_time;
00645     loraphy_params_t phy_params;
00646 };
00647 
00648 #endif /* MBED_OS_LORAPHY_BASE_ */