Skip to content

Commit e30c20b

Browse files
Teppo Järvelin0xc0170
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 f76b21c commit e30c20b

18 files changed

+6
-313
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: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@
1515
* limitations under the License.
1616
*/
1717

18-
#include "GEMALTO_CINTERION_CellularNetwork.h"
1918
#include "GEMALTO_CINTERION_Module.h"
2019
#include "GEMALTO_CINTERION_CellularContext.h"
2120
#include "GEMALTO_CINTERION.h"
2221
#include "AT_CellularInformation.h"
2322
#include "CellularLog.h"
2423

25-
2624
using namespace mbed;
2725
using namespace events;
2826

@@ -36,11 +34,6 @@ GEMALTO_CINTERION::~GEMALTO_CINTERION()
3634
{
3735
}
3836

39-
AT_CellularNetwork *GEMALTO_CINTERION::open_network_impl(ATHandler &at)
40-
{
41-
return new GEMALTO_CINTERION_CellularNetwork(at);
42-
}
43-
4437
AT_CellularContext *GEMALTO_CINTERION::create_context_impl(ATHandler &at, const char *apn)
4538
{
4639
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
@@ -29,7 +29,6 @@ class GEMALTO_CINTERION : public AT_CellularDevice {
2929
virtual ~GEMALTO_CINTERION();
3030

3131
protected: // AT_CellularDevice
32-
virtual AT_CellularNetwork *open_network_impl(ATHandler &at);
3332
virtual AT_CellularContext *create_context_impl(ATHandler &at, const char *apn);
3433
protected:
3534
virtual uint16_t get_send_delay() const;

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

Lines changed: 0 additions & 35 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.

features/cellular/framework/targets/TELIT/HE910/TELIT_HE910.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
#include "TELIT_HE910.h"
1919
#include "TELIT_HE910_CellularPower.h"
20-
#include "TELIT_HE910_CellularNetwork.h"
2120
#include "TELIT_HE910_CellularContext.h"
21+
#include "AT_CellularNetwork.h"
2222

2323
using namespace mbed;
2424
using namespace events;
@@ -41,11 +41,6 @@ TELIT_HE910::~TELIT_HE910()
4141
{
4242
}
4343

44-
AT_CellularNetwork *TELIT_HE910::open_network_impl(ATHandler &at)
45-
{
46-
return new TELIT_HE910_CellularNetwork(at);
47-
}
48-
4944
AT_CellularPower *TELIT_HE910::open_power_impl(ATHandler &at)
5045
{
5146
return new TELIT_HE910_CellularPower(at);

features/cellular/framework/targets/TELIT/HE910/TELIT_HE910.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ class TELIT_HE910 : public AT_CellularDevice {
3131
virtual ~TELIT_HE910();
3232

3333
protected: // AT_CellularDevice
34-
virtual AT_CellularNetwork *open_network_impl(ATHandler &at);
3534
virtual AT_CellularPower *open_power_impl(ATHandler &at);
3635
virtual AT_CellularContext *create_context_impl(ATHandler &at, const char *apn);
3736
virtual uint16_t get_send_delay() const;

features/cellular/framework/targets/TELIT/HE910/TELIT_HE910_CellularNetwork.cpp

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

features/cellular/framework/targets/TELIT/HE910/TELIT_HE910_CellularNetwork.h

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

features/cellular/framework/targets/UBLOX/PPP/UBLOX_PPP.cpp

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

1818
#include "UBLOX_PPP.h"
19-
#include "UBLOX_PPP_CellularNetwork.h"
2019
#include "UBLOX_PPP_CellularPower.h"
2120
#include "UBLOX_PPP_CellularContext.h"
21+
#include "AT_CellularNetwork.h"
2222

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

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

features/cellular/framework/targets/UBLOX/PPP/UBLOX_PPP.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ class UBLOX_PPP : public AT_CellularDevice {
2828
virtual ~UBLOX_PPP();
2929

3030
protected: // AT_CellularDevice
31-
virtual AT_CellularNetwork *open_network_impl(ATHandler &at);
3231
virtual AT_CellularPower *open_power_impl(ATHandler &at);
3332
virtual AT_CellularContext *create_context_impl(ATHandler &at, const char *apn);
3433
};

0 commit comments

Comments
 (0)