Mistake on this page?
Report an issue in GitHub or email us
LoRaPHYAU915.h
Go to the documentation of this file.
1 /**
2  * @file LoRaPHYAU915.h
3  *
4  * @brief Implements LoRaPHY for Australian 915 MHz band
5  *
6  * \code
7  * ______ _
8  * / _____) _ | |
9  * ( (____ _____ ____ _| |_ _____ ____| |__
10  * \____ \| ___ | (_ _) ___ |/ ___) _ \
11  * _____) ) ____| | | || |_| ____( (___| | | |
12  * (______/|_____)_|_|_| \__)_____)\____)_| |_|
13  * (C)2013 Semtech
14  * ___ _____ _ ___ _ _____ ___ ___ ___ ___
15  * / __|_ _/_\ / __| |/ / __/ _ \| _ \/ __| __|
16  * \__ \ | |/ _ \ (__| ' <| _| (_) | / (__| _|
17  * |___/ |_/_/ \_\___|_|\_\_| \___/|_|_\\___|___|
18  * embedded.connectivity.solutions===============
19  *
20  * \endcode
21  *
22  *
23  * License: Revised BSD License, see LICENSE.TXT file include in the project
24  *
25  * Maintainer: Miguel Luis ( Semtech ), Gregory Cristian ( Semtech ) and Daniel Jaeckle ( STACKFORCE )
26  *
27  * Copyright (c) 2017, Arm Limited and affiliates.
28  * SPDX-License-Identifier: BSD-3-Clause
29  *
30  */
31 
32 #ifndef MBED_OS_LORAPHY_AU915_H_
33 
34 #define MBED_OS_LORAPHY_AU915_H_
35 
36 #if !(DOXYGEN_ONLY)
37 
38 #include "LoRaPHY.h"
39 
40 // Definitions
41 /*!
42  * LoRaMac maximum number of channels
43  */
44 #define AU915_MAX_NB_CHANNELS 72
45 
46 /*!
47  * LoRaMac maximum number of bands
48  */
49 #define AU915_MAX_NB_BANDS 1
50 
51 #define AU915_CHANNEL_MASK_SIZE 5
52 
53 class LoRaPHYAU915 : public LoRaPHY {
54 
55 public:
56 
57  LoRaPHYAU915();
58  virtual ~LoRaPHYAU915();
59 
60  virtual bool rx_config(rx_config_params_t *config);
61 
62  virtual bool tx_config(tx_config_params_t *config, int8_t *txPower,
63  lorawan_time_t *txTimeOnAir);
64 
65  virtual uint8_t link_ADR_request(adr_req_params_t *params,
66  int8_t *drOut, int8_t *txPowOut,
67  uint8_t *nbRepOut,
68  uint8_t *nbBytesParsed);
69 
70  virtual uint8_t accept_rx_param_setup_req(rx_param_setup_req_t *params);
71 
72  virtual int8_t get_alternate_DR(uint8_t nb_trials);
73 
75  uint8_t *channel, lorawan_time_t *time,
76  lorawan_time_t *aggregate_timeoff);
77 
78  virtual uint8_t apply_DR_offset(int8_t dr, int8_t dr_offset);
79 
80 private:
81 
82  /**
83  * Sets the intersection of source and destination channel masks
84  * into the destination.
85  */
86  void intersect_channel_mask(const uint16_t *source, uint16_t *destination,
87  uint8_t size);
88 
89  /**
90  * Fills channel mask array based upon the provided FSB mask
91  */
92  void fill_channel_mask_with_fsb(const uint16_t *expectation,
93  const uint16_t *fsb_mask,
94  uint16_t *channel_mask, uint8_t size);
95 
96  /**
97  * Fills channel mask array with a given value
98  */
99  void fill_channel_mask_with_value(uint16_t *channel_mask,
100  uint16_t value, uint8_t size);
101 
102 private:
103 
104  /*!
105  * LoRaMAC channels
106  */
107  channel_params_t channels[AU915_MAX_NB_CHANNELS];
108 
109  /*!
110  * LoRaMac bands
111  */
112  band_t bands[AU915_MAX_NB_BANDS];
113 
114  /*!
115  * LoRaMac channel mask
116  */
117  uint16_t channel_mask[AU915_CHANNEL_MASK_SIZE];
118 
119  /*!
120  * Previously used channel mask
121  */
122  uint16_t current_channel_mask[AU915_CHANNEL_MASK_SIZE];
123 
124  /*!
125  * LoRaMac channels default mask
126  */
127  uint16_t default_channel_mask[AU915_CHANNEL_MASK_SIZE];
128 };
129 
130 #endif /* DOXYGEN_ONLY*/
131 #endif /* MBED_OS_LORAPHY_AU915_H_ */
132 
TX configuration parameters.
Definition: lora_phy_ds.h:275
An abstract class providing radio object to children and provide base for implementing LoRa PHY layer...
virtual int8_t get_alternate_DR(uint8_t nb_trials)
Alternates the datarate of the channel for the join request.
virtual bool tx_config(tx_config_params_t *tx_config, int8_t *tx_power, lorawan_time_t *tx_toa)
Configure radio transmission.
virtual uint8_t link_ADR_request(adr_req_params_t *params, int8_t *dr_out, int8_t *tx_power_out, uint8_t *nb_rep_out, uint8_t *nb_bytes_parsed)
Processes a Link ADR Request.
uint32_t lorawan_time_t
Timer time variable definition.
virtual lorawan_status_t set_next_channel(channel_selection_params_t *nextChanParams, uint8_t *channel, lorawan_time_t *time, lorawan_time_t *aggregatedTimeOff)
Searches and sets the next available channel.
LoRaPHY Class Parent class for LoRa regional PHY implementations.
Definition: LoRaPHY.h:46
enum lorawan_status lorawan_status_t
lorawan_status_t contains status codes in response to stack operations
The parameter structure for the function RegionNextChannel.
Definition: lora_phy_ds.h:430
Contains rx parameter setup request coming from network server.
Definition: lora_phy_ds.h:412
virtual bool rx_config(rx_config_params_t *config)
Configure radio reception.
virtual uint8_t apply_DR_offset(int8_t dr, int8_t dr_offset)
Computes new data rate according to the given offset.
virtual uint8_t accept_rx_param_setup_req(rx_param_setup_req_t *params)
Accept or rejects RxParamSetupReq MAC command.
This structure contains parameters for ADR request coming from network server.
Definition: lora_phy_ds.h:306
DO NOT MODIFY, WILL BREAK THE API!
Default user application maximum data size for transmission.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.