BA / Mbed OS BaBoRo_test2
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers AT_CellularNetwork_stub.cpp Source File

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 
00155 nsapi_error_t AT_CellularNetwork::get_apn_backoff_timer(int &backoffTime)
00156 {
00157     return NSAPI_ERROR_OK ;
00158 }
00159 
00160 NetworkStack *AT_CellularNetwork::get_stack()
00161 {
00162     return NULL;
00163 }
00164 
00165 const char *AT_CellularNetwork::get_ip_address()
00166 {
00167     return NULL;
00168 }
00169 
00170 nsapi_error_t AT_CellularNetwork::set_stack_type(nsapi_ip_stack_t stack_type)
00171 {
00172     return NSAPI_ERROR_OK ;
00173 }
00174 
00175 nsapi_ip_stack_t AT_CellularNetwork::get_stack_type()
00176 {
00177     return IPV4_STACK;
00178 }
00179 
00180 bool AT_CellularNetwork::get_modem_stack_type(nsapi_ip_stack_t requested_stack)
00181 {
00182     return false;
00183 }
00184 
00185 void AT_CellularNetwork::urc_no_carrier()
00186 {
00187 
00188 }
00189 
00190 nsapi_error_t AT_CellularNetwork::set_access_technology_impl(RadioAccessTechnology opsAct)
00191 {
00192     return NSAPI_ERROR_OK ;
00193 }
00194 
00195 nsapi_error_t AT_CellularNetwork::set_access_technology(RadioAccessTechnology opAct)
00196 {
00197     return NSAPI_ERROR_OK ;
00198 }
00199 
00200 nsapi_error_t AT_CellularNetwork::get_access_technology(RadioAccessTechnology& rat)
00201 {
00202     rat = RAT_CATM1;
00203     return NSAPI_ERROR_OK ;
00204 }
00205 
00206 nsapi_error_t AT_CellularNetwork::scan_plmn(operList_t &operators, int &opsCount)
00207 {
00208     return NSAPI_ERROR_OK ;
00209 }
00210 
00211 nsapi_error_t AT_CellularNetwork::set_ciot_optimization_config(Supported_UE_Opt supported_opt,
00212                                                                Preferred_UE_Opt preferred_opt)
00213 {
00214     return NSAPI_ERROR_OK ;
00215 }
00216 
00217 nsapi_error_t AT_CellularNetwork::get_ciot_optimization_config(Supported_UE_Opt& supported_opt,
00218                                                                Preferred_UE_Opt& preferred_opt)
00219 {
00220     return NSAPI_ERROR_OK ;
00221 }
00222 
00223 nsapi_error_t AT_CellularNetwork::get_rate_control(
00224         CellularNetwork::RateControlExceptionReports &reports,
00225         CellularNetwork::RateControlUplinkTimeUnit &timeUnit, int &uplinkRate)
00226 {
00227     return NSAPI_ERROR_OK ;
00228 }
00229 
00230 
00231 nsapi_error_t AT_CellularNetwork::get_pdpcontext_params(pdpContextList_t& params_list)
00232 {
00233     return NSAPI_ERROR_OK ;
00234 }
00235 
00236 nsapi_error_t AT_CellularNetwork::get_extended_signal_quality(int &rxlev, int &ber, int &rscp, int &ecno, int &rsrq, int &rsrp)
00237 {
00238     return NSAPI_ERROR_OK ;
00239 }
00240 
00241 nsapi_error_t AT_CellularNetwork::get_signal_quality(int &rssi, int &ber)
00242 {
00243     return NSAPI_ERROR_OK ;
00244 }
00245 
00246 nsapi_error_t AT_CellularNetwork::get_operator_params(int &format, operator_t &operator_params)
00247 {
00248     return NSAPI_ERROR_OK ;
00249 }
00250 
00251 int AT_CellularNetwork::get_3gpp_error()
00252 {
00253     return 0;
00254 }
00255