mirror of https://github.com/ARMmbed/mbed-os.git
Cellular: fixed unit tests after rebase with latest changes.
parent
33461805cb
commit
2cadd9d05c
|
@ -10,6 +10,7 @@ TEST_SRC_FILES = \
|
||||||
main.cpp \
|
main.cpp \
|
||||||
utiltest.cpp \
|
utiltest.cpp \
|
||||||
test_util.cpp \
|
test_util.cpp \
|
||||||
|
../../stubs/randLIB_stub.cpp \
|
||||||
|
|
||||||
include ../../MakefileWorker.mk
|
include ../../MakefileWorker.mk
|
||||||
|
|
||||||
|
|
|
@ -90,21 +90,6 @@ nsapi_error_t AT_CellularNetwork::set_blocking(bool blocking)
|
||||||
return NSAPI_ERROR_OK;;
|
return NSAPI_ERROR_OK;;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsapi_error_t AT_CellularNetwork::set_context_to_be_activated()
|
|
||||||
{
|
|
||||||
return NSAPI_ERROR_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
//bool AT_CellularNetwork::set_new_context(nsapi_ip_stack_t stack, int cid)
|
|
||||||
//{
|
|
||||||
// return false;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//bool AT_CellularNetwork::get_context(nsapi_ip_stack_t requested_stack)
|
|
||||||
//{
|
|
||||||
// return false;
|
|
||||||
//}
|
|
||||||
|
|
||||||
nsapi_ip_stack_t AT_CellularNetwork::string_to_stack_type(const char* pdp_type)
|
nsapi_ip_stack_t AT_CellularNetwork::string_to_stack_type(const char* pdp_type)
|
||||||
{
|
{
|
||||||
return IPV4_STACK;
|
return IPV4_STACK;
|
||||||
|
@ -261,3 +246,11 @@ nsapi_error_t AT_CellularNetwork::get_operator_names(operator_names_list &op_nam
|
||||||
{
|
{
|
||||||
return NSAPI_ERROR_OK;
|
return NSAPI_ERROR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nsapi_error_t AT_CellularNetwork::do_user_authentication()
|
||||||
|
{
|
||||||
|
return NSAPI_ERROR_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ nsapi_error_t AT_CellularPower::set_at_mode()
|
||||||
return NSAPI_ERROR_OK;
|
return NSAPI_ERROR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsapi_error_t AT_CellularPower::set_power_level(int func_level)
|
nsapi_error_t AT_CellularPower::set_power_level(int func_level, int do_reset)
|
||||||
{
|
{
|
||||||
return NSAPI_ERROR_OK;
|
return NSAPI_ERROR_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2017, Arm Limited and affiliates.
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
#include "randLIB.h"
|
||||||
|
|
||||||
|
void randLIB_seed_random(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
uint16_t randLIB_get_random_in_range(uint16_t min, uint16_t max)
|
||||||
|
{
|
||||||
|
return min;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2017, Arm Limited and affiliates.
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
#ifndef FEATURES_CELLULAR_UNITTESTS_TARGET_H_RANDLIB_H_
|
||||||
|
#define FEATURES_CELLULAR_UNITTESTS_TARGET_H_RANDLIB_H_
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
extern void randLIB_seed_random(void);
|
||||||
|
|
||||||
|
uint16_t randLIB_get_random_in_range(uint16_t min, uint16_t max);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* FEATURES_CELLULAR_UNITTESTS_TARGET_H_RANDLIB_H_ */
|
|
@ -142,6 +142,7 @@ protected:
|
||||||
*/
|
*/
|
||||||
virtual nsapi_error_t set_access_technology_impl(RadioAccessTechnology op_rat);
|
virtual nsapi_error_t set_access_technology_impl(RadioAccessTechnology op_rat);
|
||||||
|
|
||||||
|
virtual nsapi_error_t do_user_authentication();
|
||||||
private:
|
private:
|
||||||
// "NO CARRIER" urc
|
// "NO CARRIER" urc
|
||||||
void urc_no_carrier();
|
void urc_no_carrier();
|
||||||
|
@ -179,7 +180,6 @@ protected:
|
||||||
AuthenticationType _authentication_type;
|
AuthenticationType _authentication_type;
|
||||||
int _cell_id;
|
int _cell_id;
|
||||||
nsapi_connection_status_t _connect_status;
|
nsapi_connection_status_t _connect_status;
|
||||||
virtual nsapi_error_t do_user_authentication();
|
|
||||||
bool _new_context_set;
|
bool _new_context_set;
|
||||||
bool _is_context_active;
|
bool _is_context_active;
|
||||||
RegistrationStatus _reg_status;
|
RegistrationStatus _reg_status;
|
||||||
|
|
Loading…
Reference in New Issue