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::set_credentials(const char *apn, 00037 const char *username, const char *password) 00038 { 00039 return NSAPI_ERROR_OK ; 00040 } 00041 00042 nsapi_error_t AT_CellularNetwork::set_credentials(const char *apn, 00043 AuthenticationType type, const char *username, const char *password) 00044 { 00045 return NSAPI_ERROR_OK ; 00046 } 00047 00048 nsapi_error_t AT_CellularNetwork::connect(const char *apn, 00049 const char *username, const char *password) 00050 { 00051 return connect(); 00052 } 00053 00054 nsapi_error_t AT_CellularNetwork::connect() 00055 { 00056 return NSAPI_ERROR_OK ; 00057 } 00058 00059 nsapi_error_t AT_CellularNetwork::open_data_channel() 00060 { 00061 return NSAPI_ERROR_OK ; 00062 } 00063 00064 nsapi_error_t AT_CellularNetwork::disconnect() 00065 { 00066 return NSAPI_ERROR_OK ; 00067 } 00068 00069 void AT_CellularNetwork::attach(Callback<void(nsapi_event_t, intptr_t)> status_cb) 00070 { 00071 } 00072 00073 nsapi_connection_status_t AT_CellularNetwork::get_connection_status() const 00074 { 00075 return NSAPI_STATUS_LOCAL_UP ; 00076 } 00077 00078 nsapi_error_t AT_CellularNetwork::set_blocking(bool blocking) 00079 { 00080 return NSAPI_ERROR_OK ;; 00081 } 00082 00083 nsapi_error_t AT_CellularNetwork::set_context_to_be_activated() 00084 { 00085 return NSAPI_ERROR_OK ; 00086 } 00087 00088 //bool AT_CellularNetwork::set_new_context(nsapi_ip_stack_t stack, int cid) 00089 //{ 00090 // return false; 00091 //} 00092 00093 //bool AT_CellularNetwork::get_context(nsapi_ip_stack_t requested_stack) 00094 //{ 00095 // return false; 00096 //} 00097 00098 nsapi_ip_stack_t AT_CellularNetwork::string_to_stack_type(const char* pdp_type) 00099 { 00100 return IPV4_STACK; 00101 } 00102 00103 nsapi_error_t AT_CellularNetwork::set_registration_urc(bool urc_on) 00104 { 00105 return NSAPI_ERROR_OK ; 00106 } 00107 00108 nsapi_error_t AT_CellularNetwork::set_registration(const char *plmn) 00109 { 00110 return NSAPI_ERROR_OK ; 00111 } 00112 00113 nsapi_error_t AT_CellularNetwork::get_registration_status(RegistrationType type, RegistrationStatus &status) 00114 { 00115 return NSAPI_ERROR_OK ; 00116 } 00117 00118 nsapi_error_t AT_CellularNetwork::get_cell_id(int &cell_id) 00119 { 00120 return NSAPI_ERROR_OK ; 00121 } 00122 00123 bool AT_CellularNetwork::has_registration(RegistrationType reg_type) 00124 { 00125 return false; 00126 } 00127 00128 nsapi_error_t AT_CellularNetwork::set_attach(int timeout) 00129 { 00130 return NSAPI_ERROR_OK ; 00131 } 00132 00133 nsapi_error_t AT_CellularNetwork::get_attach(AttachStatus &status) 00134 { 00135 return NSAPI_ERROR_OK ; 00136 } 00137 00138 00139 nsapi_error_t AT_CellularNetwork::get_apn_backoff_timer(int &backoffTime) 00140 { 00141 return NSAPI_ERROR_OK ; 00142 } 00143 00144 NetworkStack *AT_CellularNetwork::get_stack() 00145 { 00146 return NULL; 00147 } 00148 00149 const char *AT_CellularNetwork::get_ip_address() 00150 { 00151 return NULL; 00152 } 00153 00154 nsapi_error_t AT_CellularNetwork::set_stack_type(nsapi_ip_stack_t stack_type) 00155 { 00156 return NSAPI_ERROR_OK ; 00157 } 00158 00159 nsapi_ip_stack_t AT_CellularNetwork::get_stack_type() 00160 { 00161 return IPV4_STACK; 00162 } 00163 00164 bool AT_CellularNetwork::get_modem_stack_type(nsapi_ip_stack_t requested_stack) 00165 { 00166 return false; 00167 } 00168 00169 void AT_CellularNetwork::urc_no_carrier() 00170 { 00171 00172 } 00173 00174 nsapi_error_t AT_CellularNetwork::set_access_technology_impl(operator_t::RadioAccessTechnology opsAct) 00175 { 00176 return NSAPI_ERROR_OK ; 00177 } 00178 00179 nsapi_error_t AT_CellularNetwork::set_access_technology(operator_t::RadioAccessTechnology opAct) 00180 { 00181 return NSAPI_ERROR_OK ; 00182 } 00183 00184 nsapi_error_t AT_CellularNetwork::scan_plmn(operList_t &operators, int &opsCount) 00185 { 00186 return NSAPI_ERROR_OK ; 00187 } 00188 00189 nsapi_error_t AT_CellularNetwork::set_ciot_optimization_config(Supported_UE_Opt supported_opt, 00190 Preferred_UE_Opt preferred_opt) 00191 { 00192 return NSAPI_ERROR_OK ; 00193 } 00194 00195 nsapi_error_t AT_CellularNetwork::get_ciot_optimization_config(Supported_UE_Opt& supported_opt, 00196 Preferred_UE_Opt& preferred_opt) 00197 { 00198 return NSAPI_ERROR_OK ; 00199 } 00200 00201 nsapi_error_t AT_CellularNetwork::get_rate_control( 00202 CellularNetwork::RateControlExceptionReports &reports, 00203 CellularNetwork::RateControlUplinkTimeUnit &timeUnit, int &uplinkRate) 00204 { 00205 return NSAPI_ERROR_OK ; 00206 } 00207 00208 00209 nsapi_error_t AT_CellularNetwork::get_pdpcontext_params(pdpContextList_t& params_list) 00210 { 00211 return NSAPI_ERROR_OK ; 00212 } 00213 00214 nsapi_error_t AT_CellularNetwork::get_extended_signal_quality(int &rxlev, int &ber, int &rscp, int &ecno, int &rsrq, int &rsrp) 00215 { 00216 return NSAPI_ERROR_OK ; 00217 } 00218 00219 nsapi_error_t AT_CellularNetwork::get_signal_quality(int &rssi, int &ber) 00220 { 00221 return NSAPI_ERROR_OK ; 00222 } 00223 00224 nsapi_error_t AT_CellularNetwork::get_operator_params(int &format, operator_t &operator_params) 00225 { 00226 return NSAPI_ERROR_OK ; 00227 } 00228 00229 int AT_CellularNetwork::get_3gpp_error() 00230 { 00231 return 0; 00232 } 00233
Generated on Tue Jul 12 2022 13:29:21 by
