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.
AT_CellularNetwork_stub.cpp
00001 /* 00002 * Copyright (c) 2017, 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 "AT_CellularNetwork.h" 00019 #include "CellularNetwork.h" 00020 #include "CellularUtil.h" 00021 #include "CellularLog.h" 00022 #include "FileHandle.h" 00023 #include "nsapi_types.h" 00024 00025 using namespace mbed; 00026 using namespace mbed_cellular_util; 00027 00028 AT_CellularNetwork::AT_CellularNetwork(ATHandler &atHandler) : AT_CellularBase(atHandler) 00029 { 00030 } 00031 00032 AT_CellularNetwork::~AT_CellularNetwork() 00033 { 00034 } 00035 00036 nsapi_error_t AT_CellularNetwork::init() 00037 { 00038 return NSAPI_ERROR_OK ; 00039 } 00040 00041 nsapi_error_t AT_CellularNetwork::set_credentials(const char *apn, 00042 const char *username, const char *password) 00043 { 00044 return NSAPI_ERROR_OK ; 00045 } 00046 00047 nsapi_error_t AT_CellularNetwork::set_credentials(const char *apn, 00048 AuthenticationType type, const char *username, const char *password) 00049 { 00050 return NSAPI_ERROR_OK ; 00051 } 00052 00053 nsapi_error_t AT_CellularNetwork::connect(const char *apn, 00054 const char *username, const char *password) 00055 { 00056 return connect(); 00057 } 00058 00059 nsapi_error_t AT_CellularNetwork::connect() 00060 { 00061 return NSAPI_ERROR_OK ; 00062 } 00063 00064 nsapi_error_t AT_CellularNetwork::activate_context() 00065 { 00066 return NSAPI_ERROR_OK ; 00067 } 00068 00069 nsapi_error_t AT_CellularNetwork::open_data_channel() 00070 { 00071 return NSAPI_ERROR_OK ; 00072 } 00073 00074 nsapi_error_t AT_CellularNetwork::disconnect() 00075 { 00076 return NSAPI_ERROR_OK ; 00077 } 00078 00079 void AT_CellularNetwork::attach(Callback<void(nsapi_event_t, intptr_t)> status_cb) 00080 { 00081 } 00082 00083 nsapi_connection_status_t AT_CellularNetwork::get_connection_status() const 00084 { 00085 return NSAPI_STATUS_LOCAL_UP ; 00086 } 00087 00088 nsapi_error_t AT_CellularNetwork::set_blocking(bool blocking) 00089 { 00090 return NSAPI_ERROR_OK ;; 00091 } 00092 00093 nsapi_error_t AT_CellularNetwork::set_context_to_be_activated() 00094 { 00095 return NSAPI_ERROR_OK ; 00096 } 00097 00098 //bool AT_CellularNetwork::set_new_context(nsapi_ip_stack_t stack, int cid) 00099 //{ 00100 // return false; 00101 //} 00102 00103 //bool AT_CellularNetwork::get_context(nsapi_ip_stack_t requested_stack) 00104 //{ 00105 // return false; 00106 //} 00107 00108 nsapi_ip_stack_t AT_CellularNetwork::string_to_stack_type(const char* pdp_type) 00109 { 00110 return IPV4_STACK; 00111 } 00112 00113 nsapi_error_t AT_CellularNetwork::set_registration_urc(RegistrationType type, bool urc_on) 00114 { 00115 return NSAPI_ERROR_OK ; 00116 } 00117 00118 nsapi_error_t AT_CellularNetwork::get_network_registering_mode(NWRegisteringMode& mode) 00119 { 00120 mode = NWModeAutomatic; 00121 return NSAPI_ERROR_OK ; 00122 } 00123 00124 nsapi_error_t AT_CellularNetwork::set_registration(const char *plmn) 00125 { 00126 return NSAPI_ERROR_OK ; 00127 } 00128 00129 nsapi_error_t AT_CellularNetwork::get_registration_status(RegistrationType type, RegistrationStatus &status) 00130 { 00131 return NSAPI_ERROR_OK ; 00132 } 00133 00134 nsapi_error_t AT_CellularNetwork::get_cell_id(int &cell_id) 00135 { 00136 return NSAPI_ERROR_OK ; 00137 } 00138 00139 bool AT_CellularNetwork::has_registration(RegistrationType reg_type) 00140 { 00141 return false; 00142 } 00143 00144 nsapi_error_t AT_CellularNetwork::set_attach(int timeout) 00145 { 00146 return NSAPI_ERROR_OK ; 00147 } 00148 00149 nsapi_error_t AT_CellularNetwork::get_attach(AttachStatus &status) 00150 { 00151 return NSAPI_ERROR_OK ; 00152 } 00153 00154 nsapi_error_t AT_CellularNetwork::detach() 00155 { 00156 return NSAPI_ERROR_OK ; 00157 } 00158 00159 nsapi_error_t AT_CellularNetwork::get_apn_backoff_timer(int &backoffTime) 00160 { 00161 return NSAPI_ERROR_OK ; 00162 } 00163 00164 NetworkStack *AT_CellularNetwork::get_stack() 00165 { 00166 return NULL; 00167 } 00168 00169 const char *AT_CellularNetwork::get_ip_address() 00170 { 00171 return NULL; 00172 } 00173 00174 nsapi_error_t AT_CellularNetwork::set_stack_type(nsapi_ip_stack_t stack_type) 00175 { 00176 return NSAPI_ERROR_OK ; 00177 } 00178 00179 nsapi_ip_stack_t AT_CellularNetwork::get_stack_type() 00180 { 00181 return IPV4_STACK; 00182 } 00183 00184 bool AT_CellularNetwork::get_modem_stack_type(nsapi_ip_stack_t requested_stack) 00185 { 00186 return false; 00187 } 00188 00189 void AT_CellularNetwork::urc_no_carrier() 00190 { 00191 00192 } 00193 00194 nsapi_error_t AT_CellularNetwork::set_access_technology_impl(RadioAccessTechnology opsAct) 00195 { 00196 return NSAPI_ERROR_OK ; 00197 } 00198 00199 nsapi_error_t AT_CellularNetwork::set_access_technology(RadioAccessTechnology opAct) 00200 { 00201 return NSAPI_ERROR_OK ; 00202 } 00203 00204 nsapi_error_t AT_CellularNetwork::get_access_technology(RadioAccessTechnology& rat) 00205 { 00206 rat = RAT_CATM1; 00207 return NSAPI_ERROR_OK ; 00208 } 00209 00210 nsapi_error_t AT_CellularNetwork::scan_plmn(operList_t &operators, int &opsCount) 00211 { 00212 return NSAPI_ERROR_OK ; 00213 } 00214 00215 nsapi_error_t AT_CellularNetwork::set_ciot_optimization_config(Supported_UE_Opt supported_opt, 00216 Preferred_UE_Opt preferred_opt) 00217 { 00218 return NSAPI_ERROR_OK ; 00219 } 00220 00221 nsapi_error_t AT_CellularNetwork::get_ciot_optimization_config(Supported_UE_Opt& supported_opt, 00222 Preferred_UE_Opt& preferred_opt) 00223 { 00224 return NSAPI_ERROR_OK ; 00225 } 00226 00227 nsapi_error_t AT_CellularNetwork::get_rate_control( 00228 CellularNetwork::RateControlExceptionReports &reports, 00229 CellularNetwork::RateControlUplinkTimeUnit &timeUnit, int &uplinkRate) 00230 { 00231 return NSAPI_ERROR_OK ; 00232 } 00233 00234 00235 nsapi_error_t AT_CellularNetwork::get_pdpcontext_params(pdpContextList_t& params_list) 00236 { 00237 return NSAPI_ERROR_OK ; 00238 } 00239 00240 nsapi_error_t AT_CellularNetwork::get_extended_signal_quality(int &rxlev, int &ber, int &rscp, int &ecno, int &rsrq, int &rsrp) 00241 { 00242 return NSAPI_ERROR_OK ; 00243 } 00244 00245 nsapi_error_t AT_CellularNetwork::get_signal_quality(int &rssi, int &ber) 00246 { 00247 return NSAPI_ERROR_OK ; 00248 } 00249 00250 nsapi_error_t AT_CellularNetwork::get_operator_params(int &format, operator_t &operator_params) 00251 { 00252 return NSAPI_ERROR_OK ; 00253 } 00254 00255 int AT_CellularNetwork::get_3gpp_error() 00256 { 00257 return 0; 00258 } 00259 00260 nsapi_error_t AT_CellularNetwork::get_operator_names(operator_names_list &op_names) 00261 { 00262 return NSAPI_ERROR_OK ; 00263 }
Generated on Tue Jul 12 2022 18:18:27 by
1.7.2