Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: nRF51_Vdd TextLCD BME280
LoRaPHYAU915.h
00001 /** 00002 * @file LoRaPHYAU915.h 00003 * 00004 * @brief Implements LoRaPHY for Australian 915 MHz band 00005 * 00006 * \code 00007 * ______ _ 00008 * / _____) _ | | 00009 * ( (____ _____ ____ _| |_ _____ ____| |__ 00010 * \____ \| ___ | (_ _) ___ |/ ___) _ \ 00011 * _____) ) ____| | | || |_| ____( (___| | | | 00012 * (______/|_____)_|_|_| \__)_____)\____)_| |_| 00013 * (C)2013 Semtech 00014 * ___ _____ _ ___ _ _____ ___ ___ ___ ___ 00015 * / __|_ _/_\ / __| |/ / __/ _ \| _ \/ __| __| 00016 * \__ \ | |/ _ \ (__| ' <| _| (_) | / (__| _| 00017 * |___/ |_/_/ \_\___|_|\_\_| \___/|_|_\\___|___| 00018 * embedded.connectivity.solutions=============== 00019 * 00020 * \endcode 00021 * 00022 * 00023 * License: Revised BSD License, see LICENSE.TXT file include in the project 00024 * 00025 * Maintainer: Miguel Luis ( Semtech ), Gregory Cristian ( Semtech ) and Daniel Jaeckle ( STACKFORCE ) 00026 * 00027 * Copyright (c) 2017, Arm Limited and affiliates. 00028 * SPDX-License-Identifier: BSD-3-Clause 00029 * 00030 */ 00031 00032 #ifndef MBED_OS_LORAPHY_AU915_H_ 00033 00034 #define MBED_OS_LORAPHY_AU915_H_ 00035 00036 #include "LoRaPHY.h" 00037 00038 // Definitions 00039 /*! 00040 * LoRaMac maximum number of channels 00041 */ 00042 #define AU915_MAX_NB_CHANNELS 72 00043 00044 /*! 00045 * LoRaMac maximum number of bands 00046 */ 00047 #define AU915_MAX_NB_BANDS 1 00048 00049 #define AU915_CHANNEL_MASK_SIZE 5 00050 00051 00052 class LoRaPHYAU915 : public LoRaPHY{ 00053 00054 public: 00055 00056 LoRaPHYAU915(); 00057 virtual ~LoRaPHYAU915(); 00058 00059 virtual bool rx_config(rx_config_params_t * config); 00060 00061 virtual bool tx_config(tx_config_params_t* config, int8_t* txPower, 00062 lorawan_time_t* txTimeOnAir); 00063 00064 virtual uint8_t link_ADR_request(adr_req_params_t* params, 00065 int8_t* drOut, int8_t* txPowOut, 00066 uint8_t* nbRepOut, 00067 uint8_t* nbBytesParsed); 00068 00069 virtual uint8_t accept_rx_param_setup_req(rx_param_setup_req_t* params); 00070 00071 virtual int8_t get_alternate_DR(uint8_t nb_trials); 00072 00073 virtual lorawan_status_t set_next_channel(channel_selection_params_t* next_chan_params, 00074 uint8_t* channel, lorawan_time_t* time, 00075 lorawan_time_t* aggregate_timeoff); 00076 00077 virtual uint8_t apply_DR_offset(int8_t dr, int8_t dr_offset); 00078 00079 private: 00080 00081 /** 00082 * Sets the intersection of source and destination channel masks 00083 * into the destination. 00084 */ 00085 void intersect_channel_mask(const uint16_t *source, uint16_t *destination, 00086 uint8_t size); 00087 00088 /** 00089 * Fills channel mask array based upon the provided FSB mask 00090 */ 00091 void fill_channel_mask_with_fsb(const uint16_t *expectation, 00092 const uint16_t *fsb_mask, 00093 uint16_t *channel_mask, uint8_t size); 00094 00095 /** 00096 * Fills channel mask array with a given value 00097 */ 00098 void fill_channel_mask_with_value(uint16_t *channel_mask, 00099 uint16_t value, uint8_t size); 00100 00101 private: 00102 00103 /*! 00104 * LoRaMAC channels 00105 */ 00106 channel_params_t channels[AU915_MAX_NB_CHANNELS]; 00107 00108 /*! 00109 * LoRaMac bands 00110 */ 00111 band_t bands[AU915_MAX_NB_BANDS]; 00112 00113 /*! 00114 * LoRaMac channel mask 00115 */ 00116 uint16_t channel_mask[AU915_CHANNEL_MASK_SIZE]; 00117 00118 /*! 00119 * Previously used channel mask 00120 */ 00121 uint16_t current_channel_mask[AU915_CHANNEL_MASK_SIZE]; 00122 00123 /*! 00124 * LoRaMac channels default mask 00125 */ 00126 uint16_t default_channel_mask[AU915_CHANNEL_MASK_SIZE]; 00127 }; 00128 00129 #endif /* MBED_OS_LORAPHY_AU915_H_ */
Generated on Tue Jul 12 2022 15:15:48 by
