Skip to content

Commit 0905f01

Browse files
author
Teppo Järvelin
committed
Cellular: Removed API get_connection_status() from CellularNetwork
This was left accidentally after refactoring. It wasn't giving correct states after refactoring. CellularContext::get_connection_status should be used instead.
1 parent ec73c8a commit 0905f01

File tree

5 files changed

+0
-32
lines changed

5 files changed

+0
-32
lines changed

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

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -653,20 +653,6 @@ TEST_F(TestAT_CellularNetwork, test_AT_CellularNetwork_attach)
653653
cn.attach(&network_cb);
654654
}
655655

656-
TEST_F(TestAT_CellularNetwork, test_get_connection_status)
657-
{
658-
EventQueue que;
659-
FileHandle_stub fh1;
660-
ATHandler at(&fh1, que, 0, ",");
661-
662-
AT_CellularNetwork cn(at);
663-
664-
ATHandler_stub::nsapi_error_value = NSAPI_ERROR_OK;
665-
network_cb_count = 0;
666-
cn.attach(&network_cb);
667-
EXPECT_TRUE(NSAPI_STATUS_DISCONNECTED == cn.get_connection_status());
668-
}
669-
670656
TEST_F(TestAT_CellularNetwork, test_AT_CellularNetwork_set_receive_period)
671657
{
672658
EventQueue que;

UNITTESTS/stubs/AT_CellularNetwork_stub.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@ void AT_CellularNetwork::attach(Callback<void(nsapi_event_t, intptr_t)> status_c
4444
{
4545
}
4646

47-
nsapi_connection_status_t AT_CellularNetwork::get_connection_status() const
48-
{
49-
return NSAPI_STATUS_LOCAL_UP;
50-
}
51-
5247
nsapi_error_t AT_CellularNetwork::set_registration_urc(RegistrationType type, bool urc_on)
5348
{
5449
if (AT_CellularNetwork_stub::set_registration_urc_fail_counter) {

features/cellular/framework/API/CellularNetwork.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -327,12 +327,6 @@ class CellularNetwork {
327327
*/
328328
virtual void attach(mbed::Callback<void(nsapi_event_t, intptr_t)> status_cb) = 0;
329329

330-
/** Get the connection status
331-
*
332-
* @return The connection status according to ConnectionStatusType
333-
*/
334-
virtual nsapi_connection_status_t get_connection_status() const = 0;
335-
336330
/** Read operator names
337331
*
338332
* @param op_names on successful return contains linked list of operator names.

features/cellular/framework/AT/AT_CellularNetwork.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,6 @@ void AT_CellularNetwork::attach(Callback<void(nsapi_event_t, intptr_t)> status_c
210210
_connection_status_cb = status_cb;
211211
}
212212

213-
nsapi_connection_status_t AT_CellularNetwork::get_connection_status() const
214-
{
215-
return _connect_status;
216-
}
217-
218213
nsapi_error_t AT_CellularNetwork::set_registration_urc(RegistrationType type, bool urc_on)
219214
{
220215
int index = (int)type;

features/cellular/framework/AT/AT_CellularNetwork.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ class AT_CellularNetwork : public CellularNetwork, public AT_CellularBase {
6363

6464
virtual void attach(Callback<void(nsapi_event_t, intptr_t)> status_cb);
6565

66-
virtual nsapi_connection_status_t get_connection_status() const;
67-
6866
virtual nsapi_error_t set_access_technology(RadioAccessTechnology rat);
6967

7068
virtual nsapi_error_t scan_plmn(operList_t &operators, int &ops_count);

0 commit comments

Comments
 (0)