Skip to content

Commit 7c9f9d4

Browse files
Teppo JärvelinAri Parkkila
authored andcommitted
Cellular: Remove target files inheriting from AT_CellularNetwork
After AT_CellularNetwork::has_registration was replaced with CellularProperties and better AT_CellularNetwork::set_access_technology_impl default implementation we can delete most of the target specific classes that inherit AT_CellularNetwork.
1 parent 9a72c22 commit 7c9f9d4

18 files changed

+7
-312
lines changed

UNITTESTS/features/cellular/framework/AT/at_cellularnetwork/at_cellularnetworktest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,8 +472,8 @@ TEST_F(TestAT_CellularNetwork, test_AT_CellularNetwork_scan_plmn)
472472
ATHandler_stub::bool_value = false;
473473
EXPECT_TRUE(NSAPI_ERROR_UNSUPPORTED == cn.set_access_technology(CellularNetwork::RAT_UTRAN));
474474
EXPECT_TRUE(NSAPI_ERROR_OK == cn.scan_plmn(ops, c));
475-
EXPECT_TRUE(c == 0);
476-
EXPECT_TRUE(ops.get_head() == NULL);
475+
EXPECT_TRUE(c == 1);
476+
EXPECT_TRUE(ops.get_head() != NULL);
477477
}
478478

479479
TEST_F(TestAT_CellularNetwork, test_AT_CellularNetwork_set_ciot_optimization_config)

features/cellular/framework/AT/AT_CellularNetwork.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ nsapi_error_t AT_CellularNetwork::detach()
375375

376376
nsapi_error_t AT_CellularNetwork::set_access_technology_impl(RadioAccessTechnology opsAct)
377377
{
378+
_op_act = RAT_UNKNOWN;
378379
return NSAPI_ERROR_UNSUPPORTED;
379380
}
380381

features/cellular/framework/targets/GEMALTO/CINTERION/GEMALTO_CINTERION.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@
1515
* limitations under the License.
1616
*/
1717

18-
#include "GEMALTO_CINTERION_CellularNetwork.h"
1918
#include "GEMALTO_CINTERION_CellularContext.h"
2019
#include "GEMALTO_CINTERION.h"
20+
#include "AT_CellularNetwork.h"
2121
#include "AT_CellularInformation.h"
2222
#include "CellularLog.h"
2323

24-
2524
using namespace mbed;
2625
using namespace events;
2726

@@ -37,11 +36,6 @@ GEMALTO_CINTERION::~GEMALTO_CINTERION()
3736
{
3837
}
3938

40-
AT_CellularNetwork *GEMALTO_CINTERION::open_network_impl(ATHandler &at)
41-
{
42-
return new GEMALTO_CINTERION_CellularNetwork(at);
43-
}
44-
4539
AT_CellularContext *GEMALTO_CINTERION::create_context_impl(ATHandler &at, const char *apn)
4640
{
4741
return new GEMALTO_CINTERION_CellularContext(at, this, apn);

features/cellular/framework/targets/GEMALTO/CINTERION/GEMALTO_CINTERION.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class GEMALTO_CINTERION : public AT_CellularDevice {
4040
static Module get_module();
4141

4242
protected: // AT_CellularDevice
43-
virtual AT_CellularNetwork *open_network_impl(ATHandler &at);
4443
virtual AT_CellularContext *create_context_impl(ATHandler &at, const char *apn);
4544
protected:
4645
virtual uint16_t get_send_delay() const;

features/cellular/framework/targets/GEMALTO/CINTERION/GEMALTO_CINTERION_CellularNetwork.cpp

Lines changed: 0 additions & 34 deletions
This file was deleted.

features/cellular/framework/targets/GEMALTO/CINTERION/GEMALTO_CINTERION_CellularNetwork.h

Lines changed: 0 additions & 36 deletions
This file was deleted.

features/cellular/framework/targets/QUECTEL/UG96/QUECTEL_UG96.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
*/
1717

1818
#include "QUECTEL_UG96.h"
19-
#include "QUECTEL_UG96_CellularNetwork.h"
2019
#include "QUECTEL_UG96_CellularPower.h"
2120
#include "QUECTEL_UG96_CellularContext.h"
21+
#include "AT_CellularNetwork.h"
2222

2323
using namespace mbed;
2424
using namespace events;
@@ -45,11 +45,6 @@ QUECTEL_UG96::~QUECTEL_UG96()
4545
{
4646
}
4747

48-
AT_CellularNetwork *QUECTEL_UG96::open_network_impl(ATHandler &at)
49-
{
50-
return new QUECTEL_UG96_CellularNetwork(at);
51-
}
52-
5348
AT_CellularPower *QUECTEL_UG96::open_power_impl(ATHandler &at)
5449
{
5550
return new QUECTEL_UG96_CellularPower(at);

features/cellular/framework/targets/QUECTEL/UG96/QUECTEL_UG96.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,11 @@ class QUECTEL_UG96 : public AT_CellularDevice {
3636
virtual ~QUECTEL_UG96();
3737

3838
protected: // AT_CellularDevice
39-
virtual AT_CellularNetwork *open_network_impl(ATHandler &at);
4039
virtual AT_CellularPower *open_power_impl(ATHandler &at);
4140
virtual AT_CellularContext *create_context_impl(ATHandler &at, const char *apn);
4241

4342
public: // NetworkInterface
4443
void handle_urc(FileHandle *fh);
45-
4644
};
4745

4846
} // namespace mbed

features/cellular/framework/targets/QUECTEL/UG96/QUECTEL_UG96_CellularNetwork.cpp

Lines changed: 0 additions & 34 deletions
This file was deleted.

features/cellular/framework/targets/QUECTEL/UG96/QUECTEL_UG96_CellularNetwork.h

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)