diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/AT_CellularBase_unit_tests b/features/cellular/UNITTESTS/at/at_cellularbase/AT_CellularBase_unit_tests
deleted file mode 100755
index 98879e8c77..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularbase/AT_CellularBase_unit_tests and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/AT_CellularBase_unit_tests.txt b/features/cellular/UNITTESTS/at/at_cellularbase/AT_CellularBase_unit_tests.txt
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/cpputest_AT_CellularBase.xml b/features/cellular/UNITTESTS/at/at_cellularbase/cpputest_AT_CellularBase.xml
deleted file mode 100644
index a0d7dde497..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularbase/cpputest_AT_CellularBase.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/gcov/AT_CellularBase.cpp.gcov b/features/cellular/UNITTESTS/at/at_cellularbase/gcov/AT_CellularBase.cpp.gcov
deleted file mode 100644
index b9ed80e5a5..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularbase/gcov/AT_CellularBase.cpp.gcov
+++ /dev/null
@@ -1,41 +0,0 @@
- -: 0:Source:../../../framework/AT/AT_CellularBase.cpp
- -: 0:Graph:objs/AT_CellularBase_unit/AT_CellularBase.gcno
- -: 0:Data:objs/AT_CellularBase_unit/AT_CellularBase.gcda
- -: 0:Runs:1
- -: 0:Programs:1
- -: 1:/*
- -: 2: * Copyright (c) 2017, Arm Limited and affiliates.
- -: 3: * SPDX-License-Identifier: Apache-2.0
- -: 4: *
- -: 5: * Licensed under the Apache License, Version 2.0 (the "License");
- -: 6: * you may not use this file except in compliance with the License.
- -: 7: * You may obtain a copy of the License at
- -: 8: *
- -: 9: * http://www.apache.org/licenses/LICENSE-2.0
- -: 10: *
- -: 11: * Unless required by applicable law or agreed to in writing, software
- -: 12: * distributed under the License is distributed on an "AS IS" BASIS,
- -: 13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- -: 14: * See the License for the specific language governing permissions and
- -: 15: * limitations under the License.
- -: 16: */
- -: 17:
- -: 18:#include "AT_CellularBase.h"
- -: 19:
- -: 20:using namespace mbed;
- -: 21:
- 2: 22:AT_CellularBase::AT_CellularBase(ATHandler& at) : _at(at)
- -: 23:{
- -: 24:
- 2: 25:}
- -: 26:
- 1: 27:ATHandler& AT_CellularBase::get_at_handler()
- -: 28:{
- 1: 29: return _at;
- -: 30:}
- -: 31:
- 1: 32:device_err_t AT_CellularBase::get_device_error() const
- -: 33:{
- 1: 34: return _at.get_last_device_error();
- -: 35:}
- -: 36:
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/gcov/gcov_error.txt b/features/cellular/UNITTESTS/at/at_cellularbase/gcov/gcov_error.txt
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/gcov/gcov_output.txt b/features/cellular/UNITTESTS/at/at_cellularbase/gcov/gcov_output.txt
deleted file mode 100644
index f5f6811fb5..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularbase/gcov/gcov_output.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-File '../../../framework/AT/AT_CellularBase.cpp'
-Lines executed:100.00% of 6
-Creating 'AT_CellularBase.cpp.gcov'
-
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/gcov/gcov_report.txt b/features/cellular/UNITTESTS/at/at_cellularbase/gcov/gcov_report.txt
deleted file mode 100644
index 437cb58276..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularbase/gcov/gcov_report.txt
+++ /dev/null
@@ -1 +0,0 @@
-100.00% ../framework/AT/AT_CellularBase.cpp
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/gcov/gcov_report.txt.html b/features/cellular/UNITTESTS/at/at_cellularbase/gcov/gcov_report.txt.html
deleted file mode 100644
index 4dfb7ce3a0..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularbase/gcov/gcov_report.txt.html
+++ /dev/null
@@ -1,4 +0,0 @@
-
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/lib/libAT_CellularBase_unit.a b/features/cellular/UNITTESTS/at/at_cellularbase/lib/libAT_CellularBase_unit.a
deleted file mode 100644
index 6845666402..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularbase/lib/libAT_CellularBase_unit.a and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/ATHandler_stub.d b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/ATHandler_stub.d
deleted file mode 100644
index 7fc1c10b28..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/ATHandler_stub.d
+++ /dev/null
@@ -1,78 +0,0 @@
-objs/AT_CellularBase_unit/ATHandler_stub.o: \
- ../../stubs/ATHandler_stub.cpp \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../framework/AT/ATHandler.h \
- ../../target_h/platform/mbed_retarget.h \
- ../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
- ../../../../../events/equeue/equeue_platform.h \
- ../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h \
- ../../../../../platform/PlatformMutex.h \
- ../../../../../platform/Callback.h ../../stubs/ATHandler_stub.h \
- ../../stubs/FileHandle_stub.h ../../../../../platform/FileHandle.h \
- ../../../../../platform/Callback.h ../../../../../platform/mbed_poll.h \
- ../../../../../platform/platform.h ../../target_h/device.h \
- ../../target_h/PinNames.h ../../target_h/PeripheralNames.h \
- ../../../framework/common/CellularLog.h \
- ../../../../../hal/us_ticker_api.h ../../../../../hal/ticker_api.h \
- ../../../../../platform/mbed_debug.h
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../framework/AT/ATHandler.h:
-
-../../target_h/platform/mbed_retarget.h:
-
-../../../../../events/EventQueue.h:
-
-../../../../../events/equeue/equeue.h:
-
-../../../../../events/equeue/equeue_platform.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
-
-../../../../../platform/PlatformMutex.h:
-
-../../../../../platform/Callback.h:
-
-../../stubs/ATHandler_stub.h:
-
-../../stubs/FileHandle_stub.h:
-
-../../../../../platform/FileHandle.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_poll.h:
-
-../../../../../platform/platform.h:
-
-../../target_h/device.h:
-
-../../target_h/PinNames.h:
-
-../../target_h/PeripheralNames.h:
-
-../../../framework/common/CellularLog.h:
-
-../../../../../hal/us_ticker_api.h:
-
-../../../../../hal/ticker_api.h:
-
-../../../../../platform/mbed_debug.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/ATHandler_stub.gcda b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/ATHandler_stub.gcda
deleted file mode 100644
index edaa0e77da..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/ATHandler_stub.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/ATHandler_stub.gcno b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/ATHandler_stub.gcno
deleted file mode 100644
index c731ced0df..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/ATHandler_stub.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/ATHandler_stub.o b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/ATHandler_stub.o
deleted file mode 100644
index 1e4754e2cf..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/ATHandler_stub.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/AT_CellularBase.d b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/AT_CellularBase.d
deleted file mode 100644
index 8f91415700..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/AT_CellularBase.d
+++ /dev/null
@@ -1,48 +0,0 @@
-objs/AT_CellularBase_unit/AT_CellularBase.o: \
- ../../../framework/AT/AT_CellularBase.cpp \
- ../../../framework/AT/AT_CellularBase.h \
- ../../../framework/AT/ATHandler.h \
- ../../target_h/platform/mbed_retarget.h \
- ../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
- ../../../../../events/equeue/equeue_platform.h \
- ../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h \
- ../../../../../platform/PlatformMutex.h \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../../../platform/Callback.h
-
-../../../framework/AT/AT_CellularBase.h:
-
-../../../framework/AT/ATHandler.h:
-
-../../target_h/platform/mbed_retarget.h:
-
-../../../../../events/EventQueue.h:
-
-../../../../../events/equeue/equeue.h:
-
-../../../../../events/equeue/equeue_platform.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
-
-../../../../../platform/PlatformMutex.h:
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../../../platform/Callback.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/AT_CellularBase.gcda b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/AT_CellularBase.gcda
deleted file mode 100644
index dbf7d8ce66..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/AT_CellularBase.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/AT_CellularBase.gcno b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/AT_CellularBase.gcno
deleted file mode 100644
index 64b7489199..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/AT_CellularBase.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/AT_CellularBase.o b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/AT_CellularBase.o
deleted file mode 100644
index b38a129066..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/AT_CellularBase.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/EventQueue_stub.d b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/EventQueue_stub.d
deleted file mode 100644
index e6204831db..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/EventQueue_stub.d
+++ /dev/null
@@ -1,32 +0,0 @@
-objs/AT_CellularBase_unit/EventQueue_stub.o: \
- ../../stubs/EventQueue_stub.cpp ../../../../../events/EventQueue.h \
- ../../../../../events/equeue/equeue.h \
- ../../../../../events/equeue/equeue_platform.h \
- ../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h ../../../../../platform/Callback.h
-
-../../../../../events/EventQueue.h:
-
-../../../../../events/equeue/equeue.h:
-
-../../../../../events/equeue/equeue_platform.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
-
-../../../../../platform/Callback.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/EventQueue_stub.gcda b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/EventQueue_stub.gcda
deleted file mode 100644
index 6219437bbb..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/EventQueue_stub.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/EventQueue_stub.gcno b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/EventQueue_stub.gcno
deleted file mode 100644
index 0301777f6f..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/EventQueue_stub.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/EventQueue_stub.o b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/EventQueue_stub.o
deleted file mode 100644
index dae2039ef1..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/EventQueue_stub.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/FileHandle_stub.d b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/FileHandle_stub.d
deleted file mode 100644
index 51d121c5f2..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/FileHandle_stub.d
+++ /dev/null
@@ -1,42 +0,0 @@
-objs/AT_CellularBase_unit/FileHandle_stub.o: \
- ../../stubs/FileHandle_stub.cpp ../../stubs/FileHandle_stub.h \
- ../../../../../platform/FileHandle.h ../../../../../platform/Callback.h \
- ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_poll.h ../../../../../platform/platform.h \
- ../../target_h/platform/mbed_retarget.h ../../target_h/device.h \
- ../../target_h/PinNames.h ../../target_h/PeripheralNames.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h
-
-../../stubs/FileHandle_stub.h:
-
-../../../../../platform/FileHandle.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_poll.h:
-
-../../../../../platform/platform.h:
-
-../../target_h/platform/mbed_retarget.h:
-
-../../target_h/device.h:
-
-../../target_h/PinNames.h:
-
-../../target_h/PeripheralNames.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/FileHandle_stub.gcda b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/FileHandle_stub.gcda
deleted file mode 100644
index 05fa86636a..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/FileHandle_stub.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/FileHandle_stub.gcno b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/FileHandle_stub.gcno
deleted file mode 100644
index d733a8f7c8..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/FileHandle_stub.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/FileHandle_stub.o b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/FileHandle_stub.o
deleted file mode 100644
index f1d920bc2b..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/FileHandle_stub.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/at_cellularbasetest.d b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/at_cellularbasetest.d
deleted file mode 100644
index 6b68fe75e2..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/at_cellularbasetest.d
+++ /dev/null
@@ -1,49 +0,0 @@
-objs/AT_CellularBase_unit/at_cellularbasetest.o: at_cellularbasetest.cpp \
- test_at_cellularbase.h ../../../framework/AT/AT_CellularBase.h \
- ../../../framework/AT/ATHandler.h \
- ../../target_h/platform/mbed_retarget.h \
- ../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
- ../../../../../events/equeue/equeue_platform.h \
- ../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h \
- ../../../../../platform/PlatformMutex.h \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../../../platform/Callback.h
-
-test_at_cellularbase.h:
-
-../../../framework/AT/AT_CellularBase.h:
-
-../../../framework/AT/ATHandler.h:
-
-../../target_h/platform/mbed_retarget.h:
-
-../../../../../events/EventQueue.h:
-
-../../../../../events/equeue/equeue.h:
-
-../../../../../events/equeue/equeue_platform.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
-
-../../../../../platform/PlatformMutex.h:
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../../../platform/Callback.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/at_cellularbasetest.gcda b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/at_cellularbasetest.gcda
deleted file mode 100644
index d70d184449..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/at_cellularbasetest.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/at_cellularbasetest.gcno b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/at_cellularbasetest.gcno
deleted file mode 100644
index d3ae36f4b5..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/at_cellularbasetest.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/at_cellularbasetest.o b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/at_cellularbasetest.o
deleted file mode 100644
index 38302eef3f..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/at_cellularbasetest.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/main.d b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/main.d
deleted file mode 100644
index 0f63d956fe..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/main.d
+++ /dev/null
@@ -1 +0,0 @@
-objs/AT_CellularBase_unit/main.o: main.cpp
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/main.gcda b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/main.gcda
deleted file mode 100644
index b3dc0e1f25..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/main.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/main.gcno b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/main.gcno
deleted file mode 100644
index f5d6a89d56..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/main.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/main.o b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/main.o
deleted file mode 100644
index de97687fee..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/main.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/mbed_assert_stub.d b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/mbed_assert_stub.d
deleted file mode 100644
index b3085c20df..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/mbed_assert_stub.d
+++ /dev/null
@@ -1,7 +0,0 @@
-objs/AT_CellularBase_unit/mbed_assert_stub.o: \
- ../../stubs/mbed_assert_stub.cpp ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/mbed_assert_stub.gcda b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/mbed_assert_stub.gcda
deleted file mode 100644
index bfc1105327..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/mbed_assert_stub.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/mbed_assert_stub.gcno b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/mbed_assert_stub.gcno
deleted file mode 100644
index d2b5caddaa..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/mbed_assert_stub.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/mbed_assert_stub.o b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/mbed_assert_stub.o
deleted file mode 100644
index cca314c8f4..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/mbed_assert_stub.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/test_at_cellularbase.d b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/test_at_cellularbase.d
deleted file mode 100644
index 0b712292c0..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/test_at_cellularbase.d
+++ /dev/null
@@ -1,77 +0,0 @@
-objs/AT_CellularBase_unit/test_at_cellularbase.o: \
- test_at_cellularbase.cpp test_at_cellularbase.h \
- ../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
- ../../../../../events/equeue/equeue_platform.h \
- ../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h \
- ../../../framework/AT/AT_CellularBase.h \
- ../../../framework/AT/ATHandler.h \
- ../../target_h/platform/mbed_retarget.h \
- ../../../../../platform/PlatformMutex.h \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../../../platform/Callback.h ../../stubs/ATHandler_stub.h \
- ../../../framework/AT/ATHandler.h ../../stubs/FileHandle_stub.h \
- ../../../../../platform/FileHandle.h ../../../../../platform/Callback.h \
- ../../../../../platform/mbed_poll.h ../../../../../platform/platform.h \
- ../../target_h/device.h ../../target_h/PinNames.h \
- ../../target_h/PeripheralNames.h ../../stubs/FileHandle_stub.h
-
-test_at_cellularbase.h:
-
-../../../../../events/EventQueue.h:
-
-../../../../../events/equeue/equeue.h:
-
-../../../../../events/equeue/equeue_platform.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
-
-../../../framework/AT/AT_CellularBase.h:
-
-../../../framework/AT/ATHandler.h:
-
-../../target_h/platform/mbed_retarget.h:
-
-../../../../../platform/PlatformMutex.h:
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../../../platform/Callback.h:
-
-../../stubs/ATHandler_stub.h:
-
-../../../framework/AT/ATHandler.h:
-
-../../stubs/FileHandle_stub.h:
-
-../../../../../platform/FileHandle.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_poll.h:
-
-../../../../../platform/platform.h:
-
-../../target_h/device.h:
-
-../../target_h/PinNames.h:
-
-../../target_h/PeripheralNames.h:
-
-../../stubs/FileHandle_stub.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/test_at_cellularbase.gcda b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/test_at_cellularbase.gcda
deleted file mode 100644
index 279641080c..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/test_at_cellularbase.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/test_at_cellularbase.gcno b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/test_at_cellularbase.gcno
deleted file mode 100644
index 941f55b885..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/test_at_cellularbase.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/test_at_cellularbase.o b/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/test_at_cellularbase.o
deleted file mode 100644
index c208887586..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularbase/objs/AT_CellularBase_unit/test_at_cellularbase.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/AT_CellularDevice_unit_tests b/features/cellular/UNITTESTS/at/at_cellulardevice/AT_CellularDevice_unit_tests
deleted file mode 100755
index 9d2d3b5e58..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/AT_CellularDevice_unit_tests and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/AT_CellularDevice_unit_tests.txt b/features/cellular/UNITTESTS/at/at_cellulardevice/AT_CellularDevice_unit_tests.txt
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/cpputest_AT_CellularDevice.xml b/features/cellular/UNITTESTS/at/at_cellulardevice/cpputest_AT_CellularDevice.xml
deleted file mode 100644
index ffa6e8d915..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellulardevice/cpputest_AT_CellularDevice.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/gcov/AT_CellularDevice.cpp.gcov b/features/cellular/UNITTESTS/at/at_cellulardevice/gcov/AT_CellularDevice.cpp.gcov
deleted file mode 100644
index b0a09410f6..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellulardevice/gcov/AT_CellularDevice.cpp.gcov
+++ /dev/null
@@ -1,253 +0,0 @@
- -: 0:Source:../../../framework/AT/AT_CellularDevice.cpp
- -: 0:Graph:objs/AT_CellularDevice_unit/AT_CellularDevice.gcno
- -: 0:Data:objs/AT_CellularDevice_unit/AT_CellularDevice.gcda
- -: 0:Runs:1
- -: 0:Programs:1
- -: 1:/*
- -: 2: * Copyright (c) 2017, Arm Limited and affiliates.
- -: 3: * SPDX-License-Identifier: Apache-2.0
- -: 4: *
- -: 5: * Licensed under the Apache License, Version 2.0 (the "License");
- -: 6: * you may not use this file except in compliance with the License.
- -: 7: * You may obtain a copy of the License at
- -: 8: *
- -: 9: * http://www.apache.org/licenses/LICENSE-2.0
- -: 10: *
- -: 11: * Unless required by applicable law or agreed to in writing, software
- -: 12: * distributed under the License is distributed on an "AS IS" BASIS,
- -: 13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- -: 14: * See the License for the specific language governing permissions and
- -: 15: * limitations under the License.
- -: 16: */
- -: 17:
- -: 18:#include "AT_CellularDevice.h"
- -: 19:
- -: 20:using namespace events;
- -: 21:using namespace mbed;
- -: 22:
- -: 23:#define DEFAULT_AT_TIMEOUT 1000 // at default timeout in milliseconds
- -: 24:
- 10: 25:AT_CellularDevice::AT_CellularDevice(EventQueue &queue) :
- 10: 26: _atHandlers(0), _network(0), _sms(0), _sim(0), _power(0), _multiplexer(0), _information(0), _queue(queue), _default_timeout(DEFAULT_AT_TIMEOUT)
- -: 27:{
- 10: 28:}
- -: 29:
- 21: 30:AT_CellularDevice::~AT_CellularDevice()
- -: 31:{
- 10: 32: close_network();
- 10: 33: close_sms();
- 10: 34: close_power();
- 10: 35: close_sim();
- 10: 36: close_multiplexer();
- 10: 37: close_information();
- -: 38:
- 10: 39: ATHandler *atHandler = _atHandlers;
- 26: 40: while (atHandler) {
- 8: 41: ATHandler *old = atHandler;
- 8: 42: atHandler = atHandler->_nextATHandler;
- 8: 43: delete old;
- 8: 44: old = NULL;
- -: 45: }
- 11: 46:}
- -: 47:
- -: 48:// each parser is associated with one filehandle (that is UART or a MUX channel)
- 18: 49:ATHandler* AT_CellularDevice::get_at_handler(FileHandle *fileHandle)
- -: 50:{
- 18: 51: if (!fileHandle) {
- 6: 52: return NULL;
- -: 53: }
- 12: 54: ATHandler *atHandler = _atHandlers;
- 18: 55: while (atHandler) {
- 5: 56: if (atHandler->get_file_handle() == fileHandle) {
- 2: 57: atHandler->inc_ref_count();
- 2: 58: return atHandler;
- -: 59: }
- 3: 60: atHandler = atHandler->_nextATHandler;
- -: 61: }
- -: 62:
- 10: 63: atHandler = new ATHandler(fileHandle, _queue, _default_timeout);
- 10: 64: if (atHandler) {
- 10: 65: atHandler->_nextATHandler = _atHandlers;
- 10: 66: _atHandlers = atHandler;
- -: 67: }
- -: 68:
- 10: 69: return atHandler;
- -: 70:}
- -: 71:
- 12: 72:void AT_CellularDevice::release_at_handler(ATHandler* at_handler)
- -: 73:{
- 12: 74: if (!at_handler) {
- 1: 75: return;
- -: 76: }
- 11: 77: at_handler->dec_ref_count();
- 11: 78: if (at_handler->get_ref_count() == 0) {
- -: 79: // we can delete this at_handler
- 11: 80: ATHandler *atHandler = _atHandlers;
- 11: 81: ATHandler *prev = NULL;
- 37: 82: while (atHandler) {
- 15: 83: if (atHandler == at_handler) {
- 2: 84: if (prev == NULL) {
- 1: 85: _atHandlers = _atHandlers->_nextATHandler;
- -: 86: }
- -: 87: else {
- 1: 88: prev->_nextATHandler = atHandler->_nextATHandler;
- -: 89: }
- 2: 90: delete atHandler;
- 2: 91: atHandler = NULL;
- 2: 92: break;
- -: 93: } else {
- 13: 94: prev = atHandler;
- 13: 95: atHandler =atHandler->_nextATHandler;
- -: 96: }
- -: 97: }
- -: 98: }
- -: 99:}
- -: 100:
- 3: 101:CellularNetwork *AT_CellularDevice::open_network(FileHandle *fh)
- -: 102:{
- 3: 103: if (!_network) {
- 3: 104: ATHandler *atHandler = get_at_handler(fh);
- 3: 105: if (atHandler) {
- 2: 106: _network = new AT_CellularNetwork(*atHandler);
- 2: 107: if (!_network) {
- #####: 108: release_at_handler(atHandler);
- -: 109: }
- -: 110: }
- -: 111: }
- 3: 112: return _network;
- -: 113:}
- -: 114:
- 3: 115:CellularSMS *AT_CellularDevice::open_sms(FileHandle *fh)
- -: 116:{
- 3: 117: if (!_sms) {
- 3: 118: ATHandler *atHandler = get_at_handler(fh);
- 3: 119: if (atHandler) {
- 2: 120: _sms = new AT_CellularSMS(*atHandler);
- 2: 121: if (!_sms) {
- #####: 122: release_at_handler(atHandler);
- -: 123: }
- -: 124: }
- -: 125: }
- 3: 126: return _sms;
- -: 127:}
- -: 128:
- 3: 129:CellularSIM *AT_CellularDevice::open_sim(FileHandle *fh)
- -: 130:{
- 3: 131: if (!_sim) {
- 3: 132: ATHandler *atHandler = get_at_handler(fh);
- 3: 133: if (atHandler) {
- 2: 134: _sim = new AT_CellularSIM(*atHandler);
- 2: 135: if (!_sim) {
- #####: 136: release_at_handler(atHandler);
- -: 137: }
- -: 138: }
- -: 139: }
- 3: 140: return _sim;
- -: 141:}
- -: 142:
- 3: 143:CellularPower *AT_CellularDevice::open_power(FileHandle *fh)
- -: 144:{
- 3: 145: if (!_power) {
- 3: 146: ATHandler *atHandler = get_at_handler(fh);
- 3: 147: if (atHandler) {
- 2: 148: _power = new AT_CellularPower(*atHandler);
- 2: 149: if (!_power) {
- #####: 150: release_at_handler(atHandler);
- -: 151: }
- -: 152: }
- -: 153: }
- 3: 154: return _power;
- -: 155:}
- -: 156:
- 2: 157:CellularMultiplexer *AT_CellularDevice::open_multiplexer(FileHandle *fh)
- -: 158:{
- 2: 159: if (!_multiplexer) {
- 2: 160: ATHandler *atHandler = get_at_handler(fh);
- 2: 161: if (atHandler) {
- 1: 162: _multiplexer = new AT_CellularMultiplexer(*atHandler);
- 1: 163: if (!_multiplexer) {
- #####: 164: release_at_handler(atHandler);
- -: 165: }
- -: 166: }
- -: 167: }
- -: 168:
- 2: 169: return _multiplexer;
- -: 170:}
- -: 171:
- 4: 172:CellularInformation *AT_CellularDevice::open_information(FileHandle *fh)
- -: 173:{
- 4: 174: if (!_information) {
- 4: 175: ATHandler *atHandler = get_at_handler(fh);
- 4: 176: if (atHandler) {
- 3: 177: _information = new AT_CellularInformation(*atHandler);
- 3: 178: if (!_information) {
- #####: 179: release_at_handler(atHandler);
- -: 180: }
- -: 181: }
- -: 182: }
- 4: 183: return _information;
- -: 184:}
- -: 185:
- 10: 186:void AT_CellularDevice::close_network()
- -: 187:{
- 10: 188: if (_network) {
- 2: 189: release_at_handler(&_network->get_at_handler());
- 2: 190: delete _network;
- 2: 191: _network = NULL;
- -: 192: }
- 10: 193:}
- -: 194:
- 10: 195:void AT_CellularDevice::close_sms()
- -: 196:{
- 10: 197: if (_sms) {
- 2: 198: release_at_handler(&_sms->get_at_handler());
- 2: 199: delete _sms;
- 2: 200: _sms = NULL;
- -: 201: }
- 10: 202:}
- 10: 203:void AT_CellularDevice::close_power()
- -: 204:{
- 10: 205: if (_power) {
- 2: 206: release_at_handler(&_power->get_at_handler());
- 2: 207: delete _power;
- 2: 208: _power = NULL;
- -: 209: }
- 10: 210:}
- -: 211:
- 10: 212:void AT_CellularDevice::close_sim()
- -: 213:{
- 10: 214: if (_sim) {
- 2: 215: release_at_handler(&_sim->get_at_handler());
- 2: 216: delete _sim;
- 2: 217: _sim = NULL;
- -: 218: }
- 10: 219:}
- -: 220:
- 10: 221:void AT_CellularDevice::close_multiplexer()
- -: 222:{
- 10: 223: if (_multiplexer) {
- 1: 224: release_at_handler(&_multiplexer->get_at_handler());
- 1: 225: delete _multiplexer;
- 1: 226: _multiplexer = NULL;
- -: 227: }
- 10: 228:}
- -: 229:
- 12: 230:void AT_CellularDevice::close_information()
- -: 231:{
- 12: 232: if (_information) {
- 3: 233: release_at_handler(&_information->get_at_handler());
- 3: 234: delete _information;
- 3: 235: _information = NULL;
- -: 236: }
- 12: 237:}
- -: 238:
- #####: 239:void AT_CellularDevice::set_timeout(int timeout)
- -: 240:{
- #####: 241: _default_timeout = timeout;
- -: 242:
- #####: 243: ATHandler *atHandler = _atHandlers;
- #####: 244: while (atHandler) {
- #####: 245: atHandler->set_at_timeout(_default_timeout, true); // set as default timeout
- #####: 246: atHandler = atHandler->_nextATHandler;
- -: 247: }
- #####: 248:}
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/gcov/CellularDevice.h.gcov b/features/cellular/UNITTESTS/at/at_cellulardevice/gcov/CellularDevice.h.gcov
deleted file mode 100644
index bd4a68803f..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellulardevice/gcov/CellularDevice.h.gcov
+++ /dev/null
@@ -1,126 +0,0 @@
- -: 0:Source:../../../framework/API/CellularDevice.h
- -: 0:Graph:objs/AT_CellularDevice_unit/AT_CellularDevice.gcno
- -: 0:Data:objs/AT_CellularDevice_unit/AT_CellularDevice.gcda
- -: 0:Runs:1
- -: 0:Programs:1
- -: 1:/*
- -: 2: * Copyright (c) 2017, Arm Limited and affiliates.
- -: 3: * SPDX-License-Identifier: Apache-2.0
- -: 4: *
- -: 5: * Licensed under the Apache License, Version 2.0 (the "License");
- -: 6: * you may not use this file except in compliance with the License.
- -: 7: * You may obtain a copy of the License at
- -: 8: *
- -: 9: * http://www.apache.org/licenses/LICENSE-2.0
- -: 10: *
- -: 11: * Unless required by applicable law or agreed to in writing, software
- -: 12: * distributed under the License is distributed on an "AS IS" BASIS,
- -: 13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- -: 14: * See the License for the specific language governing permissions and
- -: 15: * limitations under the License.
- -: 16: */
- -: 17:
- -: 18:#ifndef CELLULAR_DEVICE_H_
- -: 19:#define CELLULAR_DEVICE_H_
- -: 20:
- -: 21:#include "FileHandle.h"
- -: 22:
- -: 23:#include "CellularSIM.h"
- -: 24:#include "CellularNetwork.h"
- -: 25:#include "CellularSMS.h"
- -: 26:#include "CellularPower.h"
- -: 27:#include "CellularMultiplexer.h"
- -: 28:#include "CellularInformation.h"
- -: 29:
- -: 30:namespace mbed {
- -: 31:
- -: 32:/**
- -: 33: * Class CellularDevice
- -: 34: *
- -: 35: * An abstract interface that defines opening and closing of cellular interfaces.
- -: 36: * Deleting/Closing of opened interfaces can be done only via this class.
- -: 37: */
- 10: 38:class CellularDevice
- -: 39:{
- -: 40:public:
- -: 41: /** virtual Destructor
- -: 42: */
- 10: 43: virtual ~CellularDevice() {}
- -: 44:
- -: 45:public:
- -: 46: /** Create new CellularNetwork interface.
- -: 47: *
- -: 48: * @param fh file handle used in communication to modem. Can be for example UART handle.
- -: 49: * @return New instance of interface CellularNetwork.
- -: 50: */
- -: 51: virtual CellularNetwork *open_network(FileHandle *fh) = 0;
- -: 52:
- -: 53: /** Create new CellularSMS interface.
- -: 54: *
- -: 55: * @param fh file handle used in communication to modem. Can be for example UART handle.
- -: 56: * @return New instance of interface CellularSMS.
- -: 57: */
- -: 58: virtual CellularSMS *open_sms(FileHandle *fh) = 0;
- -: 59:
- -: 60: /** Create new CellularPower interface.
- -: 61: *
- -: 62: * @param fh file handle used in communication to modem. Can be for example UART handle.
- -: 63: * @return New instance of interface CellularPower.
- -: 64: */
- -: 65: virtual CellularPower *open_power(FileHandle *fh) = 0;
- -: 66:
- -: 67: /** Create new CellularSIM interface.
- -: 68: *
- -: 69: * @param fh file handle used in communication to modem. Can be for example UART handle.
- -: 70: * @return New instance of interface CellularSIM.
- -: 71: */
- -: 72: virtual CellularSIM *open_sim(FileHandle *fh) = 0;
- -: 73:
- -: 74: /** Create new CellularMultiplexer interface.
- -: 75: *
- -: 76: * @param fh file handle used in communication to modem. Can be for example UART handle.
- -: 77: * @return New instance of interface CellularMultiplexer.
- -: 78: */
- -: 79: virtual CellularMultiplexer *open_multiplexer(FileHandle *fh) = 0;
- -: 80:
- -: 81: /** Create new CellularInformation interface.
- -: 82: *
- -: 83: * @param fh file handle used in communication to modem. Can be for example UART handle.
- -: 84: * @return New instance of interface CellularInformation.
- -: 85: */
- -: 86: virtual CellularInformation *open_information(FileHandle *fh) = 0;
- -: 87:
- -: 88: /** Closes the opened CellularNetwork by deleting the CellularNetwork instance.
- -: 89: */
- -: 90: virtual void close_network() = 0;
- -: 91:
- -: 92: /** Closes the opened CellularNetwork by deleting the CellularSMS instance.
- -: 93: */
- -: 94: virtual void close_sms() = 0;
- -: 95:
- -: 96: /** Closes the opened CellularNetwork by deleting the CellularPower instance.
- -: 97: */
- -: 98: virtual void close_power() = 0;
- -: 99:
- -: 100: /** Closes the opened CellularNetwork by deleting the CellularSIM instance.
- -: 101: */
- -: 102: virtual void close_sim() = 0;
- -: 103:
- -: 104: /** Closes the opened CellularNetwork by deleting the CellularMultiplexer instance.
- -: 105: */
- -: 106: virtual void close_multiplexer() = 0;
- -: 107:
- -: 108: /** Closes the opened CellularNetwork by deleting the CellularInformation instance.
- -: 109: */
- -: 110: virtual void close_information() = 0;
- -: 111:
- -: 112: /** Set the default response timeout.
- -: 113: *
- -: 114: * @param timeout milliseconds to wait response from modem
- -: 115: */
- -: 116: virtual void set_timeout(int timeout) = 0;
- -: 117:};
- -: 118:
- -: 119:} // namespace mbed
- -: 120:
- -: 121:#endif // CELLULAR_DEVICE_H_
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/gcov/gcov_error.txt b/features/cellular/UNITTESTS/at/at_cellulardevice/gcov/gcov_error.txt
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/gcov/gcov_output.txt b/features/cellular/UNITTESTS/at/at_cellulardevice/gcov/gcov_output.txt
deleted file mode 100644
index 3eb28f59c9..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellulardevice/gcov/gcov_output.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-File '../../../framework/AT/AT_CellularDevice.cpp'
-Lines executed:90.65% of 139
-Creating 'AT_CellularDevice.cpp.gcov'
-
-File '../../../framework/API/CellularDevice.h'
-Lines executed:100.00% of 2
-Creating 'CellularDevice.h.gcov'
-
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/gcov/gcov_report.txt b/features/cellular/UNITTESTS/at/at_cellulardevice/gcov/gcov_report.txt
deleted file mode 100644
index 9b7b420626..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellulardevice/gcov/gcov_report.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-100.00% ../framework/API/CellularDevice.h
- 90.65% ../framework/AT/AT_CellularDevice.cpp
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/gcov/gcov_report.txt.html b/features/cellular/UNITTESTS/at/at_cellulardevice/gcov/gcov_report.txt.html
deleted file mode 100644
index 523dfe8849..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellulardevice/gcov/gcov_report.txt.html
+++ /dev/null
@@ -1,5 +0,0 @@
-
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/lib/libAT_CellularDevice_unit.a b/features/cellular/UNITTESTS/at/at_cellulardevice/lib/libAT_CellularDevice_unit.a
deleted file mode 100644
index db0f4b3dc2..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/lib/libAT_CellularDevice_unit.a and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/ATHandler_stub.d b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/ATHandler_stub.d
deleted file mode 100644
index beca409cb8..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/ATHandler_stub.d
+++ /dev/null
@@ -1,78 +0,0 @@
-objs/AT_CellularDevice_unit/ATHandler_stub.o: \
- ../../stubs/ATHandler_stub.cpp \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../framework/AT/ATHandler.h \
- ../../target_h/platform/mbed_retarget.h \
- ../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
- ../../../../../events/equeue/equeue_platform.h \
- ../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h \
- ../../../../../platform/PlatformMutex.h \
- ../../../../../platform/Callback.h ../../stubs/ATHandler_stub.h \
- ../../stubs/FileHandle_stub.h ../../../../../platform/FileHandle.h \
- ../../../../../platform/Callback.h ../../../../../platform/mbed_poll.h \
- ../../../../../platform/platform.h ../../target_h/device.h \
- ../../target_h/PinNames.h ../../target_h/PeripheralNames.h \
- ../../../framework/common/CellularLog.h \
- ../../../../../hal/us_ticker_api.h ../../../../../hal/ticker_api.h \
- ../../../../../platform/mbed_debug.h
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../framework/AT/ATHandler.h:
-
-../../target_h/platform/mbed_retarget.h:
-
-../../../../../events/EventQueue.h:
-
-../../../../../events/equeue/equeue.h:
-
-../../../../../events/equeue/equeue_platform.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
-
-../../../../../platform/PlatformMutex.h:
-
-../../../../../platform/Callback.h:
-
-../../stubs/ATHandler_stub.h:
-
-../../stubs/FileHandle_stub.h:
-
-../../../../../platform/FileHandle.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_poll.h:
-
-../../../../../platform/platform.h:
-
-../../target_h/device.h:
-
-../../target_h/PinNames.h:
-
-../../target_h/PeripheralNames.h:
-
-../../../framework/common/CellularLog.h:
-
-../../../../../hal/us_ticker_api.h:
-
-../../../../../hal/ticker_api.h:
-
-../../../../../platform/mbed_debug.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/ATHandler_stub.gcda b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/ATHandler_stub.gcda
deleted file mode 100644
index ab26a0c91e..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/ATHandler_stub.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/ATHandler_stub.gcno b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/ATHandler_stub.gcno
deleted file mode 100644
index d422941c9f..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/ATHandler_stub.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/ATHandler_stub.o b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/ATHandler_stub.o
deleted file mode 100644
index 8e79674537..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/ATHandler_stub.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularBase_stub.d b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularBase_stub.d
deleted file mode 100644
index b74bf945ea..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularBase_stub.d
+++ /dev/null
@@ -1,53 +0,0 @@
-objs/AT_CellularDevice_unit/AT_CellularBase_stub.o: \
- ../../stubs/AT_CellularBase_stub.cpp \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../framework/AT/AT_CellularBase.h \
- ../../../framework/AT/ATHandler.h \
- ../../target_h/platform/mbed_retarget.h \
- ../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
- ../../../../../events/equeue/equeue_platform.h \
- ../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h \
- ../../../../../platform/PlatformMutex.h \
- ../../../../../platform/Callback.h ../../stubs/AT_CellularBase_stub.h \
- ../../../framework/AT/ATHandler.h
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../framework/AT/AT_CellularBase.h:
-
-../../../framework/AT/ATHandler.h:
-
-../../target_h/platform/mbed_retarget.h:
-
-../../../../../events/EventQueue.h:
-
-../../../../../events/equeue/equeue.h:
-
-../../../../../events/equeue/equeue_platform.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
-
-../../../../../platform/PlatformMutex.h:
-
-../../../../../platform/Callback.h:
-
-../../stubs/AT_CellularBase_stub.h:
-
-../../../framework/AT/ATHandler.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularBase_stub.gcda b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularBase_stub.gcda
deleted file mode 100644
index 68a448e286..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularBase_stub.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularBase_stub.gcno b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularBase_stub.gcno
deleted file mode 100644
index ab3b13fc01..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularBase_stub.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularBase_stub.o b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularBase_stub.o
deleted file mode 100644
index 78899c1658..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularBase_stub.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularDevice.d b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularDevice.d
deleted file mode 100644
index 17c23a7258..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularDevice.d
+++ /dev/null
@@ -1,152 +0,0 @@
-objs/AT_CellularDevice_unit/AT_CellularDevice.o: \
- ../../../framework/AT/AT_CellularDevice.cpp \
- ../../../framework/AT/AT_CellularDevice.h \
- ../../../framework/API/CellularDevice.h \
- ../../../../../platform/FileHandle.h ../../../../../platform/Callback.h \
- ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_poll.h ../../../../../platform/platform.h \
- ../../target_h/platform/mbed_retarget.h ../../target_h/device.h \
- ../../target_h/PinNames.h ../../target_h/PeripheralNames.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h \
- ../../../framework/API/CellularSIM.h \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../framework/API/CellularNetwork.h \
- ../../../../../features/netsocket/CellularInterface.h \
- ../../../../../features/netsocket/NetworkInterface.h \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../../../features/netsocket/SocketAddress.h \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../features/netsocket/NetworkInterface.h \
- ../../../framework/common/CellularList.h \
- ../../../framework/API/CellularSMS.h ../../../../../platform/Callback.h \
- ../../../framework/API/CellularPower.h \
- ../../../framework/API/CellularMultiplexer.h \
- ../../../framework/API/CellularInformation.h \
- ../../../framework/AT/AT_CellularNetwork.h \
- ../../../framework/API/CellularNetwork.h \
- ../../../framework/AT/AT_CellularBase.h \
- ../../../framework/AT/ATHandler.h ../../../../../events/EventQueue.h \
- ../../../../../events/equeue/equeue.h \
- ../../../../../events/equeue/equeue_platform.h \
- ../../../../../platform/Callback.h \
- ../../../../../platform/PlatformMutex.h \
- ../../../../../features/netsocket/NetworkStack.h \
- ../../../framework/AT/AT_CellularSIM.h \
- ../../../framework/API/CellularSIM.h \
- ../../../framework/AT/AT_CellularSMS.h \
- ../../../framework/API/CellularSMS.h \
- ../../../framework/AT/AT_CellularPower.h \
- ../../../framework/API/CellularPower.h \
- ../../../framework/AT/AT_CellularMultiplexer.h \
- ../../../framework/API/CellularMultiplexer.h \
- ../../../framework/AT/AT_CellularInformation.h \
- ../../../framework/API/CellularInformation.h
-
-../../../framework/AT/AT_CellularDevice.h:
-
-../../../framework/API/CellularDevice.h:
-
-../../../../../platform/FileHandle.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_poll.h:
-
-../../../../../platform/platform.h:
-
-../../target_h/platform/mbed_retarget.h:
-
-../../target_h/device.h:
-
-../../target_h/PinNames.h:
-
-../../target_h/PeripheralNames.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
-
-../../../framework/API/CellularSIM.h:
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../framework/API/CellularNetwork.h:
-
-../../../../../features/netsocket/CellularInterface.h:
-
-../../../../../features/netsocket/NetworkInterface.h:
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../../../features/netsocket/SocketAddress.h:
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../features/netsocket/NetworkInterface.h:
-
-../../../framework/common/CellularList.h:
-
-../../../framework/API/CellularSMS.h:
-
-../../../../../platform/Callback.h:
-
-../../../framework/API/CellularPower.h:
-
-../../../framework/API/CellularMultiplexer.h:
-
-../../../framework/API/CellularInformation.h:
-
-../../../framework/AT/AT_CellularNetwork.h:
-
-../../../framework/API/CellularNetwork.h:
-
-../../../framework/AT/AT_CellularBase.h:
-
-../../../framework/AT/ATHandler.h:
-
-../../../../../events/EventQueue.h:
-
-../../../../../events/equeue/equeue.h:
-
-../../../../../events/equeue/equeue_platform.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/PlatformMutex.h:
-
-../../../../../features/netsocket/NetworkStack.h:
-
-../../../framework/AT/AT_CellularSIM.h:
-
-../../../framework/API/CellularSIM.h:
-
-../../../framework/AT/AT_CellularSMS.h:
-
-../../../framework/API/CellularSMS.h:
-
-../../../framework/AT/AT_CellularPower.h:
-
-../../../framework/API/CellularPower.h:
-
-../../../framework/AT/AT_CellularMultiplexer.h:
-
-../../../framework/API/CellularMultiplexer.h:
-
-../../../framework/AT/AT_CellularInformation.h:
-
-../../../framework/API/CellularInformation.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularDevice.gcda b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularDevice.gcda
deleted file mode 100644
index 29e33106e3..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularDevice.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularDevice.gcno b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularDevice.gcno
deleted file mode 100644
index a127fede45..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularDevice.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularDevice.o b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularDevice.o
deleted file mode 100644
index 6a04b38844..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularDevice.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularInformation_stub.d b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularInformation_stub.d
deleted file mode 100644
index a0e370e02f..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularInformation_stub.d
+++ /dev/null
@@ -1,54 +0,0 @@
-objs/AT_CellularDevice_unit/AT_CellularInformation_stub.o: \
- ../../stubs/AT_CellularInformation_stub.cpp \
- ../../../framework/AT/AT_CellularInformation.h \
- ../../../framework/API/CellularInformation.h \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../framework/AT/AT_CellularBase.h \
- ../../../framework/AT/ATHandler.h \
- ../../target_h/platform/mbed_retarget.h \
- ../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
- ../../../../../events/equeue/equeue_platform.h \
- ../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h \
- ../../../../../platform/PlatformMutex.h \
- ../../../../../platform/Callback.h
-
-../../../framework/AT/AT_CellularInformation.h:
-
-../../../framework/API/CellularInformation.h:
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../framework/AT/AT_CellularBase.h:
-
-../../../framework/AT/ATHandler.h:
-
-../../target_h/platform/mbed_retarget.h:
-
-../../../../../events/EventQueue.h:
-
-../../../../../events/equeue/equeue.h:
-
-../../../../../events/equeue/equeue_platform.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
-
-../../../../../platform/PlatformMutex.h:
-
-../../../../../platform/Callback.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularInformation_stub.gcda b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularInformation_stub.gcda
deleted file mode 100644
index 775a63c281..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularInformation_stub.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularInformation_stub.gcno b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularInformation_stub.gcno
deleted file mode 100644
index 0933b5c1be..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularInformation_stub.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularInformation_stub.o b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularInformation_stub.o
deleted file mode 100644
index 9cc0471b34..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularInformation_stub.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularMultiplexer_stub.d b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularMultiplexer_stub.d
deleted file mode 100644
index e19580a2d4..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularMultiplexer_stub.d
+++ /dev/null
@@ -1,69 +0,0 @@
-objs/AT_CellularDevice_unit/AT_CellularMultiplexer_stub.o: \
- ../../stubs/AT_CellularMultiplexer_stub.cpp \
- ../../../framework/AT/AT_CellularMultiplexer.h \
- ../../../framework/API/CellularMultiplexer.h \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../framework/AT/AT_CellularBase.h \
- ../../../framework/AT/ATHandler.h \
- ../../target_h/platform/mbed_retarget.h \
- ../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
- ../../../../../events/equeue/equeue_platform.h \
- ../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h \
- ../../../../../platform/PlatformMutex.h \
- ../../../../../platform/Callback.h \
- ../../../framework/common/CellularLog.h ../../target_h/PinNames.h \
- ../../../../../hal/us_ticker_api.h ../../../../../hal/ticker_api.h \
- ../../target_h/device.h ../../../../../platform/mbed_debug.h
-
-../../../framework/AT/AT_CellularMultiplexer.h:
-
-../../../framework/API/CellularMultiplexer.h:
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../framework/AT/AT_CellularBase.h:
-
-../../../framework/AT/ATHandler.h:
-
-../../target_h/platform/mbed_retarget.h:
-
-../../../../../events/EventQueue.h:
-
-../../../../../events/equeue/equeue.h:
-
-../../../../../events/equeue/equeue_platform.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
-
-../../../../../platform/PlatformMutex.h:
-
-../../../../../platform/Callback.h:
-
-../../../framework/common/CellularLog.h:
-
-../../target_h/PinNames.h:
-
-../../../../../hal/us_ticker_api.h:
-
-../../../../../hal/ticker_api.h:
-
-../../target_h/device.h:
-
-../../../../../platform/mbed_debug.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularMultiplexer_stub.gcda b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularMultiplexer_stub.gcda
deleted file mode 100644
index b43238835f..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularMultiplexer_stub.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularMultiplexer_stub.gcno b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularMultiplexer_stub.gcno
deleted file mode 100644
index 6e492f6e7c..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularMultiplexer_stub.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularMultiplexer_stub.o b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularMultiplexer_stub.o
deleted file mode 100644
index 082da20272..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularMultiplexer_stub.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularNetwork_stub.d b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularNetwork_stub.d
deleted file mode 100644
index bfd226fa3a..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularNetwork_stub.d
+++ /dev/null
@@ -1,112 +0,0 @@
-objs/AT_CellularDevice_unit/AT_CellularNetwork_stub.o: \
- ../../stubs/AT_CellularNetwork_stub.cpp \
- ../../../framework/AT/AT_CellularNetwork.h \
- ../../../framework/API/CellularNetwork.h \
- ../../../../../features/netsocket/CellularInterface.h \
- ../../../../../features/netsocket/NetworkInterface.h \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../../../features/netsocket/SocketAddress.h \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../features/netsocket/NetworkInterface.h \
- ../../../framework/common/CellularList.h \
- ../../../framework/AT/AT_CellularBase.h \
- ../../../framework/AT/ATHandler.h \
- ../../target_h/platform/mbed_retarget.h \
- ../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
- ../../../../../events/equeue/equeue_platform.h \
- ../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h \
- ../../../../../platform/PlatformMutex.h \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../../../platform/Callback.h \
- ../../../../../features/netsocket/NetworkStack.h \
- ../../../framework/common/CellularUtil.h \
- ../../../framework/common/CellularLog.h ../../target_h/PinNames.h \
- ../../../../../hal/us_ticker_api.h ../../../../../hal/ticker_api.h \
- ../../target_h/device.h ../../../../../platform/mbed_debug.h \
- ../../../../../platform/FileHandle.h ../../../../../platform/Callback.h \
- ../../../../../platform/mbed_poll.h ../../../../../platform/platform.h \
- ../../target_h/PeripheralNames.h
-
-../../../framework/AT/AT_CellularNetwork.h:
-
-../../../framework/API/CellularNetwork.h:
-
-../../../../../features/netsocket/CellularInterface.h:
-
-../../../../../features/netsocket/NetworkInterface.h:
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../../../features/netsocket/SocketAddress.h:
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../features/netsocket/NetworkInterface.h:
-
-../../../framework/common/CellularList.h:
-
-../../../framework/AT/AT_CellularBase.h:
-
-../../../framework/AT/ATHandler.h:
-
-../../target_h/platform/mbed_retarget.h:
-
-../../../../../events/EventQueue.h:
-
-../../../../../events/equeue/equeue.h:
-
-../../../../../events/equeue/equeue_platform.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
-
-../../../../../platform/PlatformMutex.h:
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../features/netsocket/NetworkStack.h:
-
-../../../framework/common/CellularUtil.h:
-
-../../../framework/common/CellularLog.h:
-
-../../target_h/PinNames.h:
-
-../../../../../hal/us_ticker_api.h:
-
-../../../../../hal/ticker_api.h:
-
-../../target_h/device.h:
-
-../../../../../platform/mbed_debug.h:
-
-../../../../../platform/FileHandle.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_poll.h:
-
-../../../../../platform/platform.h:
-
-../../target_h/PeripheralNames.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularNetwork_stub.gcda b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularNetwork_stub.gcda
deleted file mode 100644
index acd5660052..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularNetwork_stub.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularNetwork_stub.gcno b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularNetwork_stub.gcno
deleted file mode 100644
index b91ec89beb..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularNetwork_stub.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularNetwork_stub.o b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularNetwork_stub.o
deleted file mode 100644
index 37930298b3..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularNetwork_stub.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularPower_stub.d b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularPower_stub.d
deleted file mode 100644
index b0e6f54ee6..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularPower_stub.d
+++ /dev/null
@@ -1,72 +0,0 @@
-objs/AT_CellularDevice_unit/AT_CellularPower_stub.o: \
- ../../stubs/AT_CellularPower_stub.cpp \
- ../../../framework/AT/AT_CellularPower.h \
- ../../../framework/API/CellularPower.h \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../framework/AT/AT_CellularBase.h \
- ../../../framework/AT/ATHandler.h \
- ../../target_h/platform/mbed_retarget.h \
- ../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
- ../../../../../events/equeue/equeue_platform.h \
- ../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h \
- ../../../../../platform/PlatformMutex.h \
- ../../../../../platform/Callback.h \
- ../../../framework/common/CellularUtil.h \
- ../../../framework/common/CellularLog.h ../../target_h/PinNames.h \
- ../../../../../hal/us_ticker_api.h ../../../../../hal/ticker_api.h \
- ../../target_h/device.h ../../../../../platform/mbed_debug.h
-
-../../../framework/AT/AT_CellularPower.h:
-
-../../../framework/API/CellularPower.h:
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../framework/AT/AT_CellularBase.h:
-
-../../../framework/AT/ATHandler.h:
-
-../../target_h/platform/mbed_retarget.h:
-
-../../../../../events/EventQueue.h:
-
-../../../../../events/equeue/equeue.h:
-
-../../../../../events/equeue/equeue_platform.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
-
-../../../../../platform/PlatformMutex.h:
-
-../../../../../platform/Callback.h:
-
-../../../framework/common/CellularUtil.h:
-
-../../../framework/common/CellularLog.h:
-
-../../target_h/PinNames.h:
-
-../../../../../hal/us_ticker_api.h:
-
-../../../../../hal/ticker_api.h:
-
-../../target_h/device.h:
-
-../../../../../platform/mbed_debug.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularPower_stub.gcda b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularPower_stub.gcda
deleted file mode 100644
index e747fcc229..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularPower_stub.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularPower_stub.gcno b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularPower_stub.gcno
deleted file mode 100644
index 8ac9a4bd3f..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularPower_stub.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularPower_stub.o b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularPower_stub.o
deleted file mode 100644
index a19e85e765..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularPower_stub.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularSIM_stub.d b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularSIM_stub.d
deleted file mode 100644
index e44f577fbd..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularSIM_stub.d
+++ /dev/null
@@ -1,69 +0,0 @@
-objs/AT_CellularDevice_unit/AT_CellularSIM_stub.o: \
- ../../stubs/AT_CellularSIM_stub.cpp \
- ../../../framework/AT/AT_CellularSIM.h \
- ../../../framework/API/CellularSIM.h \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../framework/AT/AT_CellularBase.h \
- ../../../framework/AT/ATHandler.h \
- ../../target_h/platform/mbed_retarget.h \
- ../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
- ../../../../../events/equeue/equeue_platform.h \
- ../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h \
- ../../../../../platform/PlatformMutex.h \
- ../../../../../platform/Callback.h \
- ../../../framework/common/CellularLog.h ../../target_h/PinNames.h \
- ../../../../../hal/us_ticker_api.h ../../../../../hal/ticker_api.h \
- ../../target_h/device.h ../../../../../platform/mbed_debug.h
-
-../../../framework/AT/AT_CellularSIM.h:
-
-../../../framework/API/CellularSIM.h:
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../framework/AT/AT_CellularBase.h:
-
-../../../framework/AT/ATHandler.h:
-
-../../target_h/platform/mbed_retarget.h:
-
-../../../../../events/EventQueue.h:
-
-../../../../../events/equeue/equeue.h:
-
-../../../../../events/equeue/equeue_platform.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
-
-../../../../../platform/PlatformMutex.h:
-
-../../../../../platform/Callback.h:
-
-../../../framework/common/CellularLog.h:
-
-../../target_h/PinNames.h:
-
-../../../../../hal/us_ticker_api.h:
-
-../../../../../hal/ticker_api.h:
-
-../../target_h/device.h:
-
-../../../../../platform/mbed_debug.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularSIM_stub.gcda b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularSIM_stub.gcda
deleted file mode 100644
index a6164f2c5b..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularSIM_stub.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularSIM_stub.gcno b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularSIM_stub.gcno
deleted file mode 100644
index 500c768f4f..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularSIM_stub.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularSIM_stub.o b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularSIM_stub.o
deleted file mode 100644
index c359caa559..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularSIM_stub.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularSMS_stub.d b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularSMS_stub.d
deleted file mode 100644
index 7f9c2bb69e..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularSMS_stub.d
+++ /dev/null
@@ -1,68 +0,0 @@
-objs/AT_CellularDevice_unit/AT_CellularSMS_stub.o: \
- ../../stubs/AT_CellularSMS_stub.cpp \
- ../../../framework/AT/AT_CellularSMS.h \
- ../../../framework/API/CellularSMS.h ../../../../../platform/Callback.h \
- ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../framework/AT/AT_CellularBase.h \
- ../../../framework/AT/ATHandler.h \
- ../../target_h/platform/mbed_retarget.h \
- ../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
- ../../../../../events/equeue/equeue_platform.h \
- ../../../../../platform/Callback.h ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h \
- ../../../../../platform/PlatformMutex.h \
- ../../../framework/common/CellularLog.h ../../target_h/PinNames.h \
- ../../../../../hal/us_ticker_api.h ../../../../../hal/ticker_api.h \
- ../../target_h/device.h ../../../../../platform/mbed_debug.h
-
-../../../framework/AT/AT_CellularSMS.h:
-
-../../../framework/API/CellularSMS.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../framework/AT/AT_CellularBase.h:
-
-../../../framework/AT/ATHandler.h:
-
-../../target_h/platform/mbed_retarget.h:
-
-../../../../../events/EventQueue.h:
-
-../../../../../events/equeue/equeue.h:
-
-../../../../../events/equeue/equeue_platform.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
-
-../../../../../platform/PlatformMutex.h:
-
-../../../framework/common/CellularLog.h:
-
-../../target_h/PinNames.h:
-
-../../../../../hal/us_ticker_api.h:
-
-../../../../../hal/ticker_api.h:
-
-../../target_h/device.h:
-
-../../../../../platform/mbed_debug.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularSMS_stub.gcda b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularSMS_stub.gcda
deleted file mode 100644
index 528137308e..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularSMS_stub.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularSMS_stub.gcno b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularSMS_stub.gcno
deleted file mode 100644
index af2bce1001..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularSMS_stub.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularSMS_stub.o b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularSMS_stub.o
deleted file mode 100644
index 166354cf80..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/AT_CellularSMS_stub.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/CellularUtil_stub.d b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/CellularUtil_stub.d
deleted file mode 100644
index 151c082e9d..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/CellularUtil_stub.d
+++ /dev/null
@@ -1,5 +0,0 @@
-objs/AT_CellularDevice_unit/CellularUtil_stub.o: \
- ../../stubs/CellularUtil_stub.cpp \
- ../../../framework/common/CellularUtil.h
-
-../../../framework/common/CellularUtil.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/CellularUtil_stub.gcda b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/CellularUtil_stub.gcda
deleted file mode 100644
index 83f29f97ee..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/CellularUtil_stub.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/CellularUtil_stub.gcno b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/CellularUtil_stub.gcno
deleted file mode 100644
index 741c2e0343..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/CellularUtil_stub.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/CellularUtil_stub.o b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/CellularUtil_stub.o
deleted file mode 100644
index e0e39e5e05..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/CellularUtil_stub.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/EventQueue_stub.d b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/EventQueue_stub.d
deleted file mode 100644
index b55355d3da..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/EventQueue_stub.d
+++ /dev/null
@@ -1,32 +0,0 @@
-objs/AT_CellularDevice_unit/EventQueue_stub.o: \
- ../../stubs/EventQueue_stub.cpp ../../../../../events/EventQueue.h \
- ../../../../../events/equeue/equeue.h \
- ../../../../../events/equeue/equeue_platform.h \
- ../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h ../../../../../platform/Callback.h
-
-../../../../../events/EventQueue.h:
-
-../../../../../events/equeue/equeue.h:
-
-../../../../../events/equeue/equeue_platform.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
-
-../../../../../platform/Callback.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/EventQueue_stub.gcda b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/EventQueue_stub.gcda
deleted file mode 100644
index 797048b979..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/EventQueue_stub.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/EventQueue_stub.gcno b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/EventQueue_stub.gcno
deleted file mode 100644
index 94efe29434..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/EventQueue_stub.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/EventQueue_stub.o b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/EventQueue_stub.o
deleted file mode 100644
index 3b5d8723f1..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/EventQueue_stub.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/FileHandle_stub.d b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/FileHandle_stub.d
deleted file mode 100644
index 118e43f677..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/FileHandle_stub.d
+++ /dev/null
@@ -1,42 +0,0 @@
-objs/AT_CellularDevice_unit/FileHandle_stub.o: \
- ../../stubs/FileHandle_stub.cpp ../../stubs/FileHandle_stub.h \
- ../../../../../platform/FileHandle.h ../../../../../platform/Callback.h \
- ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_poll.h ../../../../../platform/platform.h \
- ../../target_h/platform/mbed_retarget.h ../../target_h/device.h \
- ../../target_h/PinNames.h ../../target_h/PeripheralNames.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h
-
-../../stubs/FileHandle_stub.h:
-
-../../../../../platform/FileHandle.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_poll.h:
-
-../../../../../platform/platform.h:
-
-../../target_h/platform/mbed_retarget.h:
-
-../../target_h/device.h:
-
-../../target_h/PinNames.h:
-
-../../target_h/PeripheralNames.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/FileHandle_stub.gcda b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/FileHandle_stub.gcda
deleted file mode 100644
index 7d1bf0ce81..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/FileHandle_stub.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/FileHandle_stub.gcno b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/FileHandle_stub.gcno
deleted file mode 100644
index 3e34254e3f..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/FileHandle_stub.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/FileHandle_stub.o b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/FileHandle_stub.o
deleted file mode 100644
index ec3922cc52..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/FileHandle_stub.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/NetworkInterface_stub.d b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/NetworkInterface_stub.d
deleted file mode 100644
index f469db9ba4..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/NetworkInterface_stub.d
+++ /dev/null
@@ -1,23 +0,0 @@
-objs/AT_CellularDevice_unit/NetworkInterface_stub.o: \
- ../../stubs/NetworkInterface_stub.cpp \
- ../../../../../features/netsocket/NetworkInterface.h \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../../../features/netsocket/SocketAddress.h \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../features/netsocket/NetworkStack.h
-
-../../../../../features/netsocket/NetworkInterface.h:
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../../../features/netsocket/SocketAddress.h:
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../features/netsocket/NetworkStack.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/NetworkInterface_stub.gcda b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/NetworkInterface_stub.gcda
deleted file mode 100644
index e4d6d3545b..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/NetworkInterface_stub.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/NetworkInterface_stub.gcno b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/NetworkInterface_stub.gcno
deleted file mode 100644
index 64471130f7..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/NetworkInterface_stub.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/NetworkInterface_stub.o b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/NetworkInterface_stub.o
deleted file mode 100644
index fb4396dfac..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/NetworkInterface_stub.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/at_cellulardevicetest.d b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/at_cellulardevicetest.d
deleted file mode 100644
index 15628e8e9b..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/at_cellulardevicetest.d
+++ /dev/null
@@ -1,4 +0,0 @@
-objs/AT_CellularDevice_unit/at_cellulardevicetest.o: \
- at_cellulardevicetest.cpp test_at_cellulardevice.h
-
-test_at_cellulardevice.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/at_cellulardevicetest.gcda b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/at_cellulardevicetest.gcda
deleted file mode 100644
index ef1166a9ce..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/at_cellulardevicetest.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/at_cellulardevicetest.gcno b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/at_cellulardevicetest.gcno
deleted file mode 100644
index 7ae3906df2..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/at_cellulardevicetest.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/at_cellulardevicetest.o b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/at_cellulardevicetest.o
deleted file mode 100644
index 83b09482c7..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/at_cellulardevicetest.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/main.d b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/main.d
deleted file mode 100644
index ee243c0d26..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/main.d
+++ /dev/null
@@ -1 +0,0 @@
-objs/AT_CellularDevice_unit/main.o: main.cpp
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/main.gcda b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/main.gcda
deleted file mode 100644
index f2ecdf9680..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/main.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/main.gcno b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/main.gcno
deleted file mode 100644
index 06c4c74eb1..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/main.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/main.o b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/main.o
deleted file mode 100644
index a34ac03d22..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/main.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/mbed_assert_stub.d b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/mbed_assert_stub.d
deleted file mode 100644
index adeafd9fa9..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/mbed_assert_stub.d
+++ /dev/null
@@ -1,7 +0,0 @@
-objs/AT_CellularDevice_unit/mbed_assert_stub.o: \
- ../../stubs/mbed_assert_stub.cpp ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/mbed_assert_stub.gcda b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/mbed_assert_stub.gcda
deleted file mode 100644
index d7826aca91..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/mbed_assert_stub.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/mbed_assert_stub.gcno b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/mbed_assert_stub.gcno
deleted file mode 100644
index 3d4e5167c4..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/mbed_assert_stub.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/mbed_assert_stub.o b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/mbed_assert_stub.o
deleted file mode 100644
index 27840bb62a..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/mbed_assert_stub.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/test_at_cellulardevice.d b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/test_at_cellulardevice.d
deleted file mode 100644
index cdf07ce59c..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/test_at_cellulardevice.d
+++ /dev/null
@@ -1,164 +0,0 @@
-objs/AT_CellularDevice_unit/test_at_cellulardevice.o: \
- test_at_cellulardevice.cpp test_at_cellulardevice.h \
- ../../../framework/AT/AT_CellularDevice.h \
- ../../../framework/API/CellularDevice.h \
- ../../../../../platform/FileHandle.h ../../../../../platform/Callback.h \
- ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_poll.h ../../../../../platform/platform.h \
- ../../target_h/platform/mbed_retarget.h ../../target_h/device.h \
- ../../target_h/PinNames.h ../../target_h/PeripheralNames.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h \
- ../../../framework/API/CellularSIM.h \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../framework/API/CellularNetwork.h \
- ../../../../../features/netsocket/CellularInterface.h \
- ../../../../../features/netsocket/NetworkInterface.h \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../../../features/netsocket/SocketAddress.h \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../features/netsocket/NetworkInterface.h \
- ../../../framework/common/CellularList.h \
- ../../../framework/API/CellularSMS.h ../../../../../platform/Callback.h \
- ../../../framework/API/CellularPower.h \
- ../../../framework/API/CellularMultiplexer.h \
- ../../../framework/API/CellularInformation.h \
- ../../../framework/AT/AT_CellularNetwork.h \
- ../../../framework/API/CellularNetwork.h \
- ../../../framework/AT/AT_CellularBase.h \
- ../../../framework/AT/ATHandler.h ../../../../../events/EventQueue.h \
- ../../../../../events/equeue/equeue.h \
- ../../../../../events/equeue/equeue_platform.h \
- ../../../../../platform/Callback.h \
- ../../../../../platform/PlatformMutex.h \
- ../../../../../features/netsocket/NetworkStack.h \
- ../../../framework/AT/AT_CellularSIM.h \
- ../../../framework/API/CellularSIM.h \
- ../../../framework/AT/AT_CellularSMS.h \
- ../../../framework/API/CellularSMS.h \
- ../../../framework/AT/AT_CellularPower.h \
- ../../../framework/API/CellularPower.h \
- ../../../framework/AT/AT_CellularMultiplexer.h \
- ../../../framework/API/CellularMultiplexer.h \
- ../../../framework/AT/AT_CellularInformation.h \
- ../../../framework/API/CellularInformation.h \
- ../../stubs/ATHandler_stub.h ../../../framework/AT/ATHandler.h \
- ../../stubs/FileHandle_stub.h ../../stubs/AT_CellularBase_stub.h
-
-test_at_cellulardevice.h:
-
-../../../framework/AT/AT_CellularDevice.h:
-
-../../../framework/API/CellularDevice.h:
-
-../../../../../platform/FileHandle.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_poll.h:
-
-../../../../../platform/platform.h:
-
-../../target_h/platform/mbed_retarget.h:
-
-../../target_h/device.h:
-
-../../target_h/PinNames.h:
-
-../../target_h/PeripheralNames.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
-
-../../../framework/API/CellularSIM.h:
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../framework/API/CellularNetwork.h:
-
-../../../../../features/netsocket/CellularInterface.h:
-
-../../../../../features/netsocket/NetworkInterface.h:
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../../../features/netsocket/SocketAddress.h:
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../features/netsocket/NetworkInterface.h:
-
-../../../framework/common/CellularList.h:
-
-../../../framework/API/CellularSMS.h:
-
-../../../../../platform/Callback.h:
-
-../../../framework/API/CellularPower.h:
-
-../../../framework/API/CellularMultiplexer.h:
-
-../../../framework/API/CellularInformation.h:
-
-../../../framework/AT/AT_CellularNetwork.h:
-
-../../../framework/API/CellularNetwork.h:
-
-../../../framework/AT/AT_CellularBase.h:
-
-../../../framework/AT/ATHandler.h:
-
-../../../../../events/EventQueue.h:
-
-../../../../../events/equeue/equeue.h:
-
-../../../../../events/equeue/equeue_platform.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/PlatformMutex.h:
-
-../../../../../features/netsocket/NetworkStack.h:
-
-../../../framework/AT/AT_CellularSIM.h:
-
-../../../framework/API/CellularSIM.h:
-
-../../../framework/AT/AT_CellularSMS.h:
-
-../../../framework/API/CellularSMS.h:
-
-../../../framework/AT/AT_CellularPower.h:
-
-../../../framework/API/CellularPower.h:
-
-../../../framework/AT/AT_CellularMultiplexer.h:
-
-../../../framework/API/CellularMultiplexer.h:
-
-../../../framework/AT/AT_CellularInformation.h:
-
-../../../framework/API/CellularInformation.h:
-
-../../stubs/ATHandler_stub.h:
-
-../../../framework/AT/ATHandler.h:
-
-../../stubs/FileHandle_stub.h:
-
-../../stubs/AT_CellularBase_stub.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/test_at_cellulardevice.gcda b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/test_at_cellulardevice.gcda
deleted file mode 100644
index 410f465487..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/test_at_cellulardevice.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/test_at_cellulardevice.gcno b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/test_at_cellulardevice.gcno
deleted file mode 100644
index 9b929524c3..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/test_at_cellulardevice.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/test_at_cellulardevice.o b/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/test_at_cellulardevice.o
deleted file mode 100644
index 577c3041d7..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellulardevice/objs/AT_CellularDevice_unit/test_at_cellulardevice.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/AT_CellularInformation_unit_tests b/features/cellular/UNITTESTS/at/at_cellularinformation/AT_CellularInformation_unit_tests
deleted file mode 100755
index 926c231b07..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/AT_CellularInformation_unit_tests and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/AT_CellularInformation_unit_tests.txt b/features/cellular/UNITTESTS/at/at_cellularinformation/AT_CellularInformation_unit_tests.txt
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/cpputest_AT_CellularInformation.xml b/features/cellular/UNITTESTS/at/at_cellularinformation/cpputest_AT_CellularInformation.xml
deleted file mode 100644
index 8d20b2b81f..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularinformation/cpputest_AT_CellularInformation.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/gcov/AT_CellularInformation.cpp.gcov b/features/cellular/UNITTESTS/at/at_cellularinformation/gcov/AT_CellularInformation.cpp.gcov
deleted file mode 100644
index 158e9052cc..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularinformation/gcov/AT_CellularInformation.cpp.gcov
+++ /dev/null
@@ -1,61 +0,0 @@
- -: 0:Source:../../../framework/AT/AT_CellularInformation.cpp
- -: 0:Graph:objs/AT_CellularInformation_unit/AT_CellularInformation.gcno
- -: 0:Data:objs/AT_CellularInformation_unit/AT_CellularInformation.gcda
- -: 0:Runs:1
- -: 0:Programs:1
- -: 1:/*
- -: 2: * Copyright (c) 2018, Arm Limited and affiliates.
- -: 3: * SPDX-License-Identifier: Apache-2.0
- -: 4: *
- -: 5: * Licensed under the Apache License, Version 2.0 (the "License");
- -: 6: * you may not use this file except in compliance with the License.
- -: 7: * You may obtain a copy of the License at
- -: 8: *
- -: 9: * http://www.apache.org/licenses/LICENSE-2.0
- -: 10: *
- -: 11: * Unless required by applicable law or agreed to in writing, software
- -: 12: * distributed under the License is distributed on an "AS IS" BASIS,
- -: 13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- -: 14: * See the License for the specific language governing permissions and
- -: 15: * limitations under the License.
- -: 16: */
- -: 17:
- -: 18:#include "AT_CellularInformation.h"
- -: 19:
- -: 20:using namespace mbed;
- -: 21:
- 3: 22:AT_CellularInformation::AT_CellularInformation(ATHandler &at) : AT_CellularBase(at)
- -: 23:{
- 3: 24:}
- -: 25:
- 4: 26:AT_CellularInformation::~AT_CellularInformation()
- -: 27:{
- 4: 28:}
- -: 29:
- 1: 30:nsapi_error_t AT_CellularInformation::get_manufacturer(char *buf, size_t buf_size)
- -: 31:{
- 1: 32: return get_info("AT+CGMI", buf, buf_size);
- -: 33:}
- -: 34:
- 1: 35:nsapi_error_t AT_CellularInformation::get_model(char *buf, size_t buf_size)
- -: 36:{
- 1: 37: return get_info("AT+CGMM", buf, buf_size);
- -: 38:}
- -: 39:
- 1: 40:nsapi_error_t AT_CellularInformation::get_revision(char *buf, size_t buf_size)
- -: 41:{
- 1: 42: return get_info("AT+CGMR", buf, buf_size);
- -: 43:}
- -: 44:
- 3: 45:nsapi_error_t AT_CellularInformation::get_info(const char *cmd, char *buf, size_t buf_size)
- -: 46:{
- 3: 47: _at.lock();
- -: 48:
- 3: 49: _at.cmd_start(cmd);
- 3: 50: _at.cmd_stop();
- 3: 51: _at.resp_start();
- 3: 52: _at.read_string(buf, buf_size-1); // stop tag OK\r\n
- 3: 53: _at.resp_stop();
- -: 54:
- 3: 55: return _at.unlock_return_error();
- -: 56:}
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/gcov/CellularInformation.h.gcov b/features/cellular/UNITTESTS/at/at_cellularinformation/gcov/CellularInformation.h.gcov
deleted file mode 100644
index bba5d661be..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularinformation/gcov/CellularInformation.h.gcov
+++ /dev/null
@@ -1,74 +0,0 @@
- -: 0:Source:../../../framework/API/CellularInformation.h
- -: 0:Graph:objs/AT_CellularInformation_unit/AT_CellularInformation.gcno
- -: 0:Data:objs/AT_CellularInformation_unit/AT_CellularInformation.gcda
- -: 0:Runs:1
- -: 0:Programs:1
- -: 1:/*
- -: 2: * Copyright (c) 2018, Arm Limited and affiliates.
- -: 3: * SPDX-License-Identifier: Apache-2.0
- -: 4: *
- -: 5: * Licensed under the Apache License, Version 2.0 (the "License");
- -: 6: * you may not use this file except in compliance with the License.
- -: 7: * You may obtain a copy of the License at
- -: 8: *
- -: 9: * http://www.apache.org/licenses/LICENSE-2.0
- -: 10: *
- -: 11: * Unless required by applicable law or agreed to in writing, software
- -: 12: * distributed under the License is distributed on an "AS IS" BASIS,
- -: 13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- -: 14: * See the License for the specific language governing permissions and
- -: 15: * limitations under the License.
- -: 16: */
- -: 17:
- -: 18:#ifndef CELLULAR_INFORMATION_H_
- -: 19:#define CELLULAR_INFORMATION_H_
- -: 20:
- -: 21:#include
- -: 22:#include "nsapi_types.h"
- -: 23:
- -: 24:namespace mbed {
- -: 25:
- -: 26:/**
- -: 27: * Class CellularInformation
- -: 28: *
- -: 29: * An abstract interface that provides information about cellular device.
- -: 30: */
- 3: 31:class CellularInformation
- -: 32:{
- -: 33:protected:
- -: 34: // friend of CellularDevice so that it's the only way to close/delete this class.
- -: 35: friend class CellularDevice;
- -: 36:
- -: 37: /** virtual Destructor
- -: 38: */
- 3: 39: virtual ~CellularInformation() {};
- -: 40:
- -: 41:public:
- -: 42: /** Request manufacturer identification of cellular device
- -: 43: *
- -: 44: * @param buf manufacturer identification
- -: 45: * @param buf_size max length of manufacturer identification is 2048 characters
- -: 46: * @return on success read character count, on failure negative error code
- -: 47: */
- -: 48: virtual nsapi_size_or_error_t get_manufacturer(char *buf, size_t buf_size) = 0;
- -: 49:
- -: 50: /** Request model identification of cellular device
- -: 51: *
- -: 52: * @param buf model identification
- -: 53: * @param buf_size max length of model identification is 2048 characters
- -: 54: * @return on success read character count, on failure negative error code
- -: 55: */
- -: 56: virtual nsapi_size_or_error_t get_model(char *buf, size_t buf_size) = 0;
- -: 57:
- -: 58: /** Request revision identification of cellular device
- -: 59: *
- -: 60: * @param buf revision identification
- -: 61: * @param buf_size max length of revision identification is 2048 characters
- -: 62: * @return on success read character count, on failure negative error code
- -: 63: */
- -: 64: virtual nsapi_size_or_error_t get_revision(char *buf, size_t buf_size) = 0;
- -: 65:};
- -: 66:
- -: 67:} // namespace mbed
- -: 68:
- -: 69:#endif // CELLULAR_INFORMATION_H_
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/gcov/gcov_error.txt b/features/cellular/UNITTESTS/at/at_cellularinformation/gcov/gcov_error.txt
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/gcov/gcov_output.txt b/features/cellular/UNITTESTS/at/at_cellularinformation/gcov/gcov_output.txt
deleted file mode 100644
index 0f7a048c87..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularinformation/gcov/gcov_output.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-File '../../../framework/AT/AT_CellularInformation.cpp'
-Lines executed:100.00% of 18
-Creating 'AT_CellularInformation.cpp.gcov'
-
-File '../../../framework/API/CellularInformation.h'
-Lines executed:100.00% of 2
-Creating 'CellularInformation.h.gcov'
-
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/gcov/gcov_report.txt b/features/cellular/UNITTESTS/at/at_cellularinformation/gcov/gcov_report.txt
deleted file mode 100644
index 9b2501db30..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularinformation/gcov/gcov_report.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-100.00% ../framework/API/CellularInformation.h
-100.00% ../framework/AT/AT_CellularInformation.cpp
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/gcov/gcov_report.txt.html b/features/cellular/UNITTESTS/at/at_cellularinformation/gcov/gcov_report.txt.html
deleted file mode 100644
index e507d22f74..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularinformation/gcov/gcov_report.txt.html
+++ /dev/null
@@ -1,5 +0,0 @@
-
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/lib/libAT_CellularInformation_unit.a b/features/cellular/UNITTESTS/at/at_cellularinformation/lib/libAT_CellularInformation_unit.a
deleted file mode 100644
index fd747e7d62..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/lib/libAT_CellularInformation_unit.a and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/ATHandler_stub.d b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/ATHandler_stub.d
deleted file mode 100644
index d64f36f253..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/ATHandler_stub.d
+++ /dev/null
@@ -1,78 +0,0 @@
-objs/AT_CellularInformation_unit/ATHandler_stub.o: \
- ../../stubs/ATHandler_stub.cpp \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../framework/AT/ATHandler.h \
- ../../target_h/platform/mbed_retarget.h \
- ../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
- ../../../../../events/equeue/equeue_platform.h \
- ../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h \
- ../../../../../platform/PlatformMutex.h \
- ../../../../../platform/Callback.h ../../stubs/ATHandler_stub.h \
- ../../stubs/FileHandle_stub.h ../../../../../platform/FileHandle.h \
- ../../../../../platform/Callback.h ../../../../../platform/mbed_poll.h \
- ../../../../../platform/platform.h ../../target_h/device.h \
- ../../target_h/PinNames.h ../../target_h/PeripheralNames.h \
- ../../../framework/common/CellularLog.h \
- ../../../../../hal/us_ticker_api.h ../../../../../hal/ticker_api.h \
- ../../../../../platform/mbed_debug.h
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../framework/AT/ATHandler.h:
-
-../../target_h/platform/mbed_retarget.h:
-
-../../../../../events/EventQueue.h:
-
-../../../../../events/equeue/equeue.h:
-
-../../../../../events/equeue/equeue_platform.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
-
-../../../../../platform/PlatformMutex.h:
-
-../../../../../platform/Callback.h:
-
-../../stubs/ATHandler_stub.h:
-
-../../stubs/FileHandle_stub.h:
-
-../../../../../platform/FileHandle.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_poll.h:
-
-../../../../../platform/platform.h:
-
-../../target_h/device.h:
-
-../../target_h/PinNames.h:
-
-../../target_h/PeripheralNames.h:
-
-../../../framework/common/CellularLog.h:
-
-../../../../../hal/us_ticker_api.h:
-
-../../../../../hal/ticker_api.h:
-
-../../../../../platform/mbed_debug.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/ATHandler_stub.gcda b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/ATHandler_stub.gcda
deleted file mode 100644
index 2ac2da2ff2..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/ATHandler_stub.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/ATHandler_stub.gcno b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/ATHandler_stub.gcno
deleted file mode 100644
index 39581aa433..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/ATHandler_stub.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/ATHandler_stub.o b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/ATHandler_stub.o
deleted file mode 100644
index 051fad622e..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/ATHandler_stub.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/AT_CellularBase_stub.d b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/AT_CellularBase_stub.d
deleted file mode 100644
index 0811c894d3..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/AT_CellularBase_stub.d
+++ /dev/null
@@ -1,53 +0,0 @@
-objs/AT_CellularInformation_unit/AT_CellularBase_stub.o: \
- ../../stubs/AT_CellularBase_stub.cpp \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../framework/AT/AT_CellularBase.h \
- ../../../framework/AT/ATHandler.h \
- ../../target_h/platform/mbed_retarget.h \
- ../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
- ../../../../../events/equeue/equeue_platform.h \
- ../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h \
- ../../../../../platform/PlatformMutex.h \
- ../../../../../platform/Callback.h ../../stubs/AT_CellularBase_stub.h \
- ../../../framework/AT/ATHandler.h
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../framework/AT/AT_CellularBase.h:
-
-../../../framework/AT/ATHandler.h:
-
-../../target_h/platform/mbed_retarget.h:
-
-../../../../../events/EventQueue.h:
-
-../../../../../events/equeue/equeue.h:
-
-../../../../../events/equeue/equeue_platform.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
-
-../../../../../platform/PlatformMutex.h:
-
-../../../../../platform/Callback.h:
-
-../../stubs/AT_CellularBase_stub.h:
-
-../../../framework/AT/ATHandler.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/AT_CellularBase_stub.gcda b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/AT_CellularBase_stub.gcda
deleted file mode 100644
index 4783066f4e..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/AT_CellularBase_stub.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/AT_CellularBase_stub.gcno b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/AT_CellularBase_stub.gcno
deleted file mode 100644
index 0c52812af8..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/AT_CellularBase_stub.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/AT_CellularBase_stub.o b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/AT_CellularBase_stub.o
deleted file mode 100644
index c46a789a62..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/AT_CellularBase_stub.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/AT_CellularInformation.d b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/AT_CellularInformation.d
deleted file mode 100644
index 8e44fc5361..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/AT_CellularInformation.d
+++ /dev/null
@@ -1,54 +0,0 @@
-objs/AT_CellularInformation_unit/AT_CellularInformation.o: \
- ../../../framework/AT/AT_CellularInformation.cpp \
- ../../../framework/AT/AT_CellularInformation.h \
- ../../../framework/API/CellularInformation.h \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../framework/AT/AT_CellularBase.h \
- ../../../framework/AT/ATHandler.h \
- ../../target_h/platform/mbed_retarget.h \
- ../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
- ../../../../../events/equeue/equeue_platform.h \
- ../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h \
- ../../../../../platform/PlatformMutex.h \
- ../../../../../platform/Callback.h
-
-../../../framework/AT/AT_CellularInformation.h:
-
-../../../framework/API/CellularInformation.h:
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../framework/AT/AT_CellularBase.h:
-
-../../../framework/AT/ATHandler.h:
-
-../../target_h/platform/mbed_retarget.h:
-
-../../../../../events/EventQueue.h:
-
-../../../../../events/equeue/equeue.h:
-
-../../../../../events/equeue/equeue_platform.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
-
-../../../../../platform/PlatformMutex.h:
-
-../../../../../platform/Callback.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/AT_CellularInformation.gcda b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/AT_CellularInformation.gcda
deleted file mode 100644
index fa685c73ee..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/AT_CellularInformation.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/AT_CellularInformation.gcno b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/AT_CellularInformation.gcno
deleted file mode 100644
index 80a69c20ca..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/AT_CellularInformation.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/AT_CellularInformation.o b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/AT_CellularInformation.o
deleted file mode 100644
index 6a35eb77d2..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/AT_CellularInformation.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/EventQueue_stub.d b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/EventQueue_stub.d
deleted file mode 100644
index 51f9676942..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/EventQueue_stub.d
+++ /dev/null
@@ -1,32 +0,0 @@
-objs/AT_CellularInformation_unit/EventQueue_stub.o: \
- ../../stubs/EventQueue_stub.cpp ../../../../../events/EventQueue.h \
- ../../../../../events/equeue/equeue.h \
- ../../../../../events/equeue/equeue_platform.h \
- ../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h ../../../../../platform/Callback.h
-
-../../../../../events/EventQueue.h:
-
-../../../../../events/equeue/equeue.h:
-
-../../../../../events/equeue/equeue_platform.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
-
-../../../../../platform/Callback.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/EventQueue_stub.gcda b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/EventQueue_stub.gcda
deleted file mode 100644
index c499257dda..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/EventQueue_stub.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/EventQueue_stub.gcno b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/EventQueue_stub.gcno
deleted file mode 100644
index 85a626699c..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/EventQueue_stub.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/EventQueue_stub.o b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/EventQueue_stub.o
deleted file mode 100644
index e0f578e635..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/EventQueue_stub.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/FileHandle_stub.d b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/FileHandle_stub.d
deleted file mode 100644
index bc0f6aa5b9..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/FileHandle_stub.d
+++ /dev/null
@@ -1,42 +0,0 @@
-objs/AT_CellularInformation_unit/FileHandle_stub.o: \
- ../../stubs/FileHandle_stub.cpp ../../stubs/FileHandle_stub.h \
- ../../../../../platform/FileHandle.h ../../../../../platform/Callback.h \
- ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_poll.h ../../../../../platform/platform.h \
- ../../target_h/platform/mbed_retarget.h ../../target_h/device.h \
- ../../target_h/PinNames.h ../../target_h/PeripheralNames.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h
-
-../../stubs/FileHandle_stub.h:
-
-../../../../../platform/FileHandle.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_poll.h:
-
-../../../../../platform/platform.h:
-
-../../target_h/platform/mbed_retarget.h:
-
-../../target_h/device.h:
-
-../../target_h/PinNames.h:
-
-../../target_h/PeripheralNames.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/FileHandle_stub.gcda b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/FileHandle_stub.gcda
deleted file mode 100644
index b535cc0320..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/FileHandle_stub.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/FileHandle_stub.gcno b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/FileHandle_stub.gcno
deleted file mode 100644
index f8dc45cb0f..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/FileHandle_stub.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/FileHandle_stub.o b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/FileHandle_stub.o
deleted file mode 100644
index d9b5a95938..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/FileHandle_stub.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/at_cellularinformationtest.d b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/at_cellularinformationtest.d
deleted file mode 100644
index 3d918a8b16..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/at_cellularinformationtest.d
+++ /dev/null
@@ -1,4 +0,0 @@
-objs/AT_CellularInformation_unit/at_cellularinformationtest.o: \
- at_cellularinformationtest.cpp test_at_cellularinformation.h
-
-test_at_cellularinformation.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/at_cellularinformationtest.gcda b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/at_cellularinformationtest.gcda
deleted file mode 100644
index ab44bd2c06..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/at_cellularinformationtest.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/at_cellularinformationtest.gcno b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/at_cellularinformationtest.gcno
deleted file mode 100644
index 02a86a9f7e..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/at_cellularinformationtest.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/at_cellularinformationtest.o b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/at_cellularinformationtest.o
deleted file mode 100644
index dd4a57c031..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/at_cellularinformationtest.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/main.d b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/main.d
deleted file mode 100644
index f9779a3bfe..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/main.d
+++ /dev/null
@@ -1 +0,0 @@
-objs/AT_CellularInformation_unit/main.o: main.cpp
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/main.gcda b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/main.gcda
deleted file mode 100644
index 0a30328549..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/main.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/main.gcno b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/main.gcno
deleted file mode 100644
index e610401e91..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/main.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/main.o b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/main.o
deleted file mode 100644
index 9b2bff47fe..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/main.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/mbed_assert_stub.d b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/mbed_assert_stub.d
deleted file mode 100644
index 4ae9e6929a..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/mbed_assert_stub.d
+++ /dev/null
@@ -1,7 +0,0 @@
-objs/AT_CellularInformation_unit/mbed_assert_stub.o: \
- ../../stubs/mbed_assert_stub.cpp ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/mbed_assert_stub.gcda b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/mbed_assert_stub.gcda
deleted file mode 100644
index a497e30ff5..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/mbed_assert_stub.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/mbed_assert_stub.gcno b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/mbed_assert_stub.gcno
deleted file mode 100644
index 8c5578c9a4..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/mbed_assert_stub.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/mbed_assert_stub.o b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/mbed_assert_stub.o
deleted file mode 100644
index 0e31263deb..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/mbed_assert_stub.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/test_at_cellularinformation.d b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/test_at_cellularinformation.d
deleted file mode 100644
index 2f3b3b4102..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/test_at_cellularinformation.d
+++ /dev/null
@@ -1,87 +0,0 @@
-objs/AT_CellularInformation_unit/test_at_cellularinformation.o: \
- test_at_cellularinformation.cpp test_at_cellularinformation.h \
- ../../stubs/ATHandler_stub.h \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../framework/AT/ATHandler.h \
- ../../target_h/platform/mbed_retarget.h \
- ../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
- ../../../../../events/equeue/equeue_platform.h \
- ../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h \
- ../../../../../platform/PlatformMutex.h \
- ../../../../../platform/Callback.h ../../stubs/FileHandle_stub.h \
- ../../../../../platform/FileHandle.h ../../../../../platform/Callback.h \
- ../../../../../platform/mbed_poll.h ../../../../../platform/platform.h \
- ../../target_h/device.h ../../target_h/PinNames.h \
- ../../target_h/PeripheralNames.h ../../stubs/FileHandle_stub.h \
- ../../../framework/AT/AT_CellularInformation.h \
- ../../../framework/API/CellularInformation.h \
- ../../../framework/AT/AT_CellularBase.h \
- ../../../framework/AT/ATHandler.h \
- ../../../framework/AT/AT_CellularBase.h
-
-test_at_cellularinformation.h:
-
-../../stubs/ATHandler_stub.h:
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../framework/AT/ATHandler.h:
-
-../../target_h/platform/mbed_retarget.h:
-
-../../../../../events/EventQueue.h:
-
-../../../../../events/equeue/equeue.h:
-
-../../../../../events/equeue/equeue_platform.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
-
-../../../../../platform/PlatformMutex.h:
-
-../../../../../platform/Callback.h:
-
-../../stubs/FileHandle_stub.h:
-
-../../../../../platform/FileHandle.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_poll.h:
-
-../../../../../platform/platform.h:
-
-../../target_h/device.h:
-
-../../target_h/PinNames.h:
-
-../../target_h/PeripheralNames.h:
-
-../../stubs/FileHandle_stub.h:
-
-../../../framework/AT/AT_CellularInformation.h:
-
-../../../framework/API/CellularInformation.h:
-
-../../../framework/AT/AT_CellularBase.h:
-
-../../../framework/AT/ATHandler.h:
-
-../../../framework/AT/AT_CellularBase.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/test_at_cellularinformation.gcda b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/test_at_cellularinformation.gcda
deleted file mode 100644
index 6cc357de47..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/test_at_cellularinformation.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/test_at_cellularinformation.gcno b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/test_at_cellularinformation.gcno
deleted file mode 100644
index 4193ece23a..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/test_at_cellularinformation.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/test_at_cellularinformation.o b/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/test_at_cellularinformation.o
deleted file mode 100644
index 0e7908d549..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularinformation/objs/AT_CellularInformation_unit/test_at_cellularinformation.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/AT_CellularMultiplexer_unit_tests b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/AT_CellularMultiplexer_unit_tests
deleted file mode 100755
index 5e0c1abe1b..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/AT_CellularMultiplexer_unit_tests and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/AT_CellularMultiplexer_unit_tests.txt b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/AT_CellularMultiplexer_unit_tests.txt
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/cpputest_AT_CellularMultiplexer.xml b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/cpputest_AT_CellularMultiplexer.xml
deleted file mode 100644
index 4f0428899e..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/cpputest_AT_CellularMultiplexer.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/gcov/AT_CellularMultiplexer.cpp.gcov b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/gcov/AT_CellularMultiplexer.cpp.gcov
deleted file mode 100644
index 5a24aa0f0c..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/gcov/AT_CellularMultiplexer.cpp.gcov
+++ /dev/null
@@ -1,48 +0,0 @@
- -: 0:Source:../../../framework/AT/AT_CellularMultiplexer.cpp
- -: 0:Graph:objs/AT_CellularMultiplexer_unit/AT_CellularMultiplexer.gcno
- -: 0:Data:objs/AT_CellularMultiplexer_unit/AT_CellularMultiplexer.gcda
- -: 0:Runs:1
- -: 0:Programs:1
- -: 1:/*
- -: 2: * Copyright (c) 2017, Arm Limited and affiliates.
- -: 3: * SPDX-License-Identifier: Apache-2.0
- -: 4: *
- -: 5: * Licensed under the Apache License, Version 2.0 (the "License");
- -: 6: * you may not use this file except in compliance with the License.
- -: 7: * You may obtain a copy of the License at
- -: 8: *
- -: 9: * http://www.apache.org/licenses/LICENSE-2.0
- -: 10: *
- -: 11: * Unless required by applicable law or agreed to in writing, software
- -: 12: * distributed under the License is distributed on an "AS IS" BASIS,
- -: 13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- -: 14: * See the License for the specific language governing permissions and
- -: 15: * limitations under the License.
- -: 16: */
- -: 17:
- -: 18:#include "AT_CellularMultiplexer.h"
- -: 19:#include "CellularLog.h"
- -: 20:
- -: 21:using namespace mbed;
- -: 22:
- 2: 23:AT_CellularMultiplexer::AT_CellularMultiplexer(ATHandler &at) : AT_CellularBase(at)
- -: 24:{
- 2: 25:}
- -: 26:
- 3: 27:AT_CellularMultiplexer::~AT_CellularMultiplexer()
- -: 28:{
- 3: 29:}
- -: 30:
- 1: 31:nsapi_error_t AT_CellularMultiplexer::multiplexer_mode_start()
- -: 32:{
- -: 33: log_info("multiplexer_mode_start()");
- -: 34:
- 1: 35: _at.lock();
- -: 36:
- 1: 37: _at.cmd_start("AT+CMUX=0");
- 1: 38: _at.cmd_stop();
- 1: 39: _at.resp_start();
- 1: 40: _at.resp_stop();
- -: 41:
- 1: 42: return _at.unlock_return_error();
- -: 43:}
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/gcov/CellularMultiplexer.h.gcov b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/gcov/CellularMultiplexer.h.gcov
deleted file mode 100644
index afd15155cb..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/gcov/CellularMultiplexer.h.gcov
+++ /dev/null
@@ -1,56 +0,0 @@
- -: 0:Source:../../../framework/API/CellularMultiplexer.h
- -: 0:Graph:objs/AT_CellularMultiplexer_unit/AT_CellularMultiplexer.gcno
- -: 0:Data:objs/AT_CellularMultiplexer_unit/AT_CellularMultiplexer.gcda
- -: 0:Runs:1
- -: 0:Programs:1
- -: 1:/*
- -: 2: * Copyright (c) 2017, Arm Limited and affiliates.
- -: 3: * SPDX-License-Identifier: Apache-2.0
- -: 4: *
- -: 5: * Licensed under the Apache License, Version 2.0 (the "License");
- -: 6: * you may not use this file except in compliance with the License.
- -: 7: * You may obtain a copy of the License at
- -: 8: *
- -: 9: * http://www.apache.org/licenses/LICENSE-2.0
- -: 10: *
- -: 11: * Unless required by applicable law or agreed to in writing, software
- -: 12: * distributed under the License is distributed on an "AS IS" BASIS,
- -: 13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- -: 14: * See the License for the specific language governing permissions and
- -: 15: * limitations under the License.
- -: 16: */
- -: 17:
- -: 18:#ifndef CELLULAR_MULTIPLEXER_H_
- -: 19:#define CELLULAR_MULTIPLEXER_H_
- -: 20:
- -: 21:#include "nsapi_types.h"
- -: 22:
- -: 23:namespace mbed {
- -: 24:
- -: 25:/**
- -: 26: * Class CellularMultiplexer
- -: 27: *
- -: 28: * An abstract interface that provides a way to start multiplexer mode in modem.
- -: 29: */
- 2: 30:class CellularMultiplexer
- -: 31:{
- -: 32:protected:
- -: 33: // friend of CellularDevice so that it's the only way to close/delete this class.
- -: 34: friend class CellularDevice;
- -: 35:
- -: 36: /** virtual Destructor
- -: 37: */
- 2: 38: virtual ~CellularMultiplexer() {};
- -: 39:
- -: 40:public:
- -: 41:
- -: 42: /** Starts modem multiplexer mode specified by 3GPP TS 27.010.
- -: 43: *
- -: 44: * @return zero on success, negative error code on failure
- -: 45: */
- -: 46: virtual nsapi_error_t multiplexer_mode_start() = 0;
- -: 47:};
- -: 48:
- -: 49:} // namespace mbed
- -: 50:
- -: 51:#endif // CELLULAR_MULTIPLEXER_H_
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/gcov/gcov_error.txt b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/gcov/gcov_error.txt
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/gcov/gcov_output.txt b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/gcov/gcov_output.txt
deleted file mode 100644
index 269477ed32..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/gcov/gcov_output.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-File '../../../framework/AT/AT_CellularMultiplexer.cpp'
-Lines executed:100.00% of 11
-Creating 'AT_CellularMultiplexer.cpp.gcov'
-
-File '../../../framework/API/CellularMultiplexer.h'
-Lines executed:100.00% of 2
-Creating 'CellularMultiplexer.h.gcov'
-
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/gcov/gcov_report.txt b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/gcov/gcov_report.txt
deleted file mode 100644
index 77c3217d0b..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/gcov/gcov_report.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-100.00% ../framework/API/CellularMultiplexer.h
-100.00% ../framework/AT/AT_CellularMultiplexer.cpp
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/gcov/gcov_report.txt.html b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/gcov/gcov_report.txt.html
deleted file mode 100644
index d2d82771b3..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/gcov/gcov_report.txt.html
+++ /dev/null
@@ -1,5 +0,0 @@
-
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/lib/libAT_CellularMultiplexer_unit.a b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/lib/libAT_CellularMultiplexer_unit.a
deleted file mode 100644
index 598441a63b..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/lib/libAT_CellularMultiplexer_unit.a and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/ATHandler_stub.d b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/ATHandler_stub.d
deleted file mode 100644
index 7d60d13cf4..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/ATHandler_stub.d
+++ /dev/null
@@ -1,78 +0,0 @@
-objs/AT_CellularMultiplexer_unit/ATHandler_stub.o: \
- ../../stubs/ATHandler_stub.cpp \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../framework/AT/ATHandler.h \
- ../../target_h/platform/mbed_retarget.h \
- ../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
- ../../../../../events/equeue/equeue_platform.h \
- ../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h \
- ../../../../../platform/PlatformMutex.h \
- ../../../../../platform/Callback.h ../../stubs/ATHandler_stub.h \
- ../../stubs/FileHandle_stub.h ../../../../../platform/FileHandle.h \
- ../../../../../platform/Callback.h ../../../../../platform/mbed_poll.h \
- ../../../../../platform/platform.h ../../target_h/device.h \
- ../../target_h/PinNames.h ../../target_h/PeripheralNames.h \
- ../../../framework/common/CellularLog.h \
- ../../../../../hal/us_ticker_api.h ../../../../../hal/ticker_api.h \
- ../../../../../platform/mbed_debug.h
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../framework/AT/ATHandler.h:
-
-../../target_h/platform/mbed_retarget.h:
-
-../../../../../events/EventQueue.h:
-
-../../../../../events/equeue/equeue.h:
-
-../../../../../events/equeue/equeue_platform.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
-
-../../../../../platform/PlatformMutex.h:
-
-../../../../../platform/Callback.h:
-
-../../stubs/ATHandler_stub.h:
-
-../../stubs/FileHandle_stub.h:
-
-../../../../../platform/FileHandle.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_poll.h:
-
-../../../../../platform/platform.h:
-
-../../target_h/device.h:
-
-../../target_h/PinNames.h:
-
-../../target_h/PeripheralNames.h:
-
-../../../framework/common/CellularLog.h:
-
-../../../../../hal/us_ticker_api.h:
-
-../../../../../hal/ticker_api.h:
-
-../../../../../platform/mbed_debug.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/ATHandler_stub.gcda b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/ATHandler_stub.gcda
deleted file mode 100644
index 99943c3448..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/ATHandler_stub.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/ATHandler_stub.gcno b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/ATHandler_stub.gcno
deleted file mode 100644
index ae12bf3f27..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/ATHandler_stub.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/ATHandler_stub.o b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/ATHandler_stub.o
deleted file mode 100644
index 9079591fba..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/ATHandler_stub.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/AT_CellularBase_stub.d b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/AT_CellularBase_stub.d
deleted file mode 100644
index 17bdd705eb..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/AT_CellularBase_stub.d
+++ /dev/null
@@ -1,53 +0,0 @@
-objs/AT_CellularMultiplexer_unit/AT_CellularBase_stub.o: \
- ../../stubs/AT_CellularBase_stub.cpp \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../framework/AT/AT_CellularBase.h \
- ../../../framework/AT/ATHandler.h \
- ../../target_h/platform/mbed_retarget.h \
- ../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
- ../../../../../events/equeue/equeue_platform.h \
- ../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h \
- ../../../../../platform/PlatformMutex.h \
- ../../../../../platform/Callback.h ../../stubs/AT_CellularBase_stub.h \
- ../../../framework/AT/ATHandler.h
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../framework/AT/AT_CellularBase.h:
-
-../../../framework/AT/ATHandler.h:
-
-../../target_h/platform/mbed_retarget.h:
-
-../../../../../events/EventQueue.h:
-
-../../../../../events/equeue/equeue.h:
-
-../../../../../events/equeue/equeue_platform.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
-
-../../../../../platform/PlatformMutex.h:
-
-../../../../../platform/Callback.h:
-
-../../stubs/AT_CellularBase_stub.h:
-
-../../../framework/AT/ATHandler.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/AT_CellularBase_stub.gcda b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/AT_CellularBase_stub.gcda
deleted file mode 100644
index a06ac12bb5..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/AT_CellularBase_stub.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/AT_CellularBase_stub.gcno b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/AT_CellularBase_stub.gcno
deleted file mode 100644
index 32aa18e774..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/AT_CellularBase_stub.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/AT_CellularBase_stub.o b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/AT_CellularBase_stub.o
deleted file mode 100644
index 7e5faa54e2..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/AT_CellularBase_stub.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/AT_CellularMultiplexer.d b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/AT_CellularMultiplexer.d
deleted file mode 100644
index fc1a8d9606..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/AT_CellularMultiplexer.d
+++ /dev/null
@@ -1,69 +0,0 @@
-objs/AT_CellularMultiplexer_unit/AT_CellularMultiplexer.o: \
- ../../../framework/AT/AT_CellularMultiplexer.cpp \
- ../../../framework/AT/AT_CellularMultiplexer.h \
- ../../../framework/API/CellularMultiplexer.h \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../framework/AT/AT_CellularBase.h \
- ../../../framework/AT/ATHandler.h \
- ../../target_h/platform/mbed_retarget.h \
- ../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
- ../../../../../events/equeue/equeue_platform.h \
- ../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h \
- ../../../../../platform/PlatformMutex.h \
- ../../../../../platform/Callback.h \
- ../../../framework/common/CellularLog.h ../../target_h/PinNames.h \
- ../../../../../hal/us_ticker_api.h ../../../../../hal/ticker_api.h \
- ../../target_h/device.h ../../../../../platform/mbed_debug.h
-
-../../../framework/AT/AT_CellularMultiplexer.h:
-
-../../../framework/API/CellularMultiplexer.h:
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../framework/AT/AT_CellularBase.h:
-
-../../../framework/AT/ATHandler.h:
-
-../../target_h/platform/mbed_retarget.h:
-
-../../../../../events/EventQueue.h:
-
-../../../../../events/equeue/equeue.h:
-
-../../../../../events/equeue/equeue_platform.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
-
-../../../../../platform/PlatformMutex.h:
-
-../../../../../platform/Callback.h:
-
-../../../framework/common/CellularLog.h:
-
-../../target_h/PinNames.h:
-
-../../../../../hal/us_ticker_api.h:
-
-../../../../../hal/ticker_api.h:
-
-../../target_h/device.h:
-
-../../../../../platform/mbed_debug.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/AT_CellularMultiplexer.gcda b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/AT_CellularMultiplexer.gcda
deleted file mode 100644
index bb81afcc32..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/AT_CellularMultiplexer.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/AT_CellularMultiplexer.gcno b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/AT_CellularMultiplexer.gcno
deleted file mode 100644
index 02b1f0ba9f..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/AT_CellularMultiplexer.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/AT_CellularMultiplexer.o b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/AT_CellularMultiplexer.o
deleted file mode 100644
index f1fa4702d7..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/AT_CellularMultiplexer.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/EventQueue_stub.d b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/EventQueue_stub.d
deleted file mode 100644
index ce39686894..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/EventQueue_stub.d
+++ /dev/null
@@ -1,32 +0,0 @@
-objs/AT_CellularMultiplexer_unit/EventQueue_stub.o: \
- ../../stubs/EventQueue_stub.cpp ../../../../../events/EventQueue.h \
- ../../../../../events/equeue/equeue.h \
- ../../../../../events/equeue/equeue_platform.h \
- ../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h ../../../../../platform/Callback.h
-
-../../../../../events/EventQueue.h:
-
-../../../../../events/equeue/equeue.h:
-
-../../../../../events/equeue/equeue_platform.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
-
-../../../../../platform/Callback.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/EventQueue_stub.gcda b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/EventQueue_stub.gcda
deleted file mode 100644
index 71d5a57fd7..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/EventQueue_stub.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/EventQueue_stub.gcno b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/EventQueue_stub.gcno
deleted file mode 100644
index c500d7c33e..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/EventQueue_stub.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/EventQueue_stub.o b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/EventQueue_stub.o
deleted file mode 100644
index 2043416432..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/EventQueue_stub.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/FileHandle_stub.d b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/FileHandle_stub.d
deleted file mode 100644
index d1b5031eee..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/FileHandle_stub.d
+++ /dev/null
@@ -1,42 +0,0 @@
-objs/AT_CellularMultiplexer_unit/FileHandle_stub.o: \
- ../../stubs/FileHandle_stub.cpp ../../stubs/FileHandle_stub.h \
- ../../../../../platform/FileHandle.h ../../../../../platform/Callback.h \
- ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_poll.h ../../../../../platform/platform.h \
- ../../target_h/platform/mbed_retarget.h ../../target_h/device.h \
- ../../target_h/PinNames.h ../../target_h/PeripheralNames.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h
-
-../../stubs/FileHandle_stub.h:
-
-../../../../../platform/FileHandle.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_poll.h:
-
-../../../../../platform/platform.h:
-
-../../target_h/platform/mbed_retarget.h:
-
-../../target_h/device.h:
-
-../../target_h/PinNames.h:
-
-../../target_h/PeripheralNames.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/FileHandle_stub.gcda b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/FileHandle_stub.gcda
deleted file mode 100644
index c476fe9439..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/FileHandle_stub.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/FileHandle_stub.gcno b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/FileHandle_stub.gcno
deleted file mode 100644
index 25980fd480..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/FileHandle_stub.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/FileHandle_stub.o b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/FileHandle_stub.o
deleted file mode 100644
index 5331239e6d..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/FileHandle_stub.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/at_cellularmultiplexertest.d b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/at_cellularmultiplexertest.d
deleted file mode 100644
index 1a493c8d35..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/at_cellularmultiplexertest.d
+++ /dev/null
@@ -1,4 +0,0 @@
-objs/AT_CellularMultiplexer_unit/at_cellularmultiplexertest.o: \
- at_cellularmultiplexertest.cpp test_at_cellularmultiplexer.h
-
-test_at_cellularmultiplexer.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/at_cellularmultiplexertest.gcda b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/at_cellularmultiplexertest.gcda
deleted file mode 100644
index b89ffa0004..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/at_cellularmultiplexertest.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/at_cellularmultiplexertest.gcno b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/at_cellularmultiplexertest.gcno
deleted file mode 100644
index ab63721bf8..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/at_cellularmultiplexertest.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/at_cellularmultiplexertest.o b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/at_cellularmultiplexertest.o
deleted file mode 100644
index 9e47fb4209..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/at_cellularmultiplexertest.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/main.d b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/main.d
deleted file mode 100644
index 8da48abe4c..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/main.d
+++ /dev/null
@@ -1 +0,0 @@
-objs/AT_CellularMultiplexer_unit/main.o: main.cpp
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/main.gcda b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/main.gcda
deleted file mode 100644
index 56233781f4..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/main.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/main.gcno b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/main.gcno
deleted file mode 100644
index 6b9c0d40fc..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/main.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/main.o b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/main.o
deleted file mode 100644
index a54513a1ee..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/main.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/mbed_assert_stub.d b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/mbed_assert_stub.d
deleted file mode 100644
index 4e7c30163c..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/mbed_assert_stub.d
+++ /dev/null
@@ -1,7 +0,0 @@
-objs/AT_CellularMultiplexer_unit/mbed_assert_stub.o: \
- ../../stubs/mbed_assert_stub.cpp ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/mbed_assert_stub.gcda b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/mbed_assert_stub.gcda
deleted file mode 100644
index 60e9be9db1..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/mbed_assert_stub.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/mbed_assert_stub.gcno b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/mbed_assert_stub.gcno
deleted file mode 100644
index b315b36042..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/mbed_assert_stub.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/mbed_assert_stub.o b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/mbed_assert_stub.o
deleted file mode 100644
index 8bddcabb06..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/mbed_assert_stub.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/test_at_cellularmultiplexer.d b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/test_at_cellularmultiplexer.d
deleted file mode 100644
index f2a7059470..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/test_at_cellularmultiplexer.d
+++ /dev/null
@@ -1,162 +0,0 @@
-objs/AT_CellularMultiplexer_unit/test_at_cellularmultiplexer.o: \
- test_at_cellularmultiplexer.cpp test_at_cellularmultiplexer.h \
- ../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
- ../../../../../events/equeue/equeue_platform.h \
- ../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
- ../../../../../platform/mbed_preprocessor.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/NonCopyable.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../platform/mbed_debug.h ../../../framework/AT/ATHandler.h \
- ../../target_h/platform/mbed_retarget.h \
- ../../../../../platform/PlatformMutex.h \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../../../platform/Callback.h \
- ../../../framework/AT/AT_CellularDevice.h \
- ../../../framework/API/CellularDevice.h \
- ../../../../../platform/FileHandle.h ../../../../../platform/Callback.h \
- ../../../../../platform/mbed_poll.h ../../../../../platform/platform.h \
- ../../target_h/device.h ../../target_h/PinNames.h \
- ../../target_h/PeripheralNames.h ../../../framework/API/CellularSIM.h \
- ../../../framework/API/CellularNetwork.h \
- ../../../../../features/netsocket/CellularInterface.h \
- ../../../../../features/netsocket/NetworkInterface.h \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../../../features/netsocket/SocketAddress.h \
- ../../../../../features/netsocket/nsapi_types.h \
- ../../../../../platform/mbed_toolchain.h \
- ../../../../../features/netsocket/NetworkInterface.h \
- ../../../framework/common/CellularList.h \
- ../../../framework/API/CellularSMS.h \
- ../../../framework/API/CellularPower.h \
- ../../../framework/API/CellularMultiplexer.h \
- ../../../framework/API/CellularInformation.h \
- ../../../framework/AT/AT_CellularNetwork.h \
- ../../../framework/API/CellularNetwork.h \
- ../../../framework/AT/AT_CellularBase.h \
- ../../../framework/AT/ATHandler.h \
- ../../../../../features/netsocket/NetworkStack.h \
- ../../../framework/AT/AT_CellularSIM.h \
- ../../../framework/API/CellularSIM.h \
- ../../../framework/AT/AT_CellularSMS.h \
- ../../../framework/API/CellularSMS.h \
- ../../../framework/AT/AT_CellularPower.h \
- ../../../framework/API/CellularPower.h \
- ../../../framework/AT/AT_CellularMultiplexer.h \
- ../../../framework/API/CellularMultiplexer.h \
- ../../../framework/AT/AT_CellularInformation.h \
- ../../../framework/API/CellularInformation.h \
- ../../../framework/AT/AT_CellularMultiplexer.h \
- ../../stubs/FileHandle_stub.h
-
-test_at_cellularmultiplexer.h:
-
-../../../../../events/EventQueue.h:
-
-../../../../../events/equeue/equeue.h:
-
-../../../../../events/equeue/equeue_platform.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_assert.h:
-
-../../../../../platform/mbed_preprocessor.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/NonCopyable.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../platform/mbed_debug.h:
-
-../../../framework/AT/ATHandler.h:
-
-../../target_h/platform/mbed_retarget.h:
-
-../../../../../platform/PlatformMutex.h:
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../../../platform/Callback.h:
-
-../../../framework/AT/AT_CellularDevice.h:
-
-../../../framework/API/CellularDevice.h:
-
-../../../../../platform/FileHandle.h:
-
-../../../../../platform/Callback.h:
-
-../../../../../platform/mbed_poll.h:
-
-../../../../../platform/platform.h:
-
-../../target_h/device.h:
-
-../../target_h/PinNames.h:
-
-../../target_h/PeripheralNames.h:
-
-../../../framework/API/CellularSIM.h:
-
-../../../framework/API/CellularNetwork.h:
-
-../../../../../features/netsocket/CellularInterface.h:
-
-../../../../../features/netsocket/NetworkInterface.h:
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../../../features/netsocket/SocketAddress.h:
-
-../../../../../features/netsocket/nsapi_types.h:
-
-../../../../../platform/mbed_toolchain.h:
-
-../../../../../features/netsocket/NetworkInterface.h:
-
-../../../framework/common/CellularList.h:
-
-../../../framework/API/CellularSMS.h:
-
-../../../framework/API/CellularPower.h:
-
-../../../framework/API/CellularMultiplexer.h:
-
-../../../framework/API/CellularInformation.h:
-
-../../../framework/AT/AT_CellularNetwork.h:
-
-../../../framework/API/CellularNetwork.h:
-
-../../../framework/AT/AT_CellularBase.h:
-
-../../../framework/AT/ATHandler.h:
-
-../../../../../features/netsocket/NetworkStack.h:
-
-../../../framework/AT/AT_CellularSIM.h:
-
-../../../framework/API/CellularSIM.h:
-
-../../../framework/AT/AT_CellularSMS.h:
-
-../../../framework/API/CellularSMS.h:
-
-../../../framework/AT/AT_CellularPower.h:
-
-../../../framework/API/CellularPower.h:
-
-../../../framework/AT/AT_CellularMultiplexer.h:
-
-../../../framework/API/CellularMultiplexer.h:
-
-../../../framework/AT/AT_CellularInformation.h:
-
-../../../framework/API/CellularInformation.h:
-
-../../../framework/AT/AT_CellularMultiplexer.h:
-
-../../stubs/FileHandle_stub.h:
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/test_at_cellularmultiplexer.gcda b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/test_at_cellularmultiplexer.gcda
deleted file mode 100644
index bf25d7c31c..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/test_at_cellularmultiplexer.gcda and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/test_at_cellularmultiplexer.gcno b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/test_at_cellularmultiplexer.gcno
deleted file mode 100644
index 29b610e7fe..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/test_at_cellularmultiplexer.gcno and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/test_at_cellularmultiplexer.o b/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/test_at_cellularmultiplexer.o
deleted file mode 100644
index 814b5513e4..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularmultiplexer/objs/AT_CellularMultiplexer_unit/test_at_cellularmultiplexer.o and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularnetwork/AT_CellularNetwork_unit_tests b/features/cellular/UNITTESTS/at/at_cellularnetwork/AT_CellularNetwork_unit_tests
deleted file mode 100755
index fc5377949d..0000000000
Binary files a/features/cellular/UNITTESTS/at/at_cellularnetwork/AT_CellularNetwork_unit_tests and /dev/null differ
diff --git a/features/cellular/UNITTESTS/at/at_cellularnetwork/AT_CellularNetwork_unit_tests.txt b/features/cellular/UNITTESTS/at/at_cellularnetwork/AT_CellularNetwork_unit_tests.txt
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/features/cellular/UNITTESTS/at/at_cellularnetwork/cpputest_AT_CellularNetwork.xml b/features/cellular/UNITTESTS/at/at_cellularnetwork/cpputest_AT_CellularNetwork.xml
deleted file mode 100644
index 92acf5e5b8..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularnetwork/cpputest_AT_CellularNetwork.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/features/cellular/UNITTESTS/at/at_cellularnetwork/gcov/AT_CellularNetwork.cpp.gcov b/features/cellular/UNITTESTS/at/at_cellularnetwork/gcov/AT_CellularNetwork.cpp.gcov
deleted file mode 100644
index bafffc836e..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularnetwork/gcov/AT_CellularNetwork.cpp.gcov
+++ /dev/null
@@ -1,910 +0,0 @@
- -: 0:Source:../../../framework/AT/AT_CellularNetwork.cpp
- -: 0:Graph:objs/AT_CellularNetwork_unit/AT_CellularNetwork.gcno
- -: 0:Data:objs/AT_CellularNetwork_unit/AT_CellularNetwork.gcda
- -: 0:Runs:1
- -: 0:Programs:1
- -: 1:/*
- -: 2: * Copyright (c) 2017, Arm Limited and affiliates.
- -: 3: * SPDX-License-Identifier: Apache-2.0
- -: 4: *
- -: 5: * Licensed under the Apache License, Version 2.0 (the "License");
- -: 6: * you may not use this file except in compliance with the License.
- -: 7: * You may obtain a copy of the License at
- -: 8: *
- -: 9: * http://www.apache.org/licenses/LICENSE-2.0
- -: 10: *
- -: 11: * Unless required by applicable law or agreed to in writing, software
- -: 12: * distributed under the License is distributed on an "AS IS" BASIS,
- -: 13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- -: 14: * See the License for the specific language governing permissions and
- -: 15: * limitations under the License.
- -: 16: */
- -: 17:
- -: 18:#include
- -: 19:#include "AT_CellularNetwork.h"
- -: 20:#include "nsapi_ppp.h"
- -: 21:#include "CellularUtil.h"
- -: 22:#include "CellularLog.h"
- -: 23:
- -: 24:using namespace std;
- -: 25:using namespace mbed_cellular_util;
- -: 26:using namespace mbed;
- -: 27:
- 25: 28:AT_CellularNetwork::AT_CellularNetwork(ATHandler &atHandler) : AT_CellularBase(atHandler),
- -: 29: _stack(NULL), _uname(NULL), _pwd(NULL), _ip_stack_type_requested(DEFAULT_STACK), _ip_stack_type(DEFAULT_STACK), _cid(-1),
- 25: 30: _op_act(operator_t::RAT_UNKNOWN), _authentication_type(CHAP), _last_reg_type(C_REG)
- -: 31:{
- -: 32:
- 25: 33: _at.set_urc_handler("NO CARRIER", callback(this, &AT_CellularNetwork::urc_no_carrier));
- -: 34:
- 25: 35: memset(_apn, 0, MAX_APN_LENGTH);
- -: 36:
- -: 37:#ifdef MBED_CONF_APP_CELLULAR_APN
- -: 38: strncpy(_apn, MBED_CONF_APP_CELLULAR_APN, MAX_APN_LENGTH);
- -: 39: log_debug("Using APN [%s] from json", _apn);
- -: 40:#endif
- -: 41:
- 25: 42:}
- -: 43:
- 26: 44:AT_CellularNetwork::~AT_CellularNetwork()
- -: 45:{
- 26: 46:}
- -: 47:
- 1: 48:void AT_CellularNetwork::urc_no_carrier()
- -: 49:{
- 1: 50: if (_connection_status_cb) {
- 1: 51: _connection_status_cb(NSAPI_ERROR_CONNECTION_LOST);
- -: 52: }
- 1: 53:}
- -: 54:
- 1: 55:nsapi_error_t AT_CellularNetwork::set_credentials(const char *apn,
- -: 56: const char *username, const char *password)
- -: 57:{
- 1: 58: strncpy(_apn, apn, MAX_APN_LENGTH);
- 1: 59: _uname = username;
- 1: 60: _pwd = password;
- -: 61:
- 1: 62: return NSAPI_ERROR_OK;
- -: 63:}
- -: 64:
- 1: 65:nsapi_error_t AT_CellularNetwork::set_credentials(const char *apn,
- -: 66: AuthenticationType type, const char *username, const char *password)
- -: 67:{
- 1: 68: strncpy(_apn, apn, MAX_APN_LENGTH);
- 1: 69: _uname = username;
- 1: 70: _pwd = password;
- 1: 71: _authentication_type = type;
- -: 72:
- 1: 73: return NSAPI_ERROR_OK;
- -: 74:}
- -: 75:
- 2: 76:nsapi_error_t AT_CellularNetwork::connect(const char *apn,
- -: 77: const char *username, const char *password)
- -: 78:{
- 2: 79: strncpy(_apn, apn, MAX_APN_LENGTH);
- 2: 80: _uname = username;
- 2: 81: _pwd = password;
- -: 82:
- 2: 83: return connect();
- -: 84:}
- -: 85:
- 2: 86:nsapi_error_t AT_CellularNetwork::connect()
- -: 87:{
- 2: 88: _at.lock();
- -: 89:
- 2: 90: nsapi_error_t err = set_context_to_be_activated();
- 2: 91: if (err != NSAPI_ERROR_OK) {
- 1: 92: _at.unlock();
- 1: 93: log_error("Failed to activate network context!");
- 1: 94: return err;
- -: 95: }
- -: 96:
- 1: 97: err = open_data_channel();
- 1: 98: if (err != NSAPI_ERROR_OK) {
- 1: 99: _at.unlock();
- 1: 100: log_error("Failed to open data channel!");
- 1: 101: return err;
- -: 102: }
- -: 103:
- #####: 104: _at.unlock();
- -: 105:
- #####: 106: return NSAPI_ERROR_OK;
- -: 107:}
- -: 108:
- 1: 109:nsapi_error_t AT_CellularNetwork::open_data_channel()
- -: 110:{
- -: 111: //old way: _at.send("ATD*99***%d#", _cid) && _at.recv("CONNECT");
- 1: 112: nsapi_error_t err = NSAPI_ERROR_NO_CONNECTION;
- -: 113:#if NSAPI_PPP_AVAILABLE
- -: 114: log_info("Open data channel in PPP mode");
- -: 115: _at.cmd_start("AT+CGDATA=\"PPP\",");
- -: 116: _at.write_int(_cid);
- -: 117: _at.cmd_stop();
- -: 118:
- -: 119: _at.resp_start("CONNECT", true);
- -: 120: if (_at.get_last_error()) {
- -: 121: log_warn("Failed to CONNECT");
- -: 122: }
- -: 123: /* Initialize PPP
- -: 124: * mbed_ppp_init() is a blocking call, it will block until
- -: 125: * connected, or timeout after 30 seconds*/
- -: 126: err = nsapi_ppp_connect(_at.get_file_handle(), _connection_status_cb, _uname, _pwd, _ip_stack_type);
- -: 127:#else
- -: 128: // do check for stack to validate that we have support for stack
- 1: 129: _stack = get_stack();
- 1: 130: if (!_stack) {
- 1: 131: return err;
- -: 132: }
- -: 133:
- #####: 134: bool is_context_active = false;
- #####: 135: _at.cmd_start("AT+CGACT?");
- #####: 136: _at.cmd_stop();
- #####: 137: _at.resp_start("+CGACT:");
- #####: 138: while (_at.info_resp()) {
- #####: 139: int context_id = _at.read_int();
- #####: 140: int context_activation_state = _at.read_int();
- #####: 141: if (context_id == _cid && context_activation_state == 1) {
- #####: 142: is_context_active = true;
- -: 143: }
- -: 144: }
- #####: 145: _at.resp_stop();
- -: 146:
- #####: 147: if (!is_context_active) {
- -: 148: log_info("Activate PDP context");
- #####: 149: _at.cmd_start("AT+CGACT=1,");
- #####: 150: _at.write_int(_cid);
- #####: 151: _at.cmd_stop();
- #####: 152: _at.resp_start();
- #####: 153: _at.resp_stop();
- -: 154: }
- -: 155:
- #####: 156: err = (_at.get_last_error() == NSAPI_ERROR_OK) ? NSAPI_ERROR_OK : NSAPI_ERROR_NO_CONNECTION;
- -: 157:#endif
- #####: 158: return err;
- -: 159:}
- -: 160:
- -: 161:/**
- -: 162: * User initiated disconnect
- -: 163: *
- -: 164: * Disconnects from PPP connection only and brings down the underlying network
- -: 165: * interface
- -: 166: */
- 1: 167:nsapi_error_t AT_CellularNetwork::disconnect()
- -: 168:{
- -: 169:#if NSAPI_PPP_AVAILABLE
- -: 170: return nsapi_ppp_disconnect(_at.get_file_handle());
- -: 171:#else
- 1: 172: return NSAPI_ERROR_OK;
- -: 173:#endif
- -: 174:}
- -: 175:
- 1: 176:void AT_CellularNetwork::connection_status_cb(Callback cb)
- -: 177:{
- 1: 178: _connection_status_cb = cb;
- 1: 179:}
- -: 180:
- 2: 181:nsapi_error_t AT_CellularNetwork::set_context_to_be_activated()
- -: 182:{
- -: 183: // try to find or create context with suitable stack
- 2: 184: if (!get_context(_ip_stack_type_requested)) {
- 1: 185: return NSAPI_ERROR_NO_CONNECTION;
- -: 186: }
- -: 187:
- -: 188: // if user has defined user name and password we need to call CGAUTH before activating or modifying context
- 1: 189: if (_pwd && _uname) {
- 1: 190: _at.cmd_start("AT+CGAUTH=");
- 1: 191: _at.write_int(_cid);
- 1: 192: _at.write_int(_authentication_type);
- 1: 193: _at.write_string(_uname);
- 1: 194: _at.write_string(_pwd);
- 1: 195: _at.cmd_stop();
- 1: 196: _at.resp_start();
- 1: 197: _at.resp_stop();
- 1: 198: if (_at.get_last_error() != NSAPI_ERROR_OK) {
- #####: 199: return NSAPI_ERROR_AUTH_FAILURE;
- -: 200: }
- -: 201: }
- -: 202:
- 1: 203: return _at.get_last_error();
- -: 204:}
- -: 205:
- 2: 206:bool AT_CellularNetwork::set_new_context(nsapi_ip_stack_t stack, int cid)
- -: 207:{
- 2: 208: nsapi_ip_stack_t tmp_stack = stack;
- 2: 209: char pdp_type[8+1] = {0};
- -: 210:
- 2: 211: switch (stack) {
- -: 212: case IPV4_STACK:
- #####: 213: strncpy(pdp_type, "IP", sizeof(pdp_type));
- #####: 214: break;
- -: 215: case IPV6_STACK:
- #####: 216: strncpy(pdp_type, "IPV6", sizeof(pdp_type));
- #####: 217: break;
- -: 218: case IPV4V6_STACK:
- #####: 219: strncpy(pdp_type, "IPV4V6", sizeof(pdp_type));
- #####: 220: break;
- -: 221: default:
- 2: 222: strncpy(pdp_type, "", sizeof(pdp_type));
- 2: 223: break;
- -: 224: }
- -: 225:
- -: 226: //apn: "If the value is null or omitted, then the subscription value will be requested."
- 2: 227: bool success = false;
- 2: 228: _at.cmd_start("AT+CGDCONT=");
- 2: 229: _at.write_int(cid);
- 2: 230: _at.write_string(pdp_type);
- 2: 231: _at.write_string(_apn);
- 2: 232: _at.cmd_stop();
- 2: 233: _at.resp_start();
- 2: 234: _at.resp_stop();
- 2: 235: success = (_at.get_last_error() == NSAPI_ERROR_OK);
- -: 236:
- -: 237: // Fall back to ipv4
- 2: 238: if (!success && tmp_stack == IPV4V6_STACK) {
- #####: 239: tmp_stack = IPV4_STACK;
- #####: 240: _at.cmd_start("AT+FCLASS=0;+CGDCONT=");
- #####: 241: _at.write_int(cid);
- #####: 242: _at.write_string("IP");
- #####: 243: _at.write_string(_apn);
- #####: 244: _at.cmd_stop();
- #####: 245: _at.resp_start();
- #####: 246: _at.resp_stop();
- #####: 247: success = (_at.get_last_error() == NSAPI_ERROR_OK);
- -: 248: }
- -: 249:
- 2: 250: if (success) {
- 1: 251: _ip_stack_type = tmp_stack;
- 1: 252: _cid = cid;
- -: 253: }
- -: 254:
- 2: 255: return success;
- -: 256:}
- -: 257:
- 2: 258:bool AT_CellularNetwork::get_context(nsapi_ip_stack_t requested_stack)
- -: 259:{
- 2: 260: _at.cmd_start("AT+CGDCONT?");
- 2: 261: _at.cmd_stop();
- 2: 262: _at.resp_start("+CGDCONT:");
- 2: 263: _cid = -1;
- 2: 264: int cid_max = 0; // needed when creating new context
- 2: 265: char apn[MAX_APN_LENGTH] = {0};
- 2: 266: int apn_len = 0;
- -: 267:
- 2: 268: while (_at.info_resp()) {
- #####: 269: int cid = _at.read_int();
- #####: 270: if (cid > cid_max) {
- #####: 271: cid_max = cid;
- -: 272: }
- -: 273: char pdp_type_from_context[10];
- #####: 274: int pdp_type_len = _at.read_string(pdp_type_from_context, sizeof(pdp_type_from_context) - 1);
- #####: 275: if (pdp_type_len > 0) {
- #####: 276: apn_len = _at.read_string(apn, sizeof(apn) - 1);
- #####: 277: if (apn_len >= 0) {
- #####: 278: if (strlen(_apn) && strcmp(apn, _apn) != 0 ) {
- #####: 279: continue;
- -: 280: }
- #####: 281: nsapi_ip_stack_t pdp_stack = string_to_stack_type(pdp_type_from_context);
- #####: 282: if (pdp_stack != DEFAULT_STACK) {
- #####: 283: if (get_modem_stack_type(pdp_stack)) {
- #####: 284: if (requested_stack == IPV4_STACK) {
- #####: 285: if (pdp_stack == IPV4_STACK || pdp_stack == IPV4V6_STACK) {
- #####: 286: _ip_stack_type = requested_stack;
- #####: 287: _cid = cid;
- #####: 288: break;
- -: 289: }
- #####: 290: } else if (requested_stack == IPV6_STACK) {
- #####: 291: if (pdp_stack == IPV6_STACK || pdp_stack == IPV4V6_STACK) {
- #####: 292: _ip_stack_type = requested_stack;
- #####: 293: _cid = cid;
- #####: 294: break;
- -: 295: }
- -: 296: } else { // accept any but prefer to IPv6
- #####: 297: if (pdp_stack == IPV6_STACK || pdp_stack == IPV4V6_STACK) {
- #####: 298: _ip_stack_type = requested_stack;
- #####: 299: _cid = cid;
- #####: 300: break;
- -: 301: }
- #####: 302: if (_ip_stack_type == DEFAULT_STACK) {
- #####: 303: _ip_stack_type = pdp_stack;
- #####: 304: _cid = cid;
- -: 305: }
- -: 306: }
- -: 307: }
- -: 308: }
- -: 309: }
- -: 310: }
- -: 311: }
- 2: 312: _at.resp_stop();
- 2: 313: if (_cid == -1) { // no suitable context was found so create a new one
- 2: 314: if (!set_new_context(_ip_stack_type, cid_max+1)) {
- 1: 315: return false;
- -: 316: }
- -: 317: }
- -: 318:
- -: 319: // save the apn
- 1: 320: if (apn_len > 0 && !strlen(_apn)) {
- #####: 321: strncpy(_apn, apn, MAX_APN_LENGTH);
- -: 322: }
- -: 323:
- -: 324: log_debug("Context id %d", _cid);
- 1: 325: return true;
- -: 326:}
- -: 327:
- #####: 328:nsapi_ip_stack_t AT_CellularNetwork::string_to_stack_type(const char* pdp_type)
- -: 329:{
- #####: 330: nsapi_ip_stack_t stack = DEFAULT_STACK;
- #####: 331: int len = strlen(pdp_type);
- -: 332:
- #####: 333: if (len == 6 && memcmp(pdp_type, "IPV4V6", len) == 0) {
- #####: 334: stack = IPV4V6_STACK;
- #####: 335: } else if (len == 4 && memcmp(pdp_type, "IPV6", len) == 0) {
- #####: 336: stack = IPV6_STACK;
- #####: 337: } else if (len == 2 && memcmp(pdp_type, "IP", len) == 0) {
- #####: 338: stack = IPV4_STACK;
- -: 339: }
- #####: 340: return stack;
- -: 341:}
- -: 342:
- 1: 343:nsapi_error_t AT_CellularNetwork::set_registration_urc(bool urc_on)
- -: 344:{
- 1: 345: RegistrationType reg_types[] = {C_EREG, C_GREG, C_REG};
- 1: 346: const char *cmd_on[] = {"AT+CEREG=2", "AT+CGREG=2", "AT+CREG=2"};
- 1: 347: const char *cmd_off[] = {"AT+CEREG=0", "AT+CGREG=0", "AT+CREG=0"};
- 4: 348: for (uint8_t i=0; i= 0 && i < C_MAX);
- -: 398:
- 2: 399: RegistrationType reg_types[] = { C_EREG, C_GREG, C_REG};
- 2: 400: const char *cmd[] = { "AT+CEREG", "AT+CGREG", "AT+CREG"};
- 2: 401: const char *rsp[] = { "+CEREG: ", "+CGREG: ", "+CREG: "};
- -: 402:
- 2: 403: const int LAC_LENGTH = 5, CELL_ID_LENGTH = 9;
- 2: 404: char lac_string[LAC_LENGTH] = {0}, cell_id_string[CELL_ID_LENGTH] = {0};
- 2: 405: bool lac_read = false, cell_id_read = false;
- -: 406:
- 2: 407: _cell_id = -1;
- 2: 408: _lac = -1;
- -: 409:
- 2: 410: _at.lock();
- -: 411:
- 2: 412: if (!has_registration(reg_types[i])) {
- #####: 413: _at.unlock();
- #####: 414: return NSAPI_ERROR_UNSUPPORTED;
- -: 415: }
- -: 416:
- 2: 417: _at.cmd_start(cmd[i]);
- 2: 418: _at.write_string("=2", false);
- 2: 419: _at.cmd_stop();
- 2: 420: _at.resp_start();
- 2: 421: _at.resp_stop();
- -: 422:
- 2: 423: _at.cmd_start(cmd[i]);
- 2: 424: _at.write_string("?", false);
- -: 425:
- 2: 426: _at.cmd_stop();
- 2: 427: _at.resp_start(rsp[i]);
- 2: 428: _at.read_int(); // ignore urc mode subparam
- 2: 429: status = (RegistrationStatus)_at.read_int();
- -: 430:
- 2: 431: int len = _at.read_string(lac_string, LAC_LENGTH);
- 2: 432: if (memcmp(lac_string, "ffff", LAC_LENGTH-1) && len >= 0) {
- 2: 433: lac_read = true;
- -: 434: }
- -: 435:
- 2: 436: len = _at.read_string(cell_id_string, CELL_ID_LENGTH);
- 2: 437: if (memcmp(cell_id_string, "ffffffff", CELL_ID_LENGTH-1) && len >= 0) {
- 2: 438: cell_id_read = true;
- -: 439: }
- -: 440:
- 2: 441: _AcT = (operator_t::RadioAccessTechnology)_at.read_int();
- -: 442:
- 2: 443: _at.resp_stop();
- -: 444:
- 2: 445: _at.cmd_start(cmd[i]);
- 2: 446: _at.write_string("=0", false);
- 2: 447: _at.cmd_stop();
- 2: 448: _at.resp_start();
- 2: 449: _at.resp_stop();
- 2: 450: nsapi_error_t ret = _at.get_last_error();
- 2: 451: _at.unlock();
- -: 452:
- 2: 453: if (lac_read) {
- 2: 454: _lac = hex_str_to_int(lac_string, LAC_LENGTH);
- -: 455: log_debug("lac %s %d", lac_string, _lac );
- -: 456: }
- -: 457:
- 2: 458: if (cell_id_read) {
- 2: 459: _cell_id = hex_str_to_int(cell_id_string, CELL_ID_LENGTH);
- -: 460: log_debug("cell_id %s %d", cell_id_string, _cell_id );
- -: 461: }
- -: 462:
- 2: 463: return ret;
- -: 464:}
- -: 465:
- 1: 466:nsapi_error_t AT_CellularNetwork::get_cell_id(int &cell_id)
- -: 467:{
- -: 468: RegistrationStatus tmp;
- -: 469:
- 1: 470: nsapi_error_t error = get_registration_status(_last_reg_type, tmp);
- -: 471:
- 1: 472: cell_id = _cell_id;
- -: 473:
- 1: 474: return error;
- -: 475:}
- -: 476:
- 5: 477:bool AT_CellularNetwork::has_registration(RegistrationType reg_type)
- -: 478:{
- -: 479: (void)reg_type;
- 5: 480: return true;
- -: 481:}
- -: 482:
- 1: 483:nsapi_error_t AT_CellularNetwork::set_attach(int timeout)
- -: 484:{
- 1: 485: _at.lock();
- -: 486:
- 1: 487: _at.cmd_start("AT+CGATT?");
- 1: 488: _at.cmd_stop();
- 1: 489: _at.resp_start("+CGATT:");
- 1: 490: int attached_state = _at.read_int();
- 1: 491: _at.resp_stop();
- 1: 492: if (attached_state != 1) {
- -: 493: log_debug("Network attach");
- 1: 494: _at.cmd_start("AT+CGATT=1");
- 1: 495: _at.cmd_stop();
- 1: 496: _at.resp_start();
- 1: 497: _at.resp_stop();
- -: 498: }
- -: 499:
- 1: 500: return _at.unlock_return_error();
- -: 501:}
- -: 502:
- 1: 503:nsapi_error_t AT_CellularNetwork::get_attach(AttachStatus &status)
- -: 504:{
- 1: 505: _at.lock();
- -: 506:
- 1: 507: _at.cmd_start("AT+CGATT?");
- 1: 508: _at.cmd_stop();
- -: 509:
- 1: 510: _at.resp_start("+CGATT:");
- 1: 511: if (_at.info_resp()) {
- #####: 512: int attach_status = _at.read_int();
- #####: 513: status = (attach_status == 1) ? Attached : Detached;
- -: 514: }
- 1: 515: _at.resp_stop();
- -: 516:
- 1: 517: return _at.unlock_return_error();
- -: 518:}
- -: 519:
- -: 520:
- 1: 521:nsapi_error_t AT_CellularNetwork::get_backoff_time(int &backoffTime)
- -: 522:{
- 1: 523: _at.lock();
- -: 524:
- -: 525: // If apn is set
- 1: 526: if (strlen(_apn)) {
- #####: 527: _at.cmd_start("AT+CABTRDP=");
- #####: 528: _at.write_string(_apn);
- #####: 529: _at.cmd_stop();
- #####: 530: _at.resp_start("+CABTRDP:");
- #####: 531: if (_at.info_resp()) {
- #####: 532: _at.skip_param();
- #####: 533: backoffTime = _at.read_int();
- -: 534: }
- #####: 535: _at.resp_stop();
- -: 536: }
- -: 537:
- 1: 538: return _at.unlock_return_error();
- -: 539:}
- -: 540:
- 3: 541:NetworkStack *AT_CellularNetwork::get_stack()
- -: 542:{
- -: 543: // use lwIP/PPP if modem does not have IP stack
- -: 544:#if NSAPI_PPP_AVAILABLE
- -: 545: _stack = nsapi_ppp_get_stack();
- -: 546:#else
- 3: 547: _stack = NULL;
- -: 548:#endif
- 3: 549: return _stack;
- -: 550:}
- -: 551:
- 1: 552:const char *AT_CellularNetwork::get_ip_address()
- -: 553:{
- -: 554:#if NSAPI_PPP_AVAILABLE
- -: 555: return nsapi_ppp_get_ip_addr(_at.get_file_handle());
- -: 556:#else
- 1: 557: if (!_stack) {
- 1: 558: _stack = get_stack();
- -: 559: }
- 1: 560: if (_stack) {
- #####: 561: return _stack->get_ip_address();
- -: 562: }
- 1: 563: return NULL;
- -: 564:#endif
- -: 565:}
- -: 566:
- 3: 567:nsapi_error_t AT_CellularNetwork::set_stack_type(nsapi_ip_stack_t stack_type)
- -: 568:{
- -: 569:
- 3: 570: if (get_modem_stack_type(stack_type)) {
- 1: 571: _ip_stack_type_requested = stack_type;
- 1: 572: return NSAPI_ERROR_OK;
- -: 573: } else {
- 2: 574: return NSAPI_ERROR_PARAMETER;
- -: 575: }
- -: 576:
- -: 577:}
- -: 578:
- 1: 579:nsapi_ip_stack_t AT_CellularNetwork::get_stack_type()
- -: 580:{
- 1: 581: return _ip_stack_type;
- -: 582:}
- -: 583:
- 3: 584:bool AT_CellularNetwork::get_modem_stack_type(nsapi_ip_stack_t requested_stack)
- -: 585:{
- 3: 586: if (requested_stack == _ip_stack_type) {
- 1: 587: return true;
- -: 588: } else {
- 2: 589: return false;
- -: 590: }
- -: 591:}
- -: 592:
- 1: 593:nsapi_error_t AT_CellularNetwork::set_access_technology_impl(operator_t::RadioAccessTechnology opsAct)
- -: 594:{
- 1: 595: return NSAPI_ERROR_UNSUPPORTED;
- -: 596:}
- -: 597:
- 2: 598:nsapi_error_t AT_CellularNetwork::set_access_technology(operator_t::RadioAccessTechnology opAct)
- -: 599:{
- 2: 600: if (opAct == operator_t::RAT_UNKNOWN) {
- 1: 601: return NSAPI_ERROR_UNSUPPORTED;
- -: 602: }
- -: 603:
- 1: 604: _op_act = opAct;
- -: 605:
- 1: 606: return set_access_technology_impl(opAct);
- -: 607:}
- -: 608:
- 1: 609:nsapi_error_t AT_CellularNetwork::scan_plmn(operList_t &operators, int &opsCount)
- -: 610:{
- 1: 611: int idx = 0;
- -: 612:
- 1: 613: _at.lock();
- -: 614:
- 1: 615: _at.cmd_start("AT+COPS=?");
- 1: 616: _at.cmd_stop();
- -: 617:
- 1: 618: _at.resp_start("+COPS:");
- -: 619:
- 1: 620: int ret, error_code = -1;
- 1: 621: operator_t *op = NULL;
- -: 622:
- 1: 623: while (_at.info_elem('(')) {
- -: 624:
- #####: 625: op = operators.add_new();
- -: 626:
- #####: 627: op->op_status = (operator_t::Status)_at.read_int();
- #####: 628: _at.read_string(op->op_long, sizeof(op->op_long));
- #####: 629: _at.read_string(op->op_short, sizeof(op->op_short));
- #####: 630: _at.read_string(op->op_num, sizeof(op->op_num));
- -: 631:
- -: 632: // Optional - try read an int
- #####: 633: ret = _at.read_int();
- #####: 634: op->op_rat = (ret == error_code) ? operator_t::RAT_UNKNOWN:(operator_t::RadioAccessTechnology)ret;
- -: 635:
- #####: 636: if ((_op_act == operator_t::RAT_UNKNOWN) ||
- #####: 637: ((op->op_rat != operator_t::RAT_UNKNOWN) && (op->op_rat == _op_act))) {
- #####: 638: idx++;
- -: 639: } else {
- #####: 640: operators.delete_last();
- -: 641: }
- -: 642: }
- -: 643:
- 1: 644: _at.resp_stop();
- -: 645:
- 1: 646: opsCount = idx;
- -: 647:
- 1: 648: return _at.unlock_return_error();
- -: 649:}
- -: 650:
- 1: 651:nsapi_error_t AT_CellularNetwork::set_ciot_optimization_config(Supported_UE_Opt supported_opt,
- -: 652: Preferred_UE_Opt preferred_opt)
- -: 653:{
- 1: 654: _at.lock();
- -: 655:
- 1: 656: _at.cmd_start("AT+CCIOTOPT=");
- 1: 657: _at.write_int(_cid);
- 1: 658: _at.write_int(supported_opt);
- 1: 659: _at.write_int(preferred_opt);
- 1: 660: _at.cmd_stop();
- -: 661:
- 1: 662: _at.resp_start();
- 1: 663: _at.resp_stop();
- -: 664:
- 1: 665: return _at.unlock_return_error();
- -: 666:}
- -: 667:
- 1: 668:nsapi_error_t AT_CellularNetwork::get_ciot_optimization_config(Supported_UE_Opt& supported_opt,
- -: 669: Preferred_UE_Opt& preferred_opt)
- -: 670:{
- 1: 671: _at.lock();
- -: 672:
- 1: 673: _at.cmd_start("AT+CCIOTOPT?");
- 1: 674: _at.cmd_stop();
- -: 675:
- 1: 676: _at.resp_start("+CCIOTOPT:");
- 1: 677: _at.read_int();
- 1: 678: if (_at.get_last_error() == NSAPI_ERROR_OK) {
- #####: 679: supported_opt = (Supported_UE_Opt)_at.read_int();
- #####: 680: preferred_opt = (Preferred_UE_Opt)_at.read_int();
- -: 681: }
- -: 682:
- 1: 683: _at.resp_stop();
- -: 684:
- 1: 685: return _at.unlock_return_error();
- -: 686:}
- -: 687:
- 1: 688:nsapi_error_t AT_CellularNetwork::get_rate_control(
- -: 689: CellularNetwork::RateControlExceptionReports &reports,
- -: 690: CellularNetwork::RateControlUplinkTimeUnit &timeUnit, int &uplinkRate)
- -: 691:{
- -: 692:
- 1: 693: _at.lock();
- -: 694:
- 1: 695: _at.cmd_start("AT+CGAPNRC=");
- 1: 696: _at.write_int(_cid);
- 1: 697: _at.cmd_stop();
- -: 698:
- 1: 699: _at.resp_start("+CGAPNRC:");
- 1: 700: _at.read_int();
- 1: 701: if (_at.get_last_error() == NSAPI_ERROR_OK) {
- 1: 702: bool comma_found = true;
- 1: 703: int next_element = _at.read_int();
- 1: 704: if (next_element >= 0) {
- #####: 705: reports = (RateControlExceptionReports)next_element;
- -: 706: log_debug("reports %d",reports);
- #####: 707: next_element = _at.read_int();
- -: 708: } else {
- 1: 709: comma_found = false;
- -: 710: }
- -: 711:
- 1: 712: if (comma_found && next_element >= 0) {
- #####: 713: timeUnit = (RateControlUplinkTimeUnit)next_element;
- -: 714: log_debug("time %d",timeUnit);
- #####: 715: next_element = _at.read_int();
- -: 716: } else {
- 1: 717: comma_found = false;
- -: 718: }
- -: 719:
- 1: 720: if (comma_found && next_element >= 0) {
- #####: 721: uplinkRate = next_element;
- -: 722: log_debug("rate %d",uplinkRate);
- -: 723: }
- -: 724: }
- 1: 725: _at.resp_stop();
- 1: 726: nsapi_error_t ret = _at.get_last_error();
- 1: 727: _at.unlock();
- -: 728:
- 1: 729: return (ret == NSAPI_ERROR_OK) ? NSAPI_ERROR_OK : NSAPI_ERROR_PARAMETER;
- -: 730:}
- -: 731:
- 1: 732:nsapi_error_t AT_CellularNetwork::get_pdpcontext_params(pdpContextList_t& params_list)
- -: 733:{
- 1: 734: const int ipv6_subnet_size = 128;
- 1: 735: const int max_ipv6_size = 64;
- 1: 736: char* ipv6_and_subnetmask = (char*)malloc(ipv6_subnet_size);
- 1: 737: if (!ipv6_and_subnetmask) {
- #####: 738: return NSAPI_ERROR_NO_MEMORY;
- -: 739: }
- -: 740:
- 1: 741: char* temp = (char*)malloc(max_ipv6_size);
- 1: 742: if (!temp) {
- #####: 743: free(ipv6_and_subnetmask);
- #####: 744: return NSAPI_ERROR_NO_MEMORY;
- -: 745: }
- -: 746:
- 1: 747: _at.lock();
- -: 748:
- 1: 749: _at.cmd_start("AT+CGCONTRDP=");
- 1: 750: _at.write_int(_cid);
- 1: 751: _at.cmd_stop();
- -: 752:
- 1: 753: _at.resp_start("+CGCONTRDP:");
- 1: 754: pdpcontext_params_t *params = NULL;
- 1: 755: while (_at.info_resp()) { // response can be zero or many +CGDCONT lines
- #####: 756: params = params_list.add_new();
- #####: 757: if (!params) {
- -: 758: log_warn("Could not allocate new pdpcontext_params_t");
- #####: 759: params_list.delete_all();
- #####: 760: _at.resp_stop();
- #####: 761: free(temp);
- #####: 762: free(ipv6_and_subnetmask);
- #####: 763: return NSAPI_ERROR_NO_MEMORY;
- -: 764: }
- -: 765:
- #####: 766: params->cid = _at.read_int();
- #####: 767: params->bearer_id = _at.read_int();
- #####: 768: _at.read_string(params->apn, sizeof(params->apn));
- -: 769:
- -: 770: // rest are optional params
- #####: 771: ipv6_and_subnetmask[0] = '\0';
- #####: 772: temp[0] = '\0';
- #####: 773: _at.read_string(ipv6_and_subnetmask, ipv6_subnet_size);
- #####: 774: separate_ip_addresses(ipv6_and_subnetmask, params->local_addr, sizeof(params->local_addr), params->local_subnet_mask, sizeof(params->local_subnet_mask));
- #####: 775: ipv6_and_subnetmask[0] = '\0';
- -: 776:
- #####: 777: _at.read_string(ipv6_and_subnetmask, ipv6_subnet_size);
- #####: 778: separate_ip_addresses(ipv6_and_subnetmask, params->gateway_addr, sizeof(params->gateway_addr), temp, max_ipv6_size);
- #####: 779: prefer_ipv6(params->gateway_addr, sizeof(params->gateway_addr), temp, max_ipv6_size);
- #####: 780: ipv6_and_subnetmask[0] = '\0';
- #####: 781: temp[0] = '\0';
- -: 782:
- #####: 783: _at.read_string(ipv6_and_subnetmask, ipv6_subnet_size);
- #####: 784: separate_ip_addresses(ipv6_and_subnetmask, params->dns_primary_addr, sizeof(params->dns_primary_addr), temp, max_ipv6_size);
- #####: 785: prefer_ipv6(params->dns_primary_addr, sizeof(params->dns_primary_addr), temp, max_ipv6_size);
- #####: 786: ipv6_and_subnetmask[0] = '\0';
- #####: 787: temp[0] = '\0';
- -: 788:
- #####: 789: _at.read_string(ipv6_and_subnetmask, ipv6_subnet_size);
- #####: 790: separate_ip_addresses(ipv6_and_subnetmask, params->dns_secondary_addr, sizeof(params->dns_secondary_addr), temp, max_ipv6_size);
- #####: 791: prefer_ipv6(params->dns_secondary_addr, sizeof(params->dns_secondary_addr), temp, max_ipv6_size);
- #####: 792: ipv6_and_subnetmask[0] = '\0';
- #####: 793: temp[0] = '\0';
- -: 794:
- #####: 795: _at.read_string(ipv6_and_subnetmask, ipv6_subnet_size);
- #####: 796: separate_ip_addresses(ipv6_and_subnetmask, params->p_cscf_prim_addr, sizeof(params->p_cscf_prim_addr), temp, max_ipv6_size);
- #####: 797: prefer_ipv6(params->p_cscf_prim_addr, sizeof(params->p_cscf_prim_addr), temp, max_ipv6_size);
- #####: 798: ipv6_and_subnetmask[0] = '\0';
- #####: 799: temp[0] = '\0';
- -: 800:
- #####: 801: _at.read_string(ipv6_and_subnetmask, ipv6_subnet_size);
- #####: 802: separate_ip_addresses(ipv6_and_subnetmask, params->p_cscf_sec_addr, sizeof(params->p_cscf_sec_addr), temp, max_ipv6_size);
- #####: 803: prefer_ipv6(params->p_cscf_sec_addr, sizeof(params->p_cscf_sec_addr), temp, max_ipv6_size);
- -: 804:
- #####: 805: params->im_signalling_flag = _at.read_int();
- #####: 806: params->lipa_indication = _at.read_int();
- #####: 807: params->ipv4_mtu = _at.read_int();
- #####: 808: params->wlan_offload = _at.read_int();
- #####: 809: params->local_addr_ind = _at.read_int();
- #####: 810: params->non_ip_mtu = _at.read_int();
- #####: 811: params->serving_plmn_rate_control_value = _at.read_int();
- -: 812: }
- 1: 813: _at.resp_stop();
- -: 814:
- 1: 815: free(temp);
- 1: 816: free(ipv6_and_subnetmask);
- -: 817:
- 1: 818: return _at.unlock_return_error();
- -: 819:}
- -: 820:
- 2: 821:nsapi_error_t AT_CellularNetwork::get_extended_signal_quality(int &rxlev, int &ber, int &rscp, int &ecno, int &rsrq, int &rsrp)
- -: 822:{
- 2: 823: _at.lock();
- -: 824:
- 2: 825: _at.cmd_start("AT+CESQ");
- 2: 826: _at.cmd_stop();
- -: 827:
- 2: 828: _at.resp_start("+CESQ:");
- 2: 829: rxlev = _at.read_int();
- 2: 830: ber = _at.read_int();
- 2: 831: rscp = _at.read_int();
- 2: 832: ecno = _at.read_int();
- 2: 833: rsrq = _at.read_int();
- 2: 834: rsrp = _at.read_int();
- 2: 835: _at.resp_stop();
- 2: 836: if (rxlev < 0 || ber < 0 || rscp < 0 || ecno < 0 || rsrq < 0 || rsrp < 0) {
- 1: 837: _at.unlock();
- 1: 838: return NSAPI_ERROR_DEVICE_ERROR;
- -: 839: }
- -: 840:
- 1: 841: return _at.unlock_return_error();
- -: 842:}
- -: 843:
- 2: 844:nsapi_error_t AT_CellularNetwork::get_signal_quality(int &rssi, int &ber)
- -: 845:{
- 2: 846: _at.lock();
- -: 847:
- 2: 848: _at.cmd_start("AT+CSQ");
- 2: 849: _at.cmd_stop();
- -: 850:
- 2: 851: _at.resp_start("+CSQ:");
- 2: 852: rssi = _at.read_int();
- 2: 853: ber = _at.read_int();
- 2: 854: _at.resp_stop();
- 2: 855: if (rssi < 0 || ber < 0) {
- 1: 856: _at.unlock();
- 1: 857: return NSAPI_ERROR_DEVICE_ERROR;
- -: 858: }
- -: 859:
- 1: 860: return _at.unlock_return_error();
- -: 861:}
- -: 862:
- -: 863:/** Get the last 3GPP error code
- -: 864: * @return see 3GPP TS 27.007 error codes
- -: 865: */
- 1: 866:uint8_t AT_CellularNetwork::get_3gpp_error()
- -: 867:{
- 1: 868: return _at.get_3gpp_error();
- -: 869:}
- -: 870:
- -: 871:
- 1: 872:nsapi_error_t AT_CellularNetwork::get_operator_params(int &format, operator_t &operator_params)
- -: 873:{
- 1: 874: _at.lock();
- -: 875:
- 1: 876: _at.cmd_start("AT+COPS?");
- 1: 877: _at.cmd_stop();
- -: 878:
- 1: 879: _at.resp_start("+COPS: ");
- 1: 880: _at.read_int(); //ignore mode
- 1: 881: format = _at.read_int();
- -: 882:
- 1: 883: if (_at.get_last_error() == NSAPI_ERROR_OK) {
- -: 884:
- #####: 885: switch (format) {
- -: 886: case 0:
- #####: 887: _at.read_string(operator_params.op_long, 16+9);
- #####: 888: break;
- -: 889:
- -: 890: case 1:
- #####: 891: _at.read_string(operator_params.op_short, 8+4);
- #####: 892: break;
- -: 893:
- -: 894: default:
- #####: 895: _at.read_string(operator_params.op_num, 8+4);
- #####: 896: break;
- -: 897: }
- -: 898:
- #####: 899: operator_params.op_rat = (operator_t::RadioAccessTechnology)_at.read_int();
- -: 900: }
- -: 901:
- 1: 902: _at.resp_stop();
- -: 903:
- 1: 904: return _at.unlock_return_error();
- -: 905:}
diff --git a/features/cellular/UNITTESTS/at/at_cellularnetwork/gcov/Callback.h.gcov b/features/cellular/UNITTESTS/at/at_cellularnetwork/gcov/Callback.h.gcov
deleted file mode 100644
index 7f3175c216..0000000000
--- a/features/cellular/UNITTESTS/at/at_cellularnetwork/gcov/Callback.h.gcov
+++ /dev/null
@@ -1,4557 +0,0 @@
- -: 0:Source:../../../../../platform/Callback.h
- -: 0:Graph:objs/AT_CellularNetwork_unit/AT_CellularNetwork.gcno
- -: 0:Data:objs/AT_CellularNetwork_unit/AT_CellularNetwork.gcda
- -: 0:Runs:1
- -: 0:Programs:1
- -: 1:/* mbed Microcontroller Library
- -: 2: * Copyright (c) 2006-2015 ARM Limited
- -: 3: *
- -: 4: * Licensed under the Apache License, Version 2.0 (the "License");
- -: 5: * you may not use this file except in compliance with the License.
- -: 6: * You may obtain a copy of the License at
- -: 7: *
- -: 8: * http://www.apache.org/licenses/LICENSE-2.0
- -: 9: *
- -: 10: * Unless required by applicable law or agreed to in writing, software
- -: 11: * distributed under the License is distributed on an "AS IS" BASIS,
- -: 12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- -: 13: * See the License for the specific language governing permissions and
- -: 14: * limitations under the License.
- -: 15: */
- -: 16:#ifndef MBED_CALLBACK_H
- -: 17:#define MBED_CALLBACK_H
- -: 18:
- -: 19:#include
- -: 20:#include
- -: 21:#include
- -: 22:#include "platform/mbed_assert.h"
- -: 23:#include "platform/mbed_toolchain.h"
- -: 24:
- -: 25:namespace mbed {
- -: 26:/** \addtogroup platform */
- -: 27:/** @{*/
- -: 28:/**
- -: 29: * \defgroup platform_Callback Callback class
- -: 30: * @{
- -: 31: */
- -: 32:
- -: 33:/** Callback class based on template specialization
- -: 34: *
- -: 35: * @note Synchronization level: Not protected
- -: 36: */
- -: 37:template
- -: 38:class Callback;
- -: 39:
- -: 40:// Internal sfinae declarations
- -: 41://
- -: 42:// These are used to eliminate overloads based on type attributes
- -: 43:// 1. Does a function object have a call operator
- -: 44:// 2. Does a function object fit in the available storage
- -: 45://
- -: 46:// These eliminations are handled cleanly by the compiler and avoid
- -: 47:// massive and misleading error messages when confronted with an
- -: 48:// invalid type (or worse, runtime failures)
- -: 49:namespace detail {
- -: 50: struct nil {};
- -: 51:
- -: 52: template
- -: 53: struct enable_if { typedef R type; };
- -: 54:
- -: 55: template
- -: 56: struct enable_if {};
- -: 57:
- -: 58: template
- -: 59: struct is_type {
- -: 60: static const bool value = true;
- -: 61: };
- -: 62:}
- -: 63:
- -: 64:#define MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, M) \
- -: 65: typename detail::enable_if< \
- -: 66: detail::is_type::value && \
- -: 67: sizeof(F) <= sizeof(uintptr_t) \
- -: 68: >::type = detail::nil()
- -: 69:
- -: 70:/** Callback class based on template specialization
- -: 71: *
- -: 72: * @note Synchronization level: Not protected
- -: 73: */
- -: 74:template
- -: 75:class Callback {
- -: 76:public:
- -: 77: /** Create a Callback with a static function
- -: 78: * @param func Static function to attach
- -: 79: */
- -: 80: Callback(R (*func)() = 0) {
- -: 81: if (!func) {
- -: 82: memset(this, 0, sizeof(Callback));
- -: 83: } else {
- -: 84: generate(func);
- -: 85: }
- -: 86: }
- -: 87:
- -: 88: /** Attach a Callback
- -: 89: * @param func The Callback to attach
- -: 90: */
- -: 91: Callback(const Callback &func) {
- -: 92: if (func._ops) {
- -: 93: func._ops->move(this, &func);
- -: 94: }
- -: 95: _ops = func._ops;
- -: 96: }
- -: 97:
- -: 98: /** Create a Callback with a member function
- -: 99: * @param obj Pointer to object to invoke member function on
- -: 100: * @param method Member function to attach
- -: 101: */
- -: 102: template
- 25: 103: Callback(U *obj, R (T::*method)()) {
- 25: 104: generate(method_context(obj, method));
- 25: 105: }
- -: 106:
- -: 107: /** Create a Callback with a member function
- -: 108: * @param obj Pointer to object to invoke member function on
- -: 109: * @param method Member function to attach
- -: 110: */
- -: 111: template
- -: 112: Callback(const U *obj, R (T::*method)() const) {
- -: 113: generate(method_context(obj, method));
- -: 114: }
- -: 115:
- -: 116: /** Create a Callback with a member function
- -: 117: * @param obj Pointer to object to invoke member function on
- -: 118: * @param method Member function to attach
- -: 119: */
- -: 120: template
- -: 121: Callback(volatile U *obj, R (T::*method)() volatile) {
- -: 122: generate(method_context(obj, method));
- -: 123: }
- -: 124:
- -: 125: /** Create a Callback with a member function
- -: 126: * @param obj Pointer to object to invoke member function on
- -: 127: * @param method Member function to attach
- -: 128: */
- -: 129: template
- -: 130: Callback(const volatile U *obj, R (T::*method)() const volatile) {
- -: 131: generate(method_context(obj, method));
- -: 132: }
- -: 133:
- -: 134: /** Create a Callback with a static function and bound pointer
- -: 135: * @param func Static function to attach
- -: 136: * @param arg Pointer argument to function
- -: 137: */
- -: 138: template
- -: 139: Callback(R (*func)(T*), U *arg) {
- -: 140: generate(function_context(func, arg));
- -: 141: }
- -: 142:
- -: 143: /** Create a Callback with a static function and bound pointer
- -: 144: * @param func Static function to attach
- -: 145: * @param arg Pointer argument to function
- -: 146: */
- -: 147: template
- -: 148: Callback(R (*func)(const T*), const U *arg) {
- -: 149: generate(function_context(func, arg));
- -: 150: }
- -: 151:
- -: 152: /** Create a Callback with a static function and bound pointer
- -: 153: * @param func Static function to attach
- -: 154: * @param arg Pointer argument to function
- -: 155: */
- -: 156: template
- -: 157: Callback(R (*func)(volatile T*), volatile U *arg) {
- -: 158: generate(function_context(func, arg));
- -: 159: }
- -: 160:
- -: 161: /** Create a Callback with a static function and bound pointer
- -: 162: * @param func Static function to attach
- -: 163: * @param arg Pointer argument to function
- -: 164: */
- -: 165: template
- -: 166: Callback(R (*func)(const volatile T*), const volatile U *arg) {
- -: 167: generate(function_context(func, arg));
- -: 168: }
- -: 169:
- -: 170: /** Create a Callback with a function object
- -: 171: * @param f Function object to attach
- -: 172: * @note The function object is limited to a single word of storage
- -: 173: */
- -: 174: template
- -: 175: Callback(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)())) {
- -: 176: generate(f);
- -: 177: }
- -: 178:
- -: 179: /** Create a Callback with a function object
- -: 180: * @param f Function object to attach
- -: 181: * @note The function object is limited to a single word of storage
- -: 182: */
- -: 183: template
- -: 184: Callback(const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)() const)) {
- -: 185: generate(f);
- -: 186: }
- -: 187:
- -: 188: /** Create a Callback with a function object
- -: 189: * @param f Function object to attach
- -: 190: * @note The function object is limited to a single word of storage
- -: 191: */
- -: 192: template
- -: 193: Callback(volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)() volatile)) {
- -: 194: generate(f);
- -: 195: }
- -: 196:
- -: 197: /** Create a Callback with a function object
- -: 198: * @param f Function object to attach
- -: 199: * @note The function object is limited to a single word of storage
- -: 200: */
- -: 201: template
- -: 202: Callback(const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)() const volatile)) {
- -: 203: generate(f);
- -: 204: }
- -: 205:
- -: 206: /** Create a Callback with a static function and bound pointer
- -: 207: * @param obj Pointer to object to bind to function
- -: 208: * @param func Static function to attach
- -: 209: * @deprecated
- -: 210: * Arguments to callback have been reordered to Callback(func, arg)
- -: 211: */
- -: 212: template
- -: 213: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 214: "Arguments to callback have been reordered to Callback(func, arg)")
- -: 215: Callback(U *obj, R (*func)(T*)) {
- -: 216: new (this) Callback(func, obj);
- -: 217: }
- -: 218:
- -: 219: /** Create a Callback with a static function and bound pointer
- -: 220: * @param obj Pointer to object to bind to function
- -: 221: * @param func Static function to attach
- -: 222: * @deprecated
- -: 223: * Arguments to callback have been reordered to Callback(func, arg)
- -: 224: */
- -: 225: template
- -: 226: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 227: "Arguments to callback have been reordered to Callback(func, arg)")
- -: 228: Callback(const U *obj, R (*func)(const T*)) {
- -: 229: new (this) Callback(func, obj);
- -: 230: }
- -: 231:
- -: 232: /** Create a Callback with a static function and bound pointer
- -: 233: * @param obj Pointer to object to bind to function
- -: 234: * @param func Static function to attach
- -: 235: * @deprecated
- -: 236: * Arguments to callback have been reordered to Callback(func, arg)
- -: 237: */
- -: 238: template
- -: 239: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 240: "Arguments to callback have been reordered to Callback(func, arg)")
- -: 241: Callback(volatile U *obj, R (*func)(volatile T*)) {
- -: 242: new (this) Callback(func, obj);
- -: 243: }
- -: 244:
- -: 245: /** Create a Callback with a static function and bound pointer
- -: 246: * @param obj Pointer to object to bind to function
- -: 247: * @param func Static function to attach
- -: 248: * @deprecated
- -: 249: * Arguments to callback have been reordered to Callback(func, arg)
- -: 250: */
- -: 251: template
- -: 252: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 253: "Arguments to callback have been reordered to Callback(func, arg)")
- -: 254: Callback(const volatile U *obj, R (*func)(const volatile T*)) {
- -: 255: new (this) Callback(func, obj);
- -: 256: }
- -: 257:
- -: 258: /** Destroy a callback
- -: 259: */
- #####: 260: ~Callback() {
- #####: 261: if (_ops) {
- #####: 262: _ops->dtor(this);
- -: 263: }
- #####: 264: }
- -: 265:
- -: 266: /** Attach a static function
- -: 267: * @param func Static function to attach
- -: 268: * @deprecated
- -: 269: * Replaced by simple assignment 'Callback cb = func'
- -: 270: */
- -: 271: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 272: "Replaced by simple assignment 'Callback cb = func")
- -: 273: void attach(R (*func)()) {
- -: 274: this->~Callback();
- -: 275: new (this) Callback(func);
- -: 276: }
- -: 277:
- -: 278: /** Attach a Callback
- -: 279: * @param func The Callback to attach
- -: 280: * @deprecated
- -: 281: * Replaced by simple assignment 'Callback cb = func'
- -: 282: */
- -: 283: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 284: "Replaced by simple assignment 'Callback cb = func")
- -: 285: void attach(const Callback &func) {
- -: 286: this->~Callback();
- -: 287: new (this) Callback(func);
- -: 288: }
- -: 289:
- -: 290: /** Attach a member function
- -: 291: * @param obj Pointer to object to invoke member function on
- -: 292: * @param method Member function to attach
- -: 293: * @deprecated
- -: 294: * Replaced by simple assignment 'Callback cb = func'
- -: 295: */
- -: 296: template
- -: 297: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 298: "Replaced by simple assignment 'Callback cb = func")
- -: 299: void attach(U *obj, R (T::*method)()) {
- -: 300: this->~Callback();
- -: 301: new (this) Callback(obj, method);
- -: 302: }
- -: 303:
- -: 304: /** Attach a member function
- -: 305: * @param obj Pointer to object to invoke member function on
- -: 306: * @param method Member function to attach
- -: 307: * @deprecated
- -: 308: * Replaced by simple assignment 'Callback cb = func'
- -: 309: */
- -: 310: template
- -: 311: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 312: "Replaced by simple assignment 'Callback cb = func")
- -: 313: void attach(const U *obj, R (T::*method)() const) {
- -: 314: this->~Callback();
- -: 315: new (this) Callback(obj, method);
- -: 316: }
- -: 317:
- -: 318: /** Attach a member function
- -: 319: * @param obj Pointer to object to invoke member function on
- -: 320: * @param method Member function to attach
- -: 321: * @deprecated
- -: 322: * Replaced by simple assignment 'Callback cb = func'
- -: 323: */
- -: 324: template
- -: 325: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 326: "Replaced by simple assignment 'Callback cb = func")
- -: 327: void attach(volatile U *obj, R (T::*method)() volatile) {
- -: 328: this->~Callback();
- -: 329: new (this) Callback(obj, method);
- -: 330: }
- -: 331:
- -: 332: /** Attach a member function
- -: 333: * @param obj Pointer to object to invoke member function on
- -: 334: * @param method Member function to attach
- -: 335: * @deprecated
- -: 336: * Replaced by simple assignment 'Callback cb = func'
- -: 337: */
- -: 338: template
- -: 339: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 340: "Replaced by simple assignment 'Callback cb = func")
- -: 341: void attach(const volatile U *obj, R (T::*method)() const volatile) {
- -: 342: this->~Callback();
- -: 343: new (this) Callback(obj, method);
- -: 344: }
- -: 345:
- -: 346: /** Attach a static function with a bound pointer
- -: 347: * @param func Static function to attach
- -: 348: * @param arg Pointer argument to function
- -: 349: * @deprecated
- -: 350: * Replaced by simple assignment 'Callback cb = func'
- -: 351: */
- -: 352: template
- -: 353: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 354: "Replaced by simple assignment 'Callback cb = func")
- -: 355: void attach(R (*func)(T*), U *arg) {
- -: 356: this->~Callback();
- -: 357: new (this) Callback(func, arg);
- -: 358: }
- -: 359:
- -: 360: /** Attach a static function with a bound pointer
- -: 361: * @param func Static function to attach
- -: 362: * @param arg Pointer argument to function
- -: 363: * @deprecated
- -: 364: * Replaced by simple assignment 'Callback cb = func'
- -: 365: */
- -: 366: template
- -: 367: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 368: "Replaced by simple assignment 'Callback cb = func")
- -: 369: void attach(R (*func)(const T*), const U *arg) {
- -: 370: this->~Callback();
- -: 371: new (this) Callback(func, arg);
- -: 372: }
- -: 373:
- -: 374: /** Attach a static function with a bound pointer
- -: 375: * @param func Static function to attach
- -: 376: * @param arg Pointer argument to function
- -: 377: * @deprecated
- -: 378: * Replaced by simple assignment 'Callback cb = func'
- -: 379: */
- -: 380: template
- -: 381: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 382: "Replaced by simple assignment 'Callback cb = func")
- -: 383: void attach(R (*func)(volatile T*), volatile U *arg) {
- -: 384: this->~Callback();
- -: 385: new (this) Callback(func, arg);
- -: 386: }
- -: 387:
- -: 388: /** Attach a static function with a bound pointer
- -: 389: * @param func Static function to attach
- -: 390: * @param arg Pointer argument to function
- -: 391: * @deprecated
- -: 392: * Replaced by simple assignment 'Callback cb = func'
- -: 393: */
- -: 394: template
- -: 395: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 396: "Replaced by simple assignment 'Callback cb = func")
- -: 397: void attach(R (*func)(const volatile T*), const volatile U *arg) {
- -: 398: this->~Callback();
- -: 399: new (this) Callback(func, arg);
- -: 400: }
- -: 401:
- -: 402: /** Attach a function object
- -: 403: * @param f Function object to attach
- -: 404: * @note The function object is limited to a single word of storage
- -: 405: * @deprecated
- -: 406: * Replaced by simple assignment 'Callback cb = func'
- -: 407: */
- -: 408: template
- -: 409: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 410: "Replaced by simple assignment 'Callback cb = func")
- -: 411: void attach(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)())) {
- -: 412: this->~Callback();
- -: 413: new (this) Callback(f);
- -: 414: }
- -: 415:
- -: 416: /** Attach a function object
- -: 417: * @param f Function object to attach
- -: 418: * @note The function object is limited to a single word of storage
- -: 419: * @deprecated
- -: 420: * Replaced by simple assignment 'Callback cb = func'
- -: 421: */
- -: 422: template
- -: 423: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 424: "Replaced by simple assignment 'Callback cb = func")
- -: 425: void attach(const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)() const)) {
- -: 426: this->~Callback();
- -: 427: new (this) Callback(f);
- -: 428: }
- -: 429:
- -: 430: /** Attach a function object
- -: 431: * @param f Function object to attach
- -: 432: * @note The function object is limited to a single word of storage
- -: 433: * @deprecated
- -: 434: * Replaced by simple assignment 'Callback cb = func'
- -: 435: */
- -: 436: template
- -: 437: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 438: "Replaced by simple assignment 'Callback cb = func")
- -: 439: void attach(volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)() volatile)) {
- -: 440: this->~Callback();
- -: 441: new (this) Callback(f);
- -: 442: }
- -: 443:
- -: 444: /** Attach a function object
- -: 445: * @param f Function object to attach
- -: 446: * @note The function object is limited to a single word of storage
- -: 447: * @deprecated
- -: 448: * Replaced by simple assignment 'Callback cb = func'
- -: 449: */
- -: 450: template
- -: 451: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 452: "Replaced by simple assignment 'Callback cb = func")
- -: 453: void attach(const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)() const volatile)) {
- -: 454: this->~Callback();
- -: 455: new (this) Callback(f);
- -: 456: }
- -: 457:
- -: 458: /** Attach a static function with a bound pointer
- -: 459: * @param obj Pointer to object to bind to function
- -: 460: * @param func Static function to attach
- -: 461: * @deprecated
- -: 462: * Arguments to callback have been reordered to attach(func, arg)
- -: 463: */
- -: 464: template
- -: 465: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 466: "Arguments to callback have been reordered to attach(func, arg)")
- -: 467: void attach(U *obj, R (*func)(T*)) {
- -: 468: this->~Callback();
- -: 469: new (this) Callback(func, obj);
- -: 470: }
- -: 471:
- -: 472: /** Attach a static function with a bound pointer
- -: 473: * @param obj Pointer to object to bind to function
- -: 474: * @param func Static function to attach
- -: 475: * @deprecated
- -: 476: * Arguments to callback have been reordered to attach(func, arg)
- -: 477: */
- -: 478: template
- -: 479: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 480: "Arguments to callback have been reordered to attach(func, arg)")
- -: 481: void attach(const U *obj, R (*func)(const T*)) {
- -: 482: this->~Callback();
- -: 483: new (this) Callback(func, obj);
- -: 484: }
- -: 485:
- -: 486: /** Attach a static function with a bound pointer
- -: 487: * @param obj Pointer to object to bind to function
- -: 488: * @param func Static function to attach
- -: 489: * @deprecated
- -: 490: * Arguments to callback have been reordered to attach(func, arg)
- -: 491: */
- -: 492: template
- -: 493: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 494: "Arguments to callback have been reordered to attach(func, arg)")
- -: 495: void attach(volatile U *obj, R (*func)(volatile T*)) {
- -: 496: this->~Callback();
- -: 497: new (this) Callback(func, obj);
- -: 498: }
- -: 499:
- -: 500: /** Attach a static function with a bound pointer
- -: 501: * @param obj Pointer to object to bind to function
- -: 502: * @param func Static function to attach
- -: 503: * @deprecated
- -: 504: * Arguments to callback have been reordered to attach(func, arg)
- -: 505: */
- -: 506: template
- -: 507: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 508: "Arguments to callback have been reordered to attach(func, arg)")
- -: 509: void attach(const volatile U *obj, R (*func)(const volatile T*)) {
- -: 510: this->~Callback();
- -: 511: new (this) Callback(func, obj);
- -: 512: }
- -: 513:
- -: 514: /** Assign a callback
- -: 515: */
- -: 516: Callback &operator=(const Callback &that) {
- -: 517: if (this != &that) {
- -: 518: this->~Callback();
- -: 519: new (this) Callback(that);
- -: 520: }
- -: 521:
- -: 522: return *this;
- -: 523: }
- -: 524:
- -: 525: /** Call the attached function
- -: 526: */
- -: 527: R call() const {
- -: 528: MBED_ASSERT(_ops);
- -: 529: return _ops->call(this);
- -: 530: }
- -: 531:
- -: 532: /** Call the attached function
- -: 533: */
- -: 534: R operator()() const {
- -: 535: return call();
- -: 536: }
- -: 537:
- -: 538: /** Test if function has been attached
- -: 539: */
- -: 540: operator bool() const {
- -: 541: return _ops;
- -: 542: }
- -: 543:
- -: 544: /** Test for equality
- -: 545: */
- -: 546: friend bool operator==(const Callback &l, const Callback &r) {
- -: 547: return memcmp(&l, &r, sizeof(Callback)) == 0;
- -: 548: }
- -: 549:
- -: 550: /** Test for inequality
- -: 551: */
- -: 552: friend bool operator!=(const Callback &l, const Callback &r) {
- -: 553: return !(l == r);
- -: 554: }
- -: 555:
- -: 556: /** Static thunk for passing as C-style function
- -: 557: * @param func Callback to call passed as void pointer
- -: 558: * @return the value as determined by func which is of
- -: 559: * type and determined by the signiture of func
- -: 560: */
- -: 561: static R thunk(void *func) {
- -: 562: return static_cast(func)->call();
- -: 563: }
- -: 564:
- -: 565:private:
- -: 566: // Stored as pointer to function and pointer to optional object
- -: 567: // Function pointer is stored as union of possible function types
- -: 568: // to garuntee proper size and alignment
- -: 569: struct _class;
- -: 570: union {
- -: 571: void (*_staticfunc)();
- -: 572: void (*_boundfunc)(_class*);
- -: 573: void (_class::*_methodfunc)();
- -: 574: } _func;
- -: 575: void *_obj;
- -: 576:
- -: 577: // Dynamically dispatched operations
- -: 578: const struct ops {
- -: 579: R (*call)(const void*);
- -: 580: void (*move)(void*, const void*);
- -: 581: void (*dtor)(void*);
- -: 582: } *_ops;
- -: 583:
- -: 584: // Generate operations for function object
- -: 585: template
- 25: 586: void generate(const F &f) {
- -: 587: static const ops ops = {
- -: 588: &Callback::function_call,
- -: 589: &Callback::function_move,
- -: 590: &Callback::function_dtor,
- -: 591: };
- -: 592:
- -: 593: MBED_STATIC_ASSERT(sizeof(Callback) - sizeof(_ops) >= sizeof(F),
- -: 594: "Type F must not exceed the size of the Callback class");
- 25: 595: memset(this, 0, sizeof(Callback));
- 25: 596: new (this) F(f);
- 25: 597: _ops = &ops;
- 25: 598: }
- -: 599:
- -: 600: // Function attributes
- -: 601: template
- 1: 602: static R function_call(const void *p) {
- 1: 603: return (*(F*)p)();
- -: 604: }
- -: 605:
- -: 606: template
- 25: 607: static void function_move(void *d, const void *p) {
- 25: 608: new (d) F(*(F*)p);
- 25: 609: }
- -: 610:
- -: 611: template
- 50: 612: static void function_dtor(void *p) {
- -: 613: ((F*)p)->~F();
- 50: 614: }
- -: 615:
- -: 616: // Wrappers for functions with context
- -: 617: template
- -: 618: struct method_context {
- -: 619: M method;
- -: 620: O *obj;
- -: 621:
- 25: 622: method_context(O *obj, M method)
- 25: 623: : method(method), obj(obj) {}
- -: 624:
- 1: 625: R operator()() const {
- 1: 626: return (obj->*method)();
- -: 627: }
- -: 628: };
- -: 629:
- -: 630: template
- -: 631: struct function_context {
- -: 632: F func;
- -: 633: A *arg;
- -: 634:
- -: 635: function_context(F func, A *arg)
- -: 636: : func(func), arg(arg) {}
- -: 637:
- -: 638: R operator()() const {
- -: 639: return func(arg);
- -: 640: }
- -: 641: };
- -: 642:};
- -: 643:
- -: 644:/** Callback class based on template specialization
- -: 645: *
- -: 646: * @note Synchronization level: Not protected
- -: 647: */
- -: 648:template
- -: 649:class Callback {
- -: 650:public:
- -: 651: /** Create a Callback with a static function
- -: 652: * @param func Static function to attach
- -: 653: */
- #####: 654: Callback(R (*func)(A0) = 0) {
- #####: 655: if (!func) {
- #####: 656: memset(this, 0, sizeof(Callback));
- -: 657: } else {
- #####: 658: generate(func);
- -: 659: }
- #####: 660: }
- -: 661:
- -: 662: /** Attach a Callback
- -: 663: * @param func The Callback to attach
- -: 664: */
- 1: 665: Callback(const Callback &func) {
- 1: 666: if (func._ops) {
- 1: 667: func._ops->move(this, &func);
- -: 668: }
- 1: 669: _ops = func._ops;
- 1: 670: }
- -: 671:
- -: 672: /** Create a Callback with a member function
- -: 673: * @param obj Pointer to object to invoke member function on
- -: 674: * @param method Member function to attach
- -: 675: */
- -: 676: template
- -: 677: Callback(U *obj, R (T::*method)(A0)) {
- -: 678: generate(method_context(obj, method));
- -: 679: }
- -: 680:
- -: 681: /** Create a Callback with a member function
- -: 682: * @param obj Pointer to object to invoke member function on
- -: 683: * @param method Member function to attach
- -: 684: */
- -: 685: template
- -: 686: Callback(const U *obj, R (T::*method)(A0) const) {
- -: 687: generate(method_context(obj, method));
- -: 688: }
- -: 689:
- -: 690: /** Create a Callback with a member function
- -: 691: * @param obj Pointer to object to invoke member function on
- -: 692: * @param method Member function to attach
- -: 693: */
- -: 694: template
- -: 695: Callback(volatile U *obj, R (T::*method)(A0) volatile) {
- -: 696: generate(method_context(obj, method));
- -: 697: }
- -: 698:
- -: 699: /** Create a Callback with a member function
- -: 700: * @param obj Pointer to object to invoke member function on
- -: 701: * @param method Member function to attach
- -: 702: */
- -: 703: template
- -: 704: Callback(const volatile U *obj, R (T::*method)(A0) const volatile) {
- -: 705: generate(method_context(obj, method));
- -: 706: }
- -: 707:
- -: 708: /** Create a Callback with a static function and bound pointer
- -: 709: * @param func Static function to attach
- -: 710: * @param arg Pointer argument to function
- -: 711: */
- -: 712: template
- -: 713: Callback(R (*func)(T*, A0), U *arg) {
- -: 714: generate(function_context(func, arg));
- -: 715: }
- -: 716:
- -: 717: /** Create a Callback with a static function and bound pointer
- -: 718: * @param func Static function to attach
- -: 719: * @param arg Pointer argument to function
- -: 720: */
- -: 721: template
- -: 722: Callback(R (*func)(const T*, A0), const U *arg) {
- -: 723: generate(function_context(func, arg));
- -: 724: }
- -: 725:
- -: 726: /** Create a Callback with a static function and bound pointer
- -: 727: * @param func Static function to attach
- -: 728: * @param arg Pointer argument to function
- -: 729: */
- -: 730: template
- -: 731: Callback(R (*func)(volatile T*, A0), volatile U *arg) {
- -: 732: generate(function_context(func, arg));
- -: 733: }
- -: 734:
- -: 735: /** Create a Callback with a static function and bound pointer
- -: 736: * @param func Static function to attach
- -: 737: * @param arg Pointer argument to function
- -: 738: */
- -: 739: template
- -: 740: Callback(R (*func)(const volatile T*, A0), const volatile U *arg) {
- -: 741: generate(function_context(func, arg));
- -: 742: }
- -: 743:
- -: 744: /** Create a Callback with a function object
- -: 745: * @param f Function object to attach
- -: 746: * @note The function object is limited to a single word of storage
- -: 747: */
- -: 748: template
- -: 749: Callback(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0))) {
- -: 750: generate(f);
- -: 751: }
- -: 752:
- -: 753: /** Create a Callback with a function object
- -: 754: * @param f Function object to attach
- -: 755: * @note The function object is limited to a single word of storage
- -: 756: */
- -: 757: template
- -: 758: Callback(const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0) const)) {
- -: 759: generate(f);
- -: 760: }
- -: 761:
- -: 762: /** Create a Callback with a function object
- -: 763: * @param f Function object to attach
- -: 764: * @note The function object is limited to a single word of storage
- -: 765: */
- -: 766: template
- -: 767: Callback(volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0) volatile)) {
- -: 768: generate(f);
- -: 769: }
- -: 770:
- -: 771: /** Create a Callback with a function object
- -: 772: * @param f Function object to attach
- -: 773: * @note The function object is limited to a single word of storage
- -: 774: */
- -: 775: template
- -: 776: Callback(const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0) const volatile)) {
- -: 777: generate(f);
- -: 778: }
- -: 779:
- -: 780: /** Create a Callback with a static function and bound pointer
- -: 781: * @param obj Pointer to object to bind to function
- -: 782: * @param func Static function to attach
- -: 783: * @deprecated
- -: 784: * Arguments to callback have been reordered to Callback(func, arg)
- -: 785: */
- -: 786: template
- -: 787: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 788: "Arguments to callback have been reordered to Callback(func, arg)")
- -: 789: Callback(U *obj, R (*func)(T*, A0)) {
- -: 790: new (this) Callback(func, obj);
- -: 791: }
- -: 792:
- -: 793: /** Create a Callback with a static function and bound pointer
- -: 794: * @param obj Pointer to object to bind to function
- -: 795: * @param func Static function to attach
- -: 796: * @deprecated
- -: 797: * Arguments to callback have been reordered to Callback(func, arg)
- -: 798: */
- -: 799: template
- -: 800: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 801: "Arguments to callback have been reordered to Callback(func, arg)")
- -: 802: Callback(const U *obj, R (*func)(const T*, A0)) {
- -: 803: new (this) Callback(func, obj);
- -: 804: }
- -: 805:
- -: 806: /** Create a Callback with a static function and bound pointer
- -: 807: * @param obj Pointer to object to bind to function
- -: 808: * @param func Static function to attach
- -: 809: * @deprecated
- -: 810: * Arguments to callback have been reordered to Callback(func, arg)
- -: 811: */
- -: 812: template
- -: 813: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 814: "Arguments to callback have been reordered to Callback(func, arg)")
- -: 815: Callback(volatile U *obj, R (*func)(volatile T*, A0)) {
- -: 816: new (this) Callback(func, obj);
- -: 817: }
- -: 818:
- -: 819: /** Create a Callback with a static function and bound pointer
- -: 820: * @param obj Pointer to object to bind to function
- -: 821: * @param func Static function to attach
- -: 822: * @deprecated
- -: 823: * Arguments to callback have been reordered to Callback(func, arg)
- -: 824: */
- -: 825: template
- -: 826: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 827: "Arguments to callback have been reordered to Callback(func, arg)")
- -: 828: Callback(const volatile U *obj, R (*func)(const volatile T*, A0)) {
- -: 829: new (this) Callback(func, obj);
- -: 830: }
- -: 831:
- -: 832: /** Destroy a callback
- -: 833: */
- #####: 834: ~Callback() {
- #####: 835: if (_ops) {
- #####: 836: _ops->dtor(this);
- -: 837: }
- #####: 838: }
- -: 839:
- -: 840: /** Attach a static function
- -: 841: * @param func Static function to attach
- -: 842: * @deprecated
- -: 843: * Replaced by simple assignment 'Callback cb = func'
- -: 844: */
- -: 845: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 846: "Replaced by simple assignment 'Callback cb = func")
- -: 847: void attach(R (*func)(A0)) {
- -: 848: this->~Callback();
- -: 849: new (this) Callback(func);
- -: 850: }
- -: 851:
- -: 852: /** Attach a Callback
- -: 853: * @param func The Callback to attach
- -: 854: * @deprecated
- -: 855: * Replaced by simple assignment 'Callback cb = func'
- -: 856: */
- -: 857: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 858: "Replaced by simple assignment 'Callback cb = func")
- -: 859: void attach(const Callback &func) {
- -: 860: this->~Callback();
- -: 861: new (this) Callback(func);
- -: 862: }
- -: 863:
- -: 864: /** Attach a member function
- -: 865: * @param obj Pointer to object to invoke member function on
- -: 866: * @param method Member function to attach
- -: 867: * @deprecated
- -: 868: * Replaced by simple assignment 'Callback cb = func'
- -: 869: */
- -: 870: template
- -: 871: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 872: "Replaced by simple assignment 'Callback cb = func")
- -: 873: void attach(U *obj, R (T::*method)(A0)) {
- -: 874: this->~Callback();
- -: 875: new (this) Callback(obj, method);
- -: 876: }
- -: 877:
- -: 878: /** Attach a member function
- -: 879: * @param obj Pointer to object to invoke member function on
- -: 880: * @param method Member function to attach
- -: 881: * @deprecated
- -: 882: * Replaced by simple assignment 'Callback cb = func'
- -: 883: */
- -: 884: template
- -: 885: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 886: "Replaced by simple assignment 'Callback cb = func")
- -: 887: void attach(const U *obj, R (T::*method)(A0) const) {
- -: 888: this->~Callback();
- -: 889: new (this) Callback(obj, method);
- -: 890: }
- -: 891:
- -: 892: /** Attach a member function
- -: 893: * @param obj Pointer to object to invoke member function on
- -: 894: * @param method Member function to attach
- -: 895: * @deprecated
- -: 896: * Replaced by simple assignment 'Callback cb = func'
- -: 897: */
- -: 898: template
- -: 899: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 900: "Replaced by simple assignment 'Callback cb = func")
- -: 901: void attach(volatile U *obj, R (T::*method)(A0) volatile) {
- -: 902: this->~Callback();
- -: 903: new (this) Callback(obj, method);
- -: 904: }
- -: 905:
- -: 906: /** Attach a member function
- -: 907: * @param obj Pointer to object to invoke member function on
- -: 908: * @param method Member function to attach
- -: 909: * @deprecated
- -: 910: * Replaced by simple assignment 'Callback cb = func'
- -: 911: */
- -: 912: template
- -: 913: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 914: "Replaced by simple assignment 'Callback cb = func")
- -: 915: void attach(const volatile U *obj, R (T::*method)(A0) const volatile) {
- -: 916: this->~Callback();
- -: 917: new (this) Callback(obj, method);
- -: 918: }
- -: 919:
- -: 920: /** Attach a static function with a bound pointer
- -: 921: * @param func Static function to attach
- -: 922: * @param arg Pointer argument to function
- -: 923: * @deprecated
- -: 924: * Replaced by simple assignment 'Callback cb = func'
- -: 925: */
- -: 926: template
- -: 927: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 928: "Replaced by simple assignment 'Callback cb = func")
- -: 929: void attach(R (*func)(T*, A0), U *arg) {
- -: 930: this->~Callback();
- -: 931: new (this) Callback(func, arg);
- -: 932: }
- -: 933:
- -: 934: /** Attach a static function with a bound pointer
- -: 935: * @param func Static function to attach
- -: 936: * @param arg Pointer argument to function
- -: 937: * @deprecated
- -: 938: * Replaced by simple assignment 'Callback cb = func'
- -: 939: */
- -: 940: template
- -: 941: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 942: "Replaced by simple assignment 'Callback cb = func")
- -: 943: void attach(R (*func)(const T*, A0), const U *arg) {
- -: 944: this->~Callback();
- -: 945: new (this) Callback(func, arg);
- -: 946: }
- -: 947:
- -: 948: /** Attach a static function with a bound pointer
- -: 949: * @param func Static function to attach
- -: 950: * @param arg Pointer argument to function
- -: 951: * @deprecated
- -: 952: * Replaced by simple assignment 'Callback cb = func'
- -: 953: */
- -: 954: template
- -: 955: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 956: "Replaced by simple assignment 'Callback cb = func")
- -: 957: void attach(R (*func)(volatile T*, A0), volatile U *arg) {
- -: 958: this->~Callback();
- -: 959: new (this) Callback(func, arg);
- -: 960: }
- -: 961:
- -: 962: /** Attach a static function with a bound pointer
- -: 963: * @param func Static function to attach
- -: 964: * @param arg Pointer argument to function
- -: 965: * @deprecated
- -: 966: * Replaced by simple assignment 'Callback cb = func'
- -: 967: */
- -: 968: template
- -: 969: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 970: "Replaced by simple assignment 'Callback cb = func")
- -: 971: void attach(R (*func)(const volatile T*, A0), const volatile U *arg) {
- -: 972: this->~Callback();
- -: 973: new (this) Callback(func, arg);
- -: 974: }
- -: 975:
- -: 976: /** Attach a function object
- -: 977: * @param f Function object to attach
- -: 978: * @note The function object is limited to a single word of storage
- -: 979: * @deprecated
- -: 980: * Replaced by simple assignment 'Callback cb = func'
- -: 981: */
- -: 982: template
- -: 983: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 984: "Replaced by simple assignment 'Callback cb = func")
- -: 985: void attach(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0))) {
- -: 986: this->~Callback();
- -: 987: new (this) Callback(f);
- -: 988: }
- -: 989:
- -: 990: /** Attach a function object
- -: 991: * @param f Function object to attach
- -: 992: * @note The function object is limited to a single word of storage
- -: 993: * @deprecated
- -: 994: * Replaced by simple assignment 'Callback cb = func'
- -: 995: */
- -: 996: template
- -: 997: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 998: "Replaced by simple assignment 'Callback cb = func")
- -: 999: void attach(const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0) const)) {
- -: 1000: this->~Callback();
- -: 1001: new (this) Callback(f);
- -: 1002: }
- -: 1003:
- -: 1004: /** Attach a function object
- -: 1005: * @param f Function object to attach
- -: 1006: * @note The function object is limited to a single word of storage
- -: 1007: * @deprecated
- -: 1008: * Replaced by simple assignment 'Callback cb = func'
- -: 1009: */
- -: 1010: template
- -: 1011: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 1012: "Replaced by simple assignment 'Callback cb = func")
- -: 1013: void attach(volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0) volatile)) {
- -: 1014: this->~Callback();
- -: 1015: new (this) Callback(f);
- -: 1016: }
- -: 1017:
- -: 1018: /** Attach a function object
- -: 1019: * @param f Function object to attach
- -: 1020: * @note The function object is limited to a single word of storage
- -: 1021: * @deprecated
- -: 1022: * Replaced by simple assignment 'Callback cb = func'
- -: 1023: */
- -: 1024: template
- -: 1025: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 1026: "Replaced by simple assignment 'Callback cb = func")
- -: 1027: void attach(const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0) const volatile)) {
- -: 1028: this->~Callback();
- -: 1029: new (this) Callback(f);
- -: 1030: }
- -: 1031:
- -: 1032: /** Attach a static function with a bound pointer
- -: 1033: * @param obj Pointer to object to bind to function
- -: 1034: * @param func Static function to attach
- -: 1035: * @deprecated
- -: 1036: * Arguments to callback have been reordered to attach(func, arg)
- -: 1037: */
- -: 1038: template
- -: 1039: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 1040: "Arguments to callback have been reordered to attach(func, arg)")
- -: 1041: void attach(U *obj, R (*func)(T*, A0)) {
- -: 1042: this->~Callback();
- -: 1043: new (this) Callback(func, obj);
- -: 1044: }
- -: 1045:
- -: 1046: /** Attach a static function with a bound pointer
- -: 1047: * @param obj Pointer to object to bind to function
- -: 1048: * @param func Static function to attach
- -: 1049: * @deprecated
- -: 1050: * Arguments to callback have been reordered to attach(func, arg)
- -: 1051: */
- -: 1052: template
- -: 1053: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 1054: "Arguments to callback have been reordered to attach(func, arg)")
- -: 1055: void attach(const U *obj, R (*func)(const T*, A0)) {
- -: 1056: this->~Callback();
- -: 1057: new (this) Callback(func, obj);
- -: 1058: }
- -: 1059:
- -: 1060: /** Attach a static function with a bound pointer
- -: 1061: * @param obj Pointer to object to bind to function
- -: 1062: * @param func Static function to attach
- -: 1063: * @deprecated
- -: 1064: * Arguments to callback have been reordered to attach(func, arg)
- -: 1065: */
- -: 1066: template
- -: 1067: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 1068: "Arguments to callback have been reordered to attach(func, arg)")
- -: 1069: void attach(volatile U *obj, R (*func)(volatile T*, A0)) {
- -: 1070: this->~Callback();
- -: 1071: new (this) Callback(func, obj);
- -: 1072: }
- -: 1073:
- -: 1074: /** Attach a static function with a bound pointer
- -: 1075: * @param obj Pointer to object to bind to function
- -: 1076: * @param func Static function to attach
- -: 1077: * @deprecated
- -: 1078: * Arguments to callback have been reordered to attach(func, arg)
- -: 1079: */
- -: 1080: template
- -: 1081: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 1082: "Arguments to callback have been reordered to attach(func, arg)")
- -: 1083: void attach(const volatile U *obj, R (*func)(const volatile T*, A0)) {
- -: 1084: this->~Callback();
- -: 1085: new (this) Callback(func, obj);
- -: 1086: }
- -: 1087:
- -: 1088: /** Assign a callback
- -: 1089: */
- 1: 1090: Callback &operator=(const Callback &that) {
- 1: 1091: if (this != &that) {
- 1: 1092: this->~Callback();
- 1: 1093: new (this) Callback(that);
- -: 1094: }
- -: 1095:
- 1: 1096: return *this;
- -: 1097: }
- -: 1098:
- -: 1099: /** Call the attached function
- -: 1100: */
- 1: 1101: R call(A0 a0) const {
- 1: 1102: MBED_ASSERT(_ops);
- 1: 1103: return _ops->call(this, a0);
- -: 1104: }
- -: 1105:
- -: 1106: /** Call the attached function
- -: 1107: */
- 1: 1108: R operator()(A0 a0) const {
- 1: 1109: return call(a0);
- -: 1110: }
- -: 1111:
- -: 1112: /** Test if function has been attached
- -: 1113: */
- 1: 1114: operator bool() const {
- 1: 1115: return _ops;
- -: 1116: }
- -: 1117:
- -: 1118: /** Test for equality
- -: 1119: */
- -: 1120: friend bool operator==(const Callback &l, const Callback &r) {
- -: 1121: return memcmp(&l, &r, sizeof(Callback)) == 0;
- -: 1122: }
- -: 1123:
- -: 1124: /** Test for inequality
- -: 1125: */
- -: 1126: friend bool operator!=(const Callback &l, const Callback &r) {
- -: 1127: return !(l == r);
- -: 1128: }
- -: 1129:
- -: 1130: /** Static thunk for passing as C-style function
- -: 1131: * @param func Callback to call passed as void pointer
- -: 1132: * @param a0 An argument to be called with function func
- -: 1133: * @return the value as determined by func which is of
- -: 1134: * type and determined by the signiture of func
- -: 1135: */
- -: 1136: static R thunk(void *func, A0 a0) {
- -: 1137: return static_cast(func)->call(a0);
- -: 1138: }
- -: 1139:
- -: 1140:private:
- -: 1141: // Stored as pointer to function and pointer to optional object
- -: 1142: // Function pointer is stored as union of possible function types
- -: 1143: // to garuntee proper size and alignment
- -: 1144: struct _class;
- -: 1145: union {
- -: 1146: void (*_staticfunc)(A0);
- -: 1147: void (*_boundfunc)(_class*, A0);
- -: 1148: void (_class::*_methodfunc)(A0);
- -: 1149: } _func;
- -: 1150: void *_obj;
- -: 1151:
- -: 1152: // Dynamically dispatched operations
- -: 1153: const struct ops {
- -: 1154: R (*call)(const void*, A0);
- -: 1155: void (*move)(void*, const void*);
- -: 1156: void (*dtor)(void*);
- -: 1157: } *_ops;
- -: 1158:
- -: 1159: // Generate operations for function object
- -: 1160: template
- #####: 1161: void generate(const F &f) {
- -: 1162: static const ops ops = {
- -: 1163: &Callback::function_call,
- -: 1164: &Callback::function_move,
- -: 1165: &Callback::function_dtor,
- -: 1166: };
- -: 1167:
- -: 1168: MBED_STATIC_ASSERT(sizeof(Callback) - sizeof(_ops) >= sizeof(F),
- -: 1169: "Type F must not exceed the size of the Callback class");
- #####: 1170: memset(this, 0, sizeof(Callback));
- #####: 1171: new (this) F(f);
- #####: 1172: _ops = &ops;
- #####: 1173: }
- -: 1174:
- -: 1175: // Function attributes
- -: 1176: template
- #####: 1177: static R function_call(const void *p, A0 a0) {
- #####: 1178: return (*(F*)p)(a0);
- -: 1179: }
- -: 1180:
- -: 1181: template
- #####: 1182: static void function_move(void *d, const void *p) {
- #####: 1183: new (d) F(*(F*)p);
- #####: 1184: }
- -: 1185:
- -: 1186: template
- #####: 1187: static void function_dtor(void *p) {
- -: 1188: ((F*)p)->~F();
- #####: 1189: }
- -: 1190:
- -: 1191: // Wrappers for functions with context
- -: 1192: template
- -: 1193: struct method_context {
- -: 1194: M method;
- -: 1195: O *obj;
- -: 1196:
- -: 1197: method_context(O *obj, M method)
- -: 1198: : method(method), obj(obj) {}
- -: 1199:
- -: 1200: R operator()(A0 a0) const {
- -: 1201: return (obj->*method)(a0);
- -: 1202: }
- -: 1203: };
- -: 1204:
- -: 1205: template
- -: 1206: struct function_context {
- -: 1207: F func;
- -: 1208: A *arg;
- -: 1209:
- -: 1210: function_context(F func, A *arg)
- -: 1211: : func(func), arg(arg) {}
- -: 1212:
- -: 1213: R operator()(A0 a0) const {
- -: 1214: return func(arg, a0);
- -: 1215: }
- -: 1216: };
- -: 1217:};
- -: 1218:
- -: 1219:/** Callback class based on template specialization
- -: 1220: *
- -: 1221: * @note Synchronization level: Not protected
- -: 1222: */
- -: 1223:template
- -: 1224:class Callback {
- -: 1225:public:
- -: 1226: /** Create a Callback with a static function
- -: 1227: * @param func Static function to attach
- -: 1228: */
- -: 1229: Callback(R (*func)(A0, A1) = 0) {
- -: 1230: if (!func) {
- -: 1231: memset(this, 0, sizeof(Callback));
- -: 1232: } else {
- -: 1233: generate(func);
- -: 1234: }
- -: 1235: }
- -: 1236:
- -: 1237: /** Attach a Callback
- -: 1238: * @param func The Callback to attach
- -: 1239: */
- -: 1240: Callback(const Callback &func) {
- -: 1241: if (func._ops) {
- -: 1242: func._ops->move(this, &func);
- -: 1243: }
- -: 1244: _ops = func._ops;
- -: 1245: }
- -: 1246:
- -: 1247: /** Create a Callback with a member function
- -: 1248: * @param obj Pointer to object to invoke member function on
- -: 1249: * @param method Member function to attach
- -: 1250: */
- -: 1251: template
- -: 1252: Callback(U *obj, R (T::*method)(A0, A1)) {
- -: 1253: generate(method_context(obj, method));
- -: 1254: }
- -: 1255:
- -: 1256: /** Create a Callback with a member function
- -: 1257: * @param obj Pointer to object to invoke member function on
- -: 1258: * @param method Member function to attach
- -: 1259: */
- -: 1260: template
- -: 1261: Callback(const U *obj, R (T::*method)(A0, A1) const) {
- -: 1262: generate(method_context(obj, method));
- -: 1263: }
- -: 1264:
- -: 1265: /** Create a Callback with a member function
- -: 1266: * @param obj Pointer to object to invoke member function on
- -: 1267: * @param method Member function to attach
- -: 1268: */
- -: 1269: template
- -: 1270: Callback(volatile U *obj, R (T::*method)(A0, A1) volatile) {
- -: 1271: generate(method_context(obj, method));
- -: 1272: }
- -: 1273:
- -: 1274: /** Create a Callback with a member function
- -: 1275: * @param obj Pointer to object to invoke member function on
- -: 1276: * @param method Member function to attach
- -: 1277: */
- -: 1278: template
- -: 1279: Callback(const volatile U *obj, R (T::*method)(A0, A1) const volatile) {
- -: 1280: generate(method_context(obj, method));
- -: 1281: }
- -: 1282:
- -: 1283: /** Create a Callback with a static function and bound pointer
- -: 1284: * @param func Static function to attach
- -: 1285: * @param arg Pointer argument to function
- -: 1286: */
- -: 1287: template
- -: 1288: Callback(R (*func)(T*, A0, A1), U *arg) {
- -: 1289: generate(function_context(func, arg));
- -: 1290: }
- -: 1291:
- -: 1292: /** Create a Callback with a static function and bound pointer
- -: 1293: * @param func Static function to attach
- -: 1294: * @param arg Pointer argument to function
- -: 1295: */
- -: 1296: template
- -: 1297: Callback(R (*func)(const T*, A0, A1), const U *arg) {
- -: 1298: generate(function_context(func, arg));
- -: 1299: }
- -: 1300:
- -: 1301: /** Create a Callback with a static function and bound pointer
- -: 1302: * @param func Static function to attach
- -: 1303: * @param arg Pointer argument to function
- -: 1304: */
- -: 1305: template
- -: 1306: Callback(R (*func)(volatile T*, A0, A1), volatile U *arg) {
- -: 1307: generate(function_context(func, arg));
- -: 1308: }
- -: 1309:
- -: 1310: /** Create a Callback with a static function and bound pointer
- -: 1311: * @param func Static function to attach
- -: 1312: * @param arg Pointer argument to function
- -: 1313: */
- -: 1314: template
- -: 1315: Callback(R (*func)(const volatile T*, A0, A1), const volatile U *arg) {
- -: 1316: generate(function_context(func, arg));
- -: 1317: }
- -: 1318:
- -: 1319: /** Create a Callback with a function object
- -: 1320: * @param f Function object to attach
- -: 1321: * @note The function object is limited to a single word of storage
- -: 1322: */
- -: 1323: template
- -: 1324: Callback(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1))) {
- -: 1325: generate(f);
- -: 1326: }
- -: 1327:
- -: 1328: /** Create a Callback with a function object
- -: 1329: * @param f Function object to attach
- -: 1330: * @note The function object is limited to a single word of storage
- -: 1331: */
- -: 1332: template
- -: 1333: Callback(const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1) const)) {
- -: 1334: generate(f);
- -: 1335: }
- -: 1336:
- -: 1337: /** Create a Callback with a function object
- -: 1338: * @param f Function object to attach
- -: 1339: * @note The function object is limited to a single word of storage
- -: 1340: */
- -: 1341: template
- -: 1342: Callback(volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1) volatile)) {
- -: 1343: generate(f);
- -: 1344: }
- -: 1345:
- -: 1346: /** Create a Callback with a function object
- -: 1347: * @param f Function object to attach
- -: 1348: * @note The function object is limited to a single word of storage
- -: 1349: */
- -: 1350: template
- -: 1351: Callback(const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1) const volatile)) {
- -: 1352: generate(f);
- -: 1353: }
- -: 1354:
- -: 1355: /** Create a Callback with a static function and bound pointer
- -: 1356: * @param obj Pointer to object to bind to function
- -: 1357: * @param func Static function to attach
- -: 1358: * @deprecated
- -: 1359: * Arguments to callback have been reordered to Callback(func, arg)
- -: 1360: */
- -: 1361: template
- -: 1362: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 1363: "Arguments to callback have been reordered to Callback(func, arg)")
- -: 1364: Callback(U *obj, R (*func)(T*, A0, A1)) {
- -: 1365: new (this) Callback(func, obj);
- -: 1366: }
- -: 1367:
- -: 1368: /** Create a Callback with a static function and bound pointer
- -: 1369: * @param obj Pointer to object to bind to function
- -: 1370: * @param func Static function to attach
- -: 1371: * @deprecated
- -: 1372: * Arguments to callback have been reordered to Callback(func, arg)
- -: 1373: */
- -: 1374: template
- -: 1375: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 1376: "Arguments to callback have been reordered to Callback(func, arg)")
- -: 1377: Callback(const U *obj, R (*func)(const T*, A0, A1)) {
- -: 1378: new (this) Callback(func, obj);
- -: 1379: }
- -: 1380:
- -: 1381: /** Create a Callback with a static function and bound pointer
- -: 1382: * @param obj Pointer to object to bind to function
- -: 1383: * @param func Static function to attach
- -: 1384: * @deprecated
- -: 1385: * Arguments to callback have been reordered to Callback(func, arg)
- -: 1386: */
- -: 1387: template
- -: 1388: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 1389: "Arguments to callback have been reordered to Callback(func, arg)")
- -: 1390: Callback(volatile U *obj, R (*func)(volatile T*, A0, A1)) {
- -: 1391: new (this) Callback(func, obj);
- -: 1392: }
- -: 1393:
- -: 1394: /** Create a Callback with a static function and bound pointer
- -: 1395: * @param obj Pointer to object to bind to function
- -: 1396: * @param func Static function to attach
- -: 1397: * @deprecated
- -: 1398: * Arguments to callback have been reordered to Callback(func, arg)
- -: 1399: */
- -: 1400: template
- -: 1401: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 1402: "Arguments to callback have been reordered to Callback(func, arg)")
- -: 1403: Callback(const volatile U *obj, R (*func)(const volatile T*, A0, A1)) {
- -: 1404: new (this) Callback(func, obj);
- -: 1405: }
- -: 1406:
- -: 1407: /** Destroy a callback
- -: 1408: */
- -: 1409: ~Callback() {
- -: 1410: if (_ops) {
- -: 1411: _ops->dtor(this);
- -: 1412: }
- -: 1413: }
- -: 1414:
- -: 1415: /** Attach a static function
- -: 1416: * @param func Static function to attach
- -: 1417: * @deprecated
- -: 1418: * Replaced by simple assignment 'Callback cb = func'
- -: 1419: */
- -: 1420: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 1421: "Replaced by simple assignment 'Callback cb = func")
- -: 1422: void attach(R (*func)(A0, A1)) {
- -: 1423: this->~Callback();
- -: 1424: new (this) Callback(func);
- -: 1425: }
- -: 1426:
- -: 1427: /** Attach a Callback
- -: 1428: * @param func The Callback to attach
- -: 1429: * @deprecated
- -: 1430: * Replaced by simple assignment 'Callback cb = func'
- -: 1431: */
- -: 1432: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 1433: "Replaced by simple assignment 'Callback cb = func")
- -: 1434: void attach(const Callback &func) {
- -: 1435: this->~Callback();
- -: 1436: new (this) Callback(func);
- -: 1437: }
- -: 1438:
- -: 1439: /** Attach a member function
- -: 1440: * @param obj Pointer to object to invoke member function on
- -: 1441: * @param method Member function to attach
- -: 1442: * @deprecated
- -: 1443: * Replaced by simple assignment 'Callback cb = func'
- -: 1444: */
- -: 1445: template
- -: 1446: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 1447: "Replaced by simple assignment 'Callback cb = func")
- -: 1448: void attach(U *obj, R (T::*method)(A0, A1)) {
- -: 1449: this->~Callback();
- -: 1450: new (this) Callback(obj, method);
- -: 1451: }
- -: 1452:
- -: 1453: /** Attach a member function
- -: 1454: * @param obj Pointer to object to invoke member function on
- -: 1455: * @param method Member function to attach
- -: 1456: * @deprecated
- -: 1457: * Replaced by simple assignment 'Callback cb = func'
- -: 1458: */
- -: 1459: template
- -: 1460: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 1461: "Replaced by simple assignment 'Callback cb = func")
- -: 1462: void attach(const U *obj, R (T::*method)(A0, A1) const) {
- -: 1463: this->~Callback();
- -: 1464: new (this) Callback(obj, method);
- -: 1465: }
- -: 1466:
- -: 1467: /** Attach a member function
- -: 1468: * @param obj Pointer to object to invoke member function on
- -: 1469: * @param method Member function to attach
- -: 1470: * @deprecated
- -: 1471: * Replaced by simple assignment 'Callback cb = func'
- -: 1472: */
- -: 1473: template
- -: 1474: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 1475: "Replaced by simple assignment 'Callback cb = func")
- -: 1476: void attach(volatile U *obj, R (T::*method)(A0, A1) volatile) {
- -: 1477: this->~Callback();
- -: 1478: new (this) Callback(obj, method);
- -: 1479: }
- -: 1480:
- -: 1481: /** Attach a member function
- -: 1482: * @param obj Pointer to object to invoke member function on
- -: 1483: * @param method Member function to attach
- -: 1484: * @deprecated
- -: 1485: * Replaced by simple assignment 'Callback cb = func'
- -: 1486: */
- -: 1487: template
- -: 1488: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 1489: "Replaced by simple assignment 'Callback cb = func")
- -: 1490: void attach(const volatile U *obj, R (T::*method)(A0, A1) const volatile) {
- -: 1491: this->~Callback();
- -: 1492: new (this) Callback(obj, method);
- -: 1493: }
- -: 1494:
- -: 1495: /** Attach a static function with a bound pointer
- -: 1496: * @param func Static function to attach
- -: 1497: * @param arg Pointer argument to function
- -: 1498: * @deprecated
- -: 1499: * Replaced by simple assignment 'Callback cb = func'
- -: 1500: */
- -: 1501: template
- -: 1502: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 1503: "Replaced by simple assignment 'Callback cb = func")
- -: 1504: void attach(R (*func)(T*, A0, A1), U *arg) {
- -: 1505: this->~Callback();
- -: 1506: new (this) Callback(func, arg);
- -: 1507: }
- -: 1508:
- -: 1509: /** Attach a static function with a bound pointer
- -: 1510: * @param func Static function to attach
- -: 1511: * @param arg Pointer argument to function
- -: 1512: * @deprecated
- -: 1513: * Replaced by simple assignment 'Callback cb = func'
- -: 1514: */
- -: 1515: template
- -: 1516: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 1517: "Replaced by simple assignment 'Callback cb = func")
- -: 1518: void attach(R (*func)(const T*, A0, A1), const U *arg) {
- -: 1519: this->~Callback();
- -: 1520: new (this) Callback(func, arg);
- -: 1521: }
- -: 1522:
- -: 1523: /** Attach a static function with a bound pointer
- -: 1524: * @param func Static function to attach
- -: 1525: * @param arg Pointer argument to function
- -: 1526: * @deprecated
- -: 1527: * Replaced by simple assignment 'Callback cb = func'
- -: 1528: */
- -: 1529: template
- -: 1530: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 1531: "Replaced by simple assignment 'Callback cb = func")
- -: 1532: void attach(R (*func)(volatile T*, A0, A1), volatile U *arg) {
- -: 1533: this->~Callback();
- -: 1534: new (this) Callback(func, arg);
- -: 1535: }
- -: 1536:
- -: 1537: /** Attach a static function with a bound pointer
- -: 1538: * @param func Static function to attach
- -: 1539: * @param arg Pointer argument to function
- -: 1540: * @deprecated
- -: 1541: * Replaced by simple assignment 'Callback cb = func'
- -: 1542: */
- -: 1543: template
- -: 1544: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 1545: "Replaced by simple assignment 'Callback cb = func")
- -: 1546: void attach(R (*func)(const volatile T*, A0, A1), const volatile U *arg) {
- -: 1547: this->~Callback();
- -: 1548: new (this) Callback(func, arg);
- -: 1549: }
- -: 1550:
- -: 1551: /** Attach a function object
- -: 1552: * @param f Function object to attach
- -: 1553: * @note The function object is limited to a single word of storage
- -: 1554: * @deprecated
- -: 1555: * Replaced by simple assignment 'Callback cb = func'
- -: 1556: */
- -: 1557: template
- -: 1558: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 1559: "Replaced by simple assignment 'Callback cb = func")
- -: 1560: void attach(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1))) {
- -: 1561: this->~Callback();
- -: 1562: new (this) Callback(f);
- -: 1563: }
- -: 1564:
- -: 1565: /** Attach a function object
- -: 1566: * @param f Function object to attach
- -: 1567: * @note The function object is limited to a single word of storage
- -: 1568: * @deprecated
- -: 1569: * Replaced by simple assignment 'Callback cb = func'
- -: 1570: */
- -: 1571: template
- -: 1572: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 1573: "Replaced by simple assignment 'Callback cb = func")
- -: 1574: void attach(const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1) const)) {
- -: 1575: this->~Callback();
- -: 1576: new (this) Callback(f);
- -: 1577: }
- -: 1578:
- -: 1579: /** Attach a function object
- -: 1580: * @param f Function object to attach
- -: 1581: * @note The function object is limited to a single word of storage
- -: 1582: * @deprecated
- -: 1583: * Replaced by simple assignment 'Callback cb = func'
- -: 1584: */
- -: 1585: template
- -: 1586: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 1587: "Replaced by simple assignment 'Callback cb = func")
- -: 1588: void attach(volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1) volatile)) {
- -: 1589: this->~Callback();
- -: 1590: new (this) Callback(f);
- -: 1591: }
- -: 1592:
- -: 1593: /** Attach a function object
- -: 1594: * @param f Function object to attach
- -: 1595: * @note The function object is limited to a single word of storage
- -: 1596: * @deprecated
- -: 1597: * Replaced by simple assignment 'Callback cb = func'
- -: 1598: */
- -: 1599: template
- -: 1600: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 1601: "Replaced by simple assignment 'Callback cb = func")
- -: 1602: void attach(const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1) const volatile)) {
- -: 1603: this->~Callback();
- -: 1604: new (this) Callback(f);
- -: 1605: }
- -: 1606:
- -: 1607: /** Attach a static function with a bound pointer
- -: 1608: * @param obj Pointer to object to bind to function
- -: 1609: * @param func Static function to attach
- -: 1610: * @deprecated
- -: 1611: * Arguments to callback have been reordered to attach(func, arg)
- -: 1612: */
- -: 1613: template
- -: 1614: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 1615: "Arguments to callback have been reordered to attach(func, arg)")
- -: 1616: void attach(U *obj, R (*func)(T*, A0, A1)) {
- -: 1617: this->~Callback();
- -: 1618: new (this) Callback(func, obj);
- -: 1619: }
- -: 1620:
- -: 1621: /** Attach a static function with a bound pointer
- -: 1622: * @param obj Pointer to object to bind to function
- -: 1623: * @param func Static function to attach
- -: 1624: * @deprecated
- -: 1625: * Arguments to callback have been reordered to attach(func, arg)
- -: 1626: */
- -: 1627: template
- -: 1628: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 1629: "Arguments to callback have been reordered to attach(func, arg)")
- -: 1630: void attach(const U *obj, R (*func)(const T*, A0, A1)) {
- -: 1631: this->~Callback();
- -: 1632: new (this) Callback(func, obj);
- -: 1633: }
- -: 1634:
- -: 1635: /** Attach a static function with a bound pointer
- -: 1636: * @param obj Pointer to object to bind to function
- -: 1637: * @param func Static function to attach
- -: 1638: * @deprecated
- -: 1639: * Arguments to callback have been reordered to attach(func, arg)
- -: 1640: */
- -: 1641: template
- -: 1642: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 1643: "Arguments to callback have been reordered to attach(func, arg)")
- -: 1644: void attach(volatile U *obj, R (*func)(volatile T*, A0, A1)) {
- -: 1645: this->~Callback();
- -: 1646: new (this) Callback(func, obj);
- -: 1647: }
- -: 1648:
- -: 1649: /** Attach a static function with a bound pointer
- -: 1650: * @param obj Pointer to object to bind to function
- -: 1651: * @param func Static function to attach
- -: 1652: * @deprecated
- -: 1653: * Arguments to callback have been reordered to attach(func, arg)
- -: 1654: */
- -: 1655: template
- -: 1656: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 1657: "Arguments to callback have been reordered to attach(func, arg)")
- -: 1658: void attach(const volatile U *obj, R (*func)(const volatile T*, A0, A1)) {
- -: 1659: this->~Callback();
- -: 1660: new (this) Callback(func, obj);
- -: 1661: }
- -: 1662:
- -: 1663: /** Assign a callback
- -: 1664: */
- -: 1665: Callback &operator=(const Callback &that) {
- -: 1666: if (this != &that) {
- -: 1667: this->~Callback();
- -: 1668: new (this) Callback(that);
- -: 1669: }
- -: 1670:
- -: 1671: return *this;
- -: 1672: }
- -: 1673:
- -: 1674: /** Call the attached function
- -: 1675: */
- -: 1676: R call(A0 a0, A1 a1) const {
- -: 1677: MBED_ASSERT(_ops);
- -: 1678: return _ops->call(this, a0, a1);
- -: 1679: }
- -: 1680:
- -: 1681: /** Call the attached function
- -: 1682: */
- -: 1683: R operator()(A0 a0, A1 a1) const {
- -: 1684: return call(a0, a1);
- -: 1685: }
- -: 1686:
- -: 1687: /** Test if function has been attached
- -: 1688: */
- -: 1689: operator bool() const {
- -: 1690: return _ops;
- -: 1691: }
- -: 1692:
- -: 1693: /** Test for equality
- -: 1694: */
- -: 1695: friend bool operator==(const Callback &l, const Callback &r) {
- -: 1696: return memcmp(&l, &r, sizeof(Callback)) == 0;
- -: 1697: }
- -: 1698:
- -: 1699: /** Test for inequality
- -: 1700: */
- -: 1701: friend bool operator!=(const Callback &l, const Callback &r) {
- -: 1702: return !(l == r);
- -: 1703: }
- -: 1704:
- -: 1705: /** Static thunk for passing as C-style function
- -: 1706: * @param func Callback to call passed as void pointer
- -: 1707: * @param a0 An argument to be called with function func
- -: 1708: * @param a1 An argument to be called with function func
- -: 1709: * @return the value as determined by func which is of
- -: 1710: * type and determined by the signiture of func
- -: 1711: */
- -: 1712: static R thunk(void *func, A0 a0, A1 a1) {
- -: 1713: return static_cast(func)->call(a0, a1);
- -: 1714: }
- -: 1715:
- -: 1716:private:
- -: 1717: // Stored as pointer to function and pointer to optional object
- -: 1718: // Function pointer is stored as union of possible function types
- -: 1719: // to garuntee proper size and alignment
- -: 1720: struct _class;
- -: 1721: union {
- -: 1722: void (*_staticfunc)(A0, A1);
- -: 1723: void (*_boundfunc)(_class*, A0, A1);
- -: 1724: void (_class::*_methodfunc)(A0, A1);
- -: 1725: } _func;
- -: 1726: void *_obj;
- -: 1727:
- -: 1728: // Dynamically dispatched operations
- -: 1729: const struct ops {
- -: 1730: R (*call)(const void*, A0, A1);
- -: 1731: void (*move)(void*, const void*);
- -: 1732: void (*dtor)(void*);
- -: 1733: } *_ops;
- -: 1734:
- -: 1735: // Generate operations for function object
- -: 1736: template
- -: 1737: void generate(const F &f) {
- -: 1738: static const ops ops = {
- -: 1739: &Callback::function_call,
- -: 1740: &Callback::function_move,
- -: 1741: &Callback::function_dtor,
- -: 1742: };
- -: 1743:
- -: 1744: MBED_STATIC_ASSERT(sizeof(Callback) - sizeof(_ops) >= sizeof(F),
- -: 1745: "Type F must not exceed the size of the Callback class");
- -: 1746: memset(this, 0, sizeof(Callback));
- -: 1747: new (this) F(f);
- -: 1748: _ops = &ops;
- -: 1749: }
- -: 1750:
- -: 1751: // Function attributes
- -: 1752: template
- -: 1753: static R function_call(const void *p, A0 a0, A1 a1) {
- -: 1754: return (*(F*)p)(a0, a1);
- -: 1755: }
- -: 1756:
- -: 1757: template
- -: 1758: static void function_move(void *d, const void *p) {
- -: 1759: new (d) F(*(F*)p);
- -: 1760: }
- -: 1761:
- -: 1762: template
- -: 1763: static void function_dtor(void *p) {
- -: 1764: ((F*)p)->~F();
- -: 1765: }
- -: 1766:
- -: 1767: // Wrappers for functions with context
- -: 1768: template
- -: 1769: struct method_context {
- -: 1770: M method;
- -: 1771: O *obj;
- -: 1772:
- -: 1773: method_context(O *obj, M method)
- -: 1774: : method(method), obj(obj) {}
- -: 1775:
- -: 1776: R operator()(A0 a0, A1 a1) const {
- -: 1777: return (obj->*method)(a0, a1);
- -: 1778: }
- -: 1779: };
- -: 1780:
- -: 1781: template
- -: 1782: struct function_context {
- -: 1783: F func;
- -: 1784: A *arg;
- -: 1785:
- -: 1786: function_context(F func, A *arg)
- -: 1787: : func(func), arg(arg) {}
- -: 1788:
- -: 1789: R operator()(A0 a0, A1 a1) const {
- -: 1790: return func(arg, a0, a1);
- -: 1791: }
- -: 1792: };
- -: 1793:};
- -: 1794:
- -: 1795:/** Callback class based on template specialization
- -: 1796: *
- -: 1797: * @note Synchronization level: Not protected
- -: 1798: */
- -: 1799:template
- -: 1800:class Callback {
- -: 1801:public:
- -: 1802: /** Create a Callback with a static function
- -: 1803: * @param func Static function to attach
- -: 1804: */
- -: 1805: Callback(R (*func)(A0, A1, A2) = 0) {
- -: 1806: if (!func) {
- -: 1807: memset(this, 0, sizeof(Callback));
- -: 1808: } else {
- -: 1809: generate(func);
- -: 1810: }
- -: 1811: }
- -: 1812:
- -: 1813: /** Attach a Callback
- -: 1814: * @param func The Callback to attach
- -: 1815: */
- -: 1816: Callback(const Callback &func) {
- -: 1817: if (func._ops) {
- -: 1818: func._ops->move(this, &func);
- -: 1819: }
- -: 1820: _ops = func._ops;
- -: 1821: }
- -: 1822:
- -: 1823: /** Create a Callback with a member function
- -: 1824: * @param obj Pointer to object to invoke member function on
- -: 1825: * @param method Member function to attach
- -: 1826: */
- -: 1827: template
- -: 1828: Callback(U *obj, R (T::*method)(A0, A1, A2)) {
- -: 1829: generate(method_context(obj, method));
- -: 1830: }
- -: 1831:
- -: 1832: /** Create a Callback with a member function
- -: 1833: * @param obj Pointer to object to invoke member function on
- -: 1834: * @param method Member function to attach
- -: 1835: */
- -: 1836: template
- -: 1837: Callback(const U *obj, R (T::*method)(A0, A1, A2) const) {
- -: 1838: generate(method_context(obj, method));
- -: 1839: }
- -: 1840:
- -: 1841: /** Create a Callback with a member function
- -: 1842: * @param obj Pointer to object to invoke member function on
- -: 1843: * @param method Member function to attach
- -: 1844: */
- -: 1845: template
- -: 1846: Callback(volatile U *obj, R (T::*method)(A0, A1, A2) volatile) {
- -: 1847: generate(method_context(obj, method));
- -: 1848: }
- -: 1849:
- -: 1850: /** Create a Callback with a member function
- -: 1851: * @param obj Pointer to object to invoke member function on
- -: 1852: * @param method Member function to attach
- -: 1853: */
- -: 1854: template
- -: 1855: Callback(const volatile U *obj, R (T::*method)(A0, A1, A2) const volatile) {
- -: 1856: generate(method_context(obj, method));
- -: 1857: }
- -: 1858:
- -: 1859: /** Create a Callback with a static function and bound pointer
- -: 1860: * @param func Static function to attach
- -: 1861: * @param arg Pointer argument to function
- -: 1862: */
- -: 1863: template
- -: 1864: Callback(R (*func)(T*, A0, A1, A2), U *arg) {
- -: 1865: generate(function_context(func, arg));
- -: 1866: }
- -: 1867:
- -: 1868: /** Create a Callback with a static function and bound pointer
- -: 1869: * @param func Static function to attach
- -: 1870: * @param arg Pointer argument to function
- -: 1871: */
- -: 1872: template
- -: 1873: Callback(R (*func)(const T*, A0, A1, A2), const U *arg) {
- -: 1874: generate(function_context(func, arg));
- -: 1875: }
- -: 1876:
- -: 1877: /** Create a Callback with a static function and bound pointer
- -: 1878: * @param func Static function to attach
- -: 1879: * @param arg Pointer argument to function
- -: 1880: */
- -: 1881: template
- -: 1882: Callback(R (*func)(volatile T*, A0, A1, A2), volatile U *arg) {
- -: 1883: generate(function_context(func, arg));
- -: 1884: }
- -: 1885:
- -: 1886: /** Create a Callback with a static function and bound pointer
- -: 1887: * @param func Static function to attach
- -: 1888: * @param arg Pointer argument to function
- -: 1889: */
- -: 1890: template
- -: 1891: Callback(R (*func)(const volatile T*, A0, A1, A2), const volatile U *arg) {
- -: 1892: generate(function_context(func, arg));
- -: 1893: }
- -: 1894:
- -: 1895: /** Create a Callback with a function object
- -: 1896: * @param f Function object to attach
- -: 1897: * @note The function object is limited to a single word of storage
- -: 1898: */
- -: 1899: template
- -: 1900: Callback(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2))) {
- -: 1901: generate(f);
- -: 1902: }
- -: 1903:
- -: 1904: /** Create a Callback with a function object
- -: 1905: * @param f Function object to attach
- -: 1906: * @note The function object is limited to a single word of storage
- -: 1907: */
- -: 1908: template
- -: 1909: Callback(const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2) const)) {
- -: 1910: generate(f);
- -: 1911: }
- -: 1912:
- -: 1913: /** Create a Callback with a function object
- -: 1914: * @param f Function object to attach
- -: 1915: * @note The function object is limited to a single word of storage
- -: 1916: */
- -: 1917: template
- -: 1918: Callback(volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2) volatile)) {
- -: 1919: generate(f);
- -: 1920: }
- -: 1921:
- -: 1922: /** Create a Callback with a function object
- -: 1923: * @param f Function object to attach
- -: 1924: * @note The function object is limited to a single word of storage
- -: 1925: */
- -: 1926: template
- -: 1927: Callback(const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2) const volatile)) {
- -: 1928: generate(f);
- -: 1929: }
- -: 1930:
- -: 1931: /** Create a Callback with a static function and bound pointer
- -: 1932: * @param obj Pointer to object to bind to function
- -: 1933: * @param func Static function to attach
- -: 1934: * @deprecated
- -: 1935: * Arguments to callback have been reordered to Callback(func, arg)
- -: 1936: */
- -: 1937: template
- -: 1938: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 1939: "Arguments to callback have been reordered to Callback(func, arg)")
- -: 1940: Callback(U *obj, R (*func)(T*, A0, A1, A2)) {
- -: 1941: new (this) Callback(func, obj);
- -: 1942: }
- -: 1943:
- -: 1944: /** Create a Callback with a static function and bound pointer
- -: 1945: * @param obj Pointer to object to bind to function
- -: 1946: * @param func Static function to attach
- -: 1947: * @deprecated
- -: 1948: * Arguments to callback have been reordered to Callback(func, arg)
- -: 1949: */
- -: 1950: template
- -: 1951: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 1952: "Arguments to callback have been reordered to Callback(func, arg)")
- -: 1953: Callback(const U *obj, R (*func)(const T*, A0, A1, A2)) {
- -: 1954: new (this) Callback(func, obj);
- -: 1955: }
- -: 1956:
- -: 1957: /** Create a Callback with a static function and bound pointer
- -: 1958: * @param obj Pointer to object to bind to function
- -: 1959: * @param func Static function to attach
- -: 1960: * @deprecated
- -: 1961: * Arguments to callback have been reordered to Callback(func, arg)
- -: 1962: */
- -: 1963: template
- -: 1964: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 1965: "Arguments to callback have been reordered to Callback(func, arg)")
- -: 1966: Callback(volatile U *obj, R (*func)(volatile T*, A0, A1, A2)) {
- -: 1967: new (this) Callback(func, obj);
- -: 1968: }
- -: 1969:
- -: 1970: /** Create a Callback with a static function and bound pointer
- -: 1971: * @param obj Pointer to object to bind to function
- -: 1972: * @param func Static function to attach
- -: 1973: * @deprecated
- -: 1974: * Arguments to callback have been reordered to Callback(func, arg)
- -: 1975: */
- -: 1976: template
- -: 1977: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 1978: "Arguments to callback have been reordered to Callback(func, arg)")
- -: 1979: Callback(const volatile U *obj, R (*func)(const volatile T*, A0, A1, A2)) {
- -: 1980: new (this) Callback(func, obj);
- -: 1981: }
- -: 1982:
- -: 1983: /** Destroy a callback
- -: 1984: */
- -: 1985: ~Callback() {
- -: 1986: if (_ops) {
- -: 1987: _ops->dtor(this);
- -: 1988: }
- -: 1989: }
- -: 1990:
- -: 1991: /** Attach a static function
- -: 1992: * @param func Static function to attach
- -: 1993: * @deprecated
- -: 1994: * Replaced by simple assignment 'Callback cb = func'
- -: 1995: */
- -: 1996: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 1997: "Replaced by simple assignment 'Callback cb = func")
- -: 1998: void attach(R (*func)(A0, A1, A2)) {
- -: 1999: this->~Callback();
- -: 2000: new (this) Callback(func);
- -: 2001: }
- -: 2002:
- -: 2003: /** Attach a Callback
- -: 2004: * @param func The Callback to attach
- -: 2005: * @deprecated
- -: 2006: * Replaced by simple assignment 'Callback cb = func'
- -: 2007: */
- -: 2008: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 2009: "Replaced by simple assignment 'Callback cb = func")
- -: 2010: void attach(const Callback &func) {
- -: 2011: this->~Callback();
- -: 2012: new (this) Callback(func);
- -: 2013: }
- -: 2014:
- -: 2015: /** Attach a member function
- -: 2016: * @param obj Pointer to object to invoke member function on
- -: 2017: * @param method Member function to attach
- -: 2018: * @deprecated
- -: 2019: * Replaced by simple assignment 'Callback cb = func'
- -: 2020: */
- -: 2021: template
- -: 2022: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 2023: "Replaced by simple assignment 'Callback cb = func")
- -: 2024: void attach(U *obj, R (T::*method)(A0, A1, A2)) {
- -: 2025: this->~Callback();
- -: 2026: new (this) Callback(obj, method);
- -: 2027: }
- -: 2028:
- -: 2029: /** Attach a member function
- -: 2030: * @param obj Pointer to object to invoke member function on
- -: 2031: * @param method Member function to attach
- -: 2032: * @deprecated
- -: 2033: * Replaced by simple assignment 'Callback cb = func'
- -: 2034: */
- -: 2035: template
- -: 2036: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 2037: "Replaced by simple assignment 'Callback cb = func")
- -: 2038: void attach(const U *obj, R (T::*method)(A0, A1, A2) const) {
- -: 2039: this->~Callback();
- -: 2040: new (this) Callback(obj, method);
- -: 2041: }
- -: 2042:
- -: 2043: /** Attach a member function
- -: 2044: * @param obj Pointer to object to invoke member function on
- -: 2045: * @param method Member function to attach
- -: 2046: * @deprecated
- -: 2047: * Replaced by simple assignment 'Callback cb = func'
- -: 2048: */
- -: 2049: template
- -: 2050: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 2051: "Replaced by simple assignment 'Callback cb = func")
- -: 2052: void attach(volatile U *obj, R (T::*method)(A0, A1, A2) volatile) {
- -: 2053: this->~Callback();
- -: 2054: new (this) Callback(obj, method);
- -: 2055: }
- -: 2056:
- -: 2057: /** Attach a member function
- -: 2058: * @param obj Pointer to object to invoke member function on
- -: 2059: * @param method Member function to attach
- -: 2060: * @deprecated
- -: 2061: * Replaced by simple assignment 'Callback cb = func'
- -: 2062: */
- -: 2063: template
- -: 2064: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 2065: "Replaced by simple assignment 'Callback cb = func")
- -: 2066: void attach(const volatile U *obj, R (T::*method)(A0, A1, A2) const volatile) {
- -: 2067: this->~Callback();
- -: 2068: new (this) Callback(obj, method);
- -: 2069: }
- -: 2070:
- -: 2071: /** Attach a static function with a bound pointer
- -: 2072: * @param func Static function to attach
- -: 2073: * @param arg Pointer argument to function
- -: 2074: * @deprecated
- -: 2075: * Replaced by simple assignment 'Callback cb = func'
- -: 2076: */
- -: 2077: template
- -: 2078: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 2079: "Replaced by simple assignment 'Callback cb = func")
- -: 2080: void attach(R (*func)(T*, A0, A1, A2), U *arg) {
- -: 2081: this->~Callback();
- -: 2082: new (this) Callback(func, arg);
- -: 2083: }
- -: 2084:
- -: 2085: /** Attach a static function with a bound pointer
- -: 2086: * @param func Static function to attach
- -: 2087: * @param arg Pointer argument to function
- -: 2088: * @deprecated
- -: 2089: * Replaced by simple assignment 'Callback cb = func'
- -: 2090: */
- -: 2091: template
- -: 2092: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 2093: "Replaced by simple assignment 'Callback cb = func")
- -: 2094: void attach(R (*func)(const T*, A0, A1, A2), const U *arg) {
- -: 2095: this->~Callback();
- -: 2096: new (this) Callback(func, arg);
- -: 2097: }
- -: 2098:
- -: 2099: /** Attach a static function with a bound pointer
- -: 2100: * @param func Static function to attach
- -: 2101: * @param arg Pointer argument to function
- -: 2102: * @deprecated
- -: 2103: * Replaced by simple assignment 'Callback cb = func'
- -: 2104: */
- -: 2105: template
- -: 2106: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 2107: "Replaced by simple assignment 'Callback cb = func")
- -: 2108: void attach(R (*func)(volatile T*, A0, A1, A2), volatile U *arg) {
- -: 2109: this->~Callback();
- -: 2110: new (this) Callback(func, arg);
- -: 2111: }
- -: 2112:
- -: 2113: /** Attach a static function with a bound pointer
- -: 2114: * @param func Static function to attach
- -: 2115: * @param arg Pointer argument to function
- -: 2116: * @deprecated
- -: 2117: * Replaced by simple assignment 'Callback cb = func'
- -: 2118: */
- -: 2119: template
- -: 2120: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 2121: "Replaced by simple assignment 'Callback cb = func")
- -: 2122: void attach(R (*func)(const volatile T*, A0, A1, A2), const volatile U *arg) {
- -: 2123: this->~Callback();
- -: 2124: new (this) Callback(func, arg);
- -: 2125: }
- -: 2126:
- -: 2127: /** Attach a function object
- -: 2128: * @param f Function object to attach
- -: 2129: * @note The function object is limited to a single word of storage
- -: 2130: * @deprecated
- -: 2131: * Replaced by simple assignment 'Callback cb = func'
- -: 2132: */
- -: 2133: template
- -: 2134: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 2135: "Replaced by simple assignment 'Callback cb = func")
- -: 2136: void attach(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2))) {
- -: 2137: this->~Callback();
- -: 2138: new (this) Callback(f);
- -: 2139: }
- -: 2140:
- -: 2141: /** Attach a function object
- -: 2142: * @param f Function object to attach
- -: 2143: * @note The function object is limited to a single word of storage
- -: 2144: * @deprecated
- -: 2145: * Replaced by simple assignment 'Callback cb = func'
- -: 2146: */
- -: 2147: template
- -: 2148: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 2149: "Replaced by simple assignment 'Callback cb = func")
- -: 2150: void attach(const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2) const)) {
- -: 2151: this->~Callback();
- -: 2152: new (this) Callback(f);
- -: 2153: }
- -: 2154:
- -: 2155: /** Attach a function object
- -: 2156: * @param f Function object to attach
- -: 2157: * @note The function object is limited to a single word of storage
- -: 2158: * @deprecated
- -: 2159: * Replaced by simple assignment 'Callback cb = func'
- -: 2160: */
- -: 2161: template
- -: 2162: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 2163: "Replaced by simple assignment 'Callback cb = func")
- -: 2164: void attach(volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2) volatile)) {
- -: 2165: this->~Callback();
- -: 2166: new (this) Callback(f);
- -: 2167: }
- -: 2168:
- -: 2169: /** Attach a function object
- -: 2170: * @param f Function object to attach
- -: 2171: * @note The function object is limited to a single word of storage
- -: 2172: * @deprecated
- -: 2173: * Replaced by simple assignment 'Callback cb = func'
- -: 2174: */
- -: 2175: template
- -: 2176: MBED_DEPRECATED_SINCE("mbed-os-5.4",
- -: 2177: "Replaced by simple assignment 'Callback cb = func")
- -: 2178: void attach(const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2) const volatile)) {
- -: 2179: this->~Callback();
- -: 2180: new (this) Callback(f);
- -: 2181: }
- -: 2182:
- -: 2183: /** Attach a static function with a bound pointer
- -: 2184: * @param obj Pointer to object to bind to function
- -: 2185: * @param func Static function to attach
- -: 2186: * @deprecated
- -: 2187: * Arguments to callback have been reordered to attach(func, arg)
- -: 2188: */
- -: 2189: template
- -: 2190: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 2191: "Arguments to callback have been reordered to attach(func, arg)")
- -: 2192: void attach(U *obj, R (*func)(T*, A0, A1, A2)) {
- -: 2193: this->~Callback();
- -: 2194: new (this) Callback(func, obj);
- -: 2195: }
- -: 2196:
- -: 2197: /** Attach a static function with a bound pointer
- -: 2198: * @param obj Pointer to object to bind to function
- -: 2199: * @param func Static function to attach
- -: 2200: * @deprecated
- -: 2201: * Arguments to callback have been reordered to attach(func, arg)
- -: 2202: */
- -: 2203: template
- -: 2204: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 2205: "Arguments to callback have been reordered to attach(func, arg)")
- -: 2206: void attach(const U *obj, R (*func)(const T*, A0, A1, A2)) {
- -: 2207: this->~Callback();
- -: 2208: new (this) Callback(func, obj);
- -: 2209: }
- -: 2210:
- -: 2211: /** Attach a static function with a bound pointer
- -: 2212: * @param obj Pointer to object to bind to function
- -: 2213: * @param func Static function to attach
- -: 2214: * @deprecated
- -: 2215: * Arguments to callback have been reordered to attach(func, arg)
- -: 2216: */
- -: 2217: template
- -: 2218: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 2219: "Arguments to callback have been reordered to attach(func, arg)")
- -: 2220: void attach(volatile U *obj, R (*func)(volatile T*, A0, A1, A2)) {
- -: 2221: this->~Callback();
- -: 2222: new (this) Callback(func, obj);
- -: 2223: }
- -: 2224:
- -: 2225: /** Attach a static function with a bound pointer
- -: 2226: * @param obj Pointer to object to bind to function
- -: 2227: * @param func Static function to attach
- -: 2228: * @deprecated
- -: 2229: * Arguments to callback have been reordered to attach(func, arg)
- -: 2230: */
- -: 2231: template
- -: 2232: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 2233: "Arguments to callback have been reordered to attach(func, arg)")
- -: 2234: void attach(const volatile U *obj, R (*func)(const volatile T*, A0, A1, A2)) {
- -: 2235: this->~Callback();
- -: 2236: new (this) Callback(func, obj);
- -: 2237: }
- -: 2238:
- -: 2239: /** Assign a callback
- -: 2240: */
- -: 2241: Callback &operator=(const Callback &that) {
- -: 2242: if (this != &that) {
- -: 2243: this->~Callback();
- -: 2244: new (this) Callback(that);
- -: 2245: }
- -: 2246:
- -: 2247: return *this;
- -: 2248: }
- -: 2249:
- -: 2250: /** Call the attached function
- -: 2251: */
- -: 2252: R call(A0 a0, A1 a1, A2 a2) const {
- -: 2253: MBED_ASSERT(_ops);
- -: 2254: return _ops->call(this, a0, a1, a2);
- -: 2255: }
- -: 2256:
- -: 2257: /** Call the attached function
- -: 2258: */
- -: 2259: R operator()(A0 a0, A1 a1, A2 a2) const {
- -: 2260: return call(a0, a1, a2);
- -: 2261: }
- -: 2262:
- -: 2263: /** Test if function has been attached
- -: 2264: */
- -: 2265: operator bool() const {
- -: 2266: return _ops;
- -: 2267: }
- -: 2268:
- -: 2269: /** Test for equality
- -: 2270: */
- -: 2271: friend bool operator==(const Callback &l, const Callback &r) {
- -: 2272: return memcmp(&l, &r, sizeof(Callback)) == 0;
- -: 2273: }
- -: 2274:
- -: 2275: /** Test for inequality
- -: 2276: */
- -: 2277: friend bool operator!=(const Callback &l, const Callback &r) {
- -: 2278: return !(l == r);
- -: 2279: }
- -: 2280:
- -: 2281: /** Static thunk for passing as C-style function
- -: 2282: * @param func Callback to call passed as void pointer
- -: 2283: * @param a0 An argument to be called with function func
- -: 2284: * @param a1 An argument to be called with function func
- -: 2285: * @param a2 An argument to be called with function func
- -: 2286: * @return the value as determined by func which is of
- -: 2287: * type and determined by the signiture of func
- -: 2288: */
- -: 2289: static R thunk(void *func, A0 a0, A1 a1, A2 a2) {
- -: 2290: return static_cast(func)->call(a0, a1, a2);
- -: 2291: }
- -: 2292:
- -: 2293:private:
- -: 2294: // Stored as pointer to function and pointer to optional object
- -: 2295: // Function pointer is stored as union of possible function types
- -: 2296: // to garuntee proper size and alignment
- -: 2297: struct _class;
- -: 2298: union {
- -: 2299: void (*_staticfunc)(A0, A1, A2);
- -: 2300: void (*_boundfunc)(_class*, A0, A1, A2);
- -: 2301: void (_class::*_methodfunc)(A0, A1, A2);
- -: 2302: } _func;
- -: 2303: void *_obj;
- -: 2304:
- -: 2305: // Dynamically dispatched operations
- -: 2306: const struct ops {
- -: 2307: R (*call)(const void*, A0, A1, A2);
- -: 2308: void (*move)(void*, const void*);
- -: 2309: void (*dtor)(void*);
- -: 2310: } *_ops;
- -: 2311:
- -: 2312: // Generate operations for function object
- -: 2313: template
- -: 2314: void generate(const F &f) {
- -: 2315: static const ops ops = {
- -: 2316: &Callback::function_call,
- -: 2317: &Callback::function_move,
- -: 2318: &Callback::function_dtor,
- -: 2319: };
- -: 2320:
- -: 2321: MBED_STATIC_ASSERT(sizeof(Callback) - sizeof(_ops) >= sizeof(F),
- -: 2322: "Type F must not exceed the size of the Callback class");
- -: 2323: memset(this, 0, sizeof(Callback));
- -: 2324: new (this) F(f);
- -: 2325: _ops = &ops;
- -: 2326: }
- -: 2327:
- -: 2328: // Function attributes
- -: 2329: template
- -: 2330: static R function_call(const void *p, A0 a0, A1 a1, A2 a2) {
- -: 2331: return (*(F*)p)(a0, a1, a2);
- -: 2332: }
- -: 2333:
- -: 2334: template
- -: 2335: static void function_move(void *d, const void *p) {
- -: 2336: new (d) F(*(F*)p);
- -: 2337: }
- -: 2338:
- -: 2339: template
- -: 2340: static void function_dtor(void *p) {
- -: 2341: ((F*)p)->~F();
- -: 2342: }
- -: 2343:
- -: 2344: // Wrappers for functions with context
- -: 2345: template
- -: 2346: struct method_context {
- -: 2347: M method;
- -: 2348: O *obj;
- -: 2349:
- -: 2350: method_context(O *obj, M method)
- -: 2351: : method(method), obj(obj) {}
- -: 2352:
- -: 2353: R operator()(A0 a0, A1 a1, A2 a2) const {
- -: 2354: return (obj->*method)(a0, a1, a2);
- -: 2355: }
- -: 2356: };
- -: 2357:
- -: 2358: template
- -: 2359: struct function_context {
- -: 2360: F func;
- -: 2361: A *arg;
- -: 2362:
- -: 2363: function_context(F func, A *arg)
- -: 2364: : func(func), arg(arg) {}
- -: 2365:
- -: 2366: R operator()(A0 a0, A1 a1, A2 a2) const {
- -: 2367: return func(arg, a0, a1, a2);
- -: 2368: }
- -: 2369: };
- -: 2370:};
- -: 2371:
- -: 2372:/** Callback class based on template specialization
- -: 2373: *
- -: 2374: * @note Synchronization level: Not protected
- -: 2375: */
- -: 2376:template
- -: 2377:class Callback {
- -: 2378:public:
- -: 2379: /** Create a Callback with a static function
- -: 2380: * @param func Static function to attach
- -: 2381: */
- -: 2382: Callback(R (*func)(A0, A1, A2, A3) = 0) {
- -: 2383: if (!func) {
- -: 2384: memset(this, 0, sizeof(Callback));
- -: 2385: } else {
- -: 2386: generate(func);
- -: 2387: }
- -: 2388: }
- -: 2389:
- -: 2390: /** Attach a Callback
- -: 2391: * @param func The Callback to attach
- -: 2392: */
- -: 2393: Callback(const Callback &func) {
- -: 2394: if (func._ops) {
- -: 2395: func._ops->move(this, &func);
- -: 2396: }
- -: 2397: _ops = func._ops;
- -: 2398: }
- -: 2399:
- -: 2400: /** Create a Callback with a member function
- -: 2401: * @param obj Pointer to object to invoke member function on
- -: 2402: * @param method Member function to attach
- -: 2403: */
- -: 2404: template
- -: 2405: Callback(U *obj, R (T::*method)(A0, A1, A2, A3)) {
- -: 2406: generate(method_context(obj, method));
- -: 2407: }
- -: 2408:
- -: 2409: /** Create a Callback with a member function
- -: 2410: * @param obj Pointer to object to invoke member function on
- -: 2411: * @param method Member function to attach
- -: 2412: */
- -: 2413: template
- -: 2414: Callback(const U *obj, R (T::*method)(A0, A1, A2, A3) const) {
- -: 2415: generate(method_context(obj, method));
- -: 2416: }
- -: 2417:
- -: 2418: /** Create a Callback with a member function
- -: 2419: * @param obj Pointer to object to invoke member function on
- -: 2420: * @param method Member function to attach
- -: 2421: */
- -: 2422: template
- -: 2423: Callback(volatile U *obj, R (T::*method)(A0, A1, A2, A3) volatile) {
- -: 2424: generate(method_context(obj, method));
- -: 2425: }
- -: 2426:
- -: 2427: /** Create a Callback with a member function
- -: 2428: * @param obj Pointer to object to invoke member function on
- -: 2429: * @param method Member function to attach
- -: 2430: */
- -: 2431: template
- -: 2432: Callback(const volatile U *obj, R (T::*method)(A0, A1, A2, A3) const volatile) {
- -: 2433: generate(method_context(obj, method));
- -: 2434: }
- -: 2435:
- -: 2436: /** Create a Callback with a static function and bound pointer
- -: 2437: * @param func Static function to attach
- -: 2438: * @param arg Pointer argument to function
- -: 2439: */
- -: 2440: template
- -: 2441: Callback(R (*func)(T*, A0, A1, A2, A3), U *arg) {
- -: 2442: generate(function_context(func, arg));
- -: 2443: }
- -: 2444:
- -: 2445: /** Create a Callback with a static function and bound pointer
- -: 2446: * @param func Static function to attach
- -: 2447: * @param arg Pointer argument to function
- -: 2448: */
- -: 2449: template
- -: 2450: Callback(R (*func)(const T*, A0, A1, A2, A3), const U *arg) {
- -: 2451: generate(function_context(func, arg));
- -: 2452: }
- -: 2453:
- -: 2454: /** Create a Callback with a static function and bound pointer
- -: 2455: * @param func Static function to attach
- -: 2456: * @param arg Pointer argument to function
- -: 2457: */
- -: 2458: template
- -: 2459: Callback(R (*func)(volatile T*, A0, A1, A2, A3), volatile U *arg) {
- -: 2460: generate(function_context(func, arg));
- -: 2461: }
- -: 2462:
- -: 2463: /** Create a Callback with a static function and bound pointer
- -: 2464: * @param func Static function to attach
- -: 2465: * @param arg Pointer argument to function
- -: 2466: */
- -: 2467: template
- -: 2468: Callback(R (*func)(const volatile T*, A0, A1, A2, A3), const volatile U *arg) {
- -: 2469: generate(function_context(func, arg));
- -: 2470: }
- -: 2471:
- -: 2472: /** Create a Callback with a function object
- -: 2473: * @param f Function object to attach
- -: 2474: * @note The function object is limited to a single word of storage
- -: 2475: */
- -: 2476: template
- -: 2477: Callback(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2, A3))) {
- -: 2478: generate(f);
- -: 2479: }
- -: 2480:
- -: 2481: /** Create a Callback with a function object
- -: 2482: * @param f Function object to attach
- -: 2483: * @note The function object is limited to a single word of storage
- -: 2484: */
- -: 2485: template
- -: 2486: Callback(const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2, A3) const)) {
- -: 2487: generate(f);
- -: 2488: }
- -: 2489:
- -: 2490: /** Create a Callback with a function object
- -: 2491: * @param f Function object to attach
- -: 2492: * @note The function object is limited to a single word of storage
- -: 2493: */
- -: 2494: template
- -: 2495: Callback(volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2, A3) volatile)) {
- -: 2496: generate(f);
- -: 2497: }
- -: 2498:
- -: 2499: /** Create a Callback with a function object
- -: 2500: * @param f Function object to attach
- -: 2501: * @note The function object is limited to a single word of storage
- -: 2502: */
- -: 2503: template
- -: 2504: Callback(const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2, A3) const volatile)) {
- -: 2505: generate(f);
- -: 2506: }
- -: 2507:
- -: 2508: /** Create a Callback with a static function and bound pointer
- -: 2509: * @param obj Pointer to object to bind to function
- -: 2510: * @param func Static function to attach
- -: 2511: * @deprecated
- -: 2512: * Arguments to callback have been reordered to Callback(func, arg)
- -: 2513: */
- -: 2514: template
- -: 2515: MBED_DEPRECATED_SINCE("mbed-os-5.1",
- -: 2516: "Arguments to callback have been reordered to Callback(func, arg)")
- -: 2517: Callback(U *obj, R (*func)(T*, A0, A1, A2, A3)) {
- -: 2518: new (this) Callback(func, obj);
- -: 2519: }
- -: 2520:
- -: 2521: /** Create a Callback with a static function and bound pointer
- -: 2522: * @param obj Pointer to object to bind to function
- -: 2523: * @param func Static function to attach
- -: 2524: * @deprecated
- -: 2525: * Arguments to callback have been reordered to Callback(func, arg)
- -: 2526: */
- -: 2527: template