takashi kadono / Mbed OS Nucleo_446

Dependencies:   ssd1331

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers LoRaWANStack_stub.cpp Source File

LoRaWANStack_stub.cpp

00001 /*
00002  * Copyright (c) , Arm Limited and affiliates.
00003  * SPDX-License-Identifier: Apache-2.0
00004  *
00005  * Licensed under the Apache License, Version 2.0 (the "License");
00006  * you may not use this file except in compliance with the License.
00007  * You may obtain a copy of the License at
00008  *
00009  *     http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 #include <string.h>
00019 #include <stdlib.h>
00020 
00021 #include "LoRaWANStack.h"
00022 
00023 using namespace mbed;
00024 using namespace events;
00025 
00026 /*****************************************************************************
00027  * Constructor                                                               *
00028  ****************************************************************************/
00029 LoRaWANStack::LoRaWANStack()
00030     : _loramac(),
00031       _device_current_state(DEVICE_STATE_NOT_INITIALIZED),
00032       _lw_session(),
00033       _tx_msg(),
00034       _rx_msg(),
00035       _tx_metadata(),
00036       _rx_metadata(),
00037       _num_retry(1),
00038       _ctrl_flags(0),
00039       _app_port(12),
00040       _link_check_requested(false),
00041       _automatic_uplink_ongoing(false),
00042       _ready_for_rx(true),
00043       _queue(NULL)
00044 {
00045 }
00046 
00047 void LoRaWANStack::bind_phy_and_radio_driver(LoRaRadio &radio, LoRaPHY &phy)
00048 {
00049 }
00050 
00051 lorawan_status_t LoRaWANStack::initialize_mac_layer(EventQueue *queue)
00052 {
00053     return LORAWAN_STATUS_OK;
00054 }
00055 
00056 lorawan_status_t LoRaWANStack::set_lora_callbacks(const lorawan_app_callbacks_t *callbacks)
00057 {
00058     return LORAWAN_STATUS_OK;
00059 }
00060 
00061 lorawan_status_t LoRaWANStack::connect()
00062 {
00063     return LORAWAN_STATUS_OK;
00064 }
00065 
00066 lorawan_status_t LoRaWANStack::connect(const lorawan_connect_t &connect)
00067 {
00068     return LORAWAN_STATUS_OK;
00069 }
00070 
00071 lorawan_status_t LoRaWANStack::add_channels(const lorawan_channelplan_t &channel_plan)
00072 {
00073     return LORAWAN_STATUS_OK;
00074 }
00075 
00076 lorawan_status_t LoRaWANStack::remove_a_channel(uint8_t channel_id)
00077 {
00078     return LORAWAN_STATUS_OK;
00079 }
00080 
00081 lorawan_status_t LoRaWANStack::drop_channel_list()
00082 {
00083     return LORAWAN_STATUS_OK;
00084 }
00085 
00086 lorawan_status_t LoRaWANStack::get_enabled_channels(lorawan_channelplan_t &channel_plan)
00087 {
00088     return LORAWAN_STATUS_OK;
00089 }
00090 
00091 lorawan_status_t LoRaWANStack::set_confirmed_msg_retry(uint8_t count)
00092 {
00093     return LORAWAN_STATUS_OK;
00094 }
00095 
00096 lorawan_status_t LoRaWANStack::set_channel_data_rate(uint8_t data_rate)
00097 {
00098     return LORAWAN_STATUS_OK;
00099 }
00100 
00101 lorawan_status_t LoRaWANStack::enable_adaptive_datarate(bool adr_enabled)
00102 {
00103     return LORAWAN_STATUS_OK;
00104 }
00105 
00106 lorawan_status_t LoRaWANStack::stop_sending(void)
00107 {
00108     return LORAWAN_STATUS_OK;
00109 }
00110 
00111 int16_t LoRaWANStack::handle_tx(const uint8_t port, const uint8_t *data,
00112                                 uint16_t length, uint8_t flags,
00113                                 bool null_allowed, bool allow_port_0)
00114 {
00115     return 0;
00116 }
00117 
00118 int16_t LoRaWANStack::handle_rx(uint8_t *data, uint16_t length, uint8_t &port, int &flags, bool validate_params)
00119 {
00120     return 0;
00121 }
00122 
00123 lorawan_status_t LoRaWANStack::set_link_check_request()
00124 {
00125     return LORAWAN_STATUS_OK;
00126 }
00127 
00128 void LoRaWANStack::remove_link_check_request()
00129 {
00130 }
00131 
00132 lorawan_status_t LoRaWANStack::shutdown()
00133 {
00134     return LORAWAN_STATUS_OK;
00135 }
00136 
00137 lorawan_status_t LoRaWANStack::set_device_class(const device_class_t &device_class)
00138 {
00139     return LORAWAN_STATUS_OK;
00140 }
00141 
00142 lorawan_status_t  LoRaWANStack::acquire_tx_metadata(lorawan_tx_metadata &tx_metadata)
00143 {
00144     return LORAWAN_STATUS_OK;
00145 }
00146 
00147 lorawan_status_t LoRaWANStack::acquire_rx_metadata(lorawan_rx_metadata &metadata)
00148 {
00149     return LORAWAN_STATUS_OK;
00150 }
00151 
00152 lorawan_status_t LoRaWANStack::acquire_backoff_metadata(int &backoff)
00153 {
00154     return LORAWAN_STATUS_OK;
00155 }
00156 
00157 /*****************************************************************************
00158  * Interrupt handlers                                                        *
00159  ****************************************************************************/
00160 void LoRaWANStack::tx_interrupt_handler(void)
00161 {
00162 }
00163 
00164 void LoRaWANStack::rx_interrupt_handler(const uint8_t *payload, uint16_t size,
00165                                         int16_t rssi, int8_t snr)
00166 {
00167 }
00168 
00169 void LoRaWANStack::rx_error_interrupt_handler(void)
00170 {
00171 }
00172 
00173 void LoRaWANStack::tx_timeout_interrupt_handler(void)
00174 {
00175 }
00176 
00177 void LoRaWANStack::rx_timeout_interrupt_handler(void)
00178 {
00179 }
00180 
00181 void LoRaWANStack::process_transmission_timeout()
00182 {
00183 }
00184 
00185 void LoRaWANStack::process_transmission(void)
00186 {
00187 }
00188 
00189 void LoRaWANStack::handle_ack_expiry_for_class_c(void)
00190 {
00191 }
00192 
00193 void LoRaWANStack::handle_scheduling_failure(void)
00194 {
00195 }
00196 
00197 void LoRaWANStack::process_reception(const uint8_t *const payload, uint16_t size,
00198                                      int16_t rssi, int8_t snr)
00199 {
00200 }
00201 
00202 void LoRaWANStack::process_reception_timeout(bool is_timeout)
00203 {
00204 }
00205 
00206 void LoRaWANStack::make_tx_metadata_available(void)
00207 {
00208 }
00209 
00210 void LoRaWANStack::make_rx_metadata_available(void)
00211 {
00212 }
00213 
00214 bool LoRaWANStack::is_port_valid(const uint8_t port, bool allow_port_0)
00215 {
00216     return true;
00217 }
00218 
00219 lorawan_status_t LoRaWANStack::set_application_port(const uint8_t port, bool allow_port_0)
00220 {
00221     return LORAWAN_STATUS_OK;
00222 }
00223 
00224 void LoRaWANStack::state_machine_run_to_completion()
00225 {
00226 }
00227 
00228 void LoRaWANStack::send_event_to_application(const lorawan_event_t event) const
00229 {
00230 }
00231 
00232 void LoRaWANStack::send_automatic_uplink_message(const uint8_t port)
00233 {
00234 }
00235 
00236 int LoRaWANStack::convert_to_msg_flag(const mcps_type_t type)
00237 {
00238     return 0;
00239 }
00240 
00241 lorawan_status_t LoRaWANStack::handle_connect(bool is_otaa)
00242 {
00243     return LORAWAN_STATUS_OK;
00244 }
00245 
00246 void LoRaWANStack::mlme_indication_handler()
00247 {
00248 }
00249 
00250 void LoRaWANStack::mlme_confirm_handler()
00251 {
00252 }
00253 
00254 void LoRaWANStack::mcps_confirm_handler()
00255 {
00256 }
00257 
00258 void LoRaWANStack::mcps_indication_handler()
00259 {
00260 }
00261 
00262 lorawan_status_t LoRaWANStack::state_controller(device_states_t new_state)
00263 {
00264     return LORAWAN_STATUS_OK;
00265 }
00266 
00267 void LoRaWANStack::process_shutdown_state(lorawan_status_t &op_status)
00268 {
00269 }
00270 
00271 void LoRaWANStack::process_status_check_state()
00272 {
00273 }
00274 
00275 void LoRaWANStack::process_scheduling_state(lorawan_status_t &op_status)
00276 {
00277 }
00278 
00279 void LoRaWANStack::process_joining_state(lorawan_status_t &op_status)
00280 {
00281 }
00282 
00283 void LoRaWANStack::process_connected_state()
00284 {
00285 }
00286 
00287 void LoRaWANStack::process_connecting_state(lorawan_status_t &op_status)
00288 {
00289 }
00290 
00291 void LoRaWANStack::process_idle_state(lorawan_status_t &op_status)
00292 {
00293 }
00294 
00295 void LoRaWANStack::process_uninitialized_state(lorawan_status_t &op_status)
00296 {
00297 }
00298