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.
pull/9472/head
Teppo Järvelin 2018-12-12 15:24:26 +02:00 committed by Ari Parkkila
parent 9a72c221d8
commit 7c9f9d47ec
18 changed files with 7 additions and 312 deletions

View File

@ -472,8 +472,8 @@ TEST_F(TestAT_CellularNetwork, test_AT_CellularNetwork_scan_plmn)
ATHandler_stub::bool_value = false;
EXPECT_TRUE(NSAPI_ERROR_UNSUPPORTED == cn.set_access_technology(CellularNetwork::RAT_UTRAN));
EXPECT_TRUE(NSAPI_ERROR_OK == cn.scan_plmn(ops, c));
EXPECT_TRUE(c == 0);
EXPECT_TRUE(ops.get_head() == NULL);
EXPECT_TRUE(c == 1);
EXPECT_TRUE(ops.get_head() != NULL);
}
TEST_F(TestAT_CellularNetwork, test_AT_CellularNetwork_set_ciot_optimization_config)

View File

@ -375,6 +375,7 @@ nsapi_error_t AT_CellularNetwork::detach()
nsapi_error_t AT_CellularNetwork::set_access_technology_impl(RadioAccessTechnology opsAct)
{
_op_act = RAT_UNKNOWN;
return NSAPI_ERROR_UNSUPPORTED;
}

View File

@ -15,13 +15,12 @@
* limitations under the License.
*/
#include "GEMALTO_CINTERION_CellularNetwork.h"
#include "GEMALTO_CINTERION_CellularContext.h"
#include "GEMALTO_CINTERION.h"
#include "AT_CellularNetwork.h"
#include "AT_CellularInformation.h"
#include "CellularLog.h"
using namespace mbed;
using namespace events;
@ -37,11 +36,6 @@ GEMALTO_CINTERION::~GEMALTO_CINTERION()
{
}
AT_CellularNetwork *GEMALTO_CINTERION::open_network_impl(ATHandler &at)
{
return new GEMALTO_CINTERION_CellularNetwork(at);
}
AT_CellularContext *GEMALTO_CINTERION::create_context_impl(ATHandler &at, const char *apn)
{
return new GEMALTO_CINTERION_CellularContext(at, this, apn);

View File

@ -40,7 +40,6 @@ public:
static Module get_module();
protected: // AT_CellularDevice
virtual AT_CellularNetwork *open_network_impl(ATHandler &at);
virtual AT_CellularContext *create_context_impl(ATHandler &at, const char *apn);
protected:
virtual uint16_t get_send_delay() const;

View File

@ -1,34 +0,0 @@
/*
* Copyright (c) 2018, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "GEMALTO_CINTERION_CellularNetwork.h"
using namespace mbed;
GEMALTO_CINTERION_CellularNetwork::GEMALTO_CINTERION_CellularNetwork(ATHandler &atHandler) : AT_CellularNetwork(atHandler)
{
}
GEMALTO_CINTERION_CellularNetwork::~GEMALTO_CINTERION_CellularNetwork()
{
}
nsapi_error_t GEMALTO_CINTERION_CellularNetwork::set_access_technology_impl(RadioAccessTechnology opsAct)
{
_op_act = RAT_UNKNOWN;
return NSAPI_ERROR_UNSUPPORTED;
}

View File

@ -1,36 +0,0 @@
/*
* Copyright (c) 2018, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef GEMALTO_CINTERION_CELLULAR_NETWORK_H_
#define GEMALTO_CINTERION_CELLULAR_NETWORK_H_
#include "AT_CellularNetwork.h"
namespace mbed {
class GEMALTO_CINTERION_CellularNetwork : public AT_CellularNetwork {
public:
GEMALTO_CINTERION_CellularNetwork(ATHandler &atHandler);
virtual ~GEMALTO_CINTERION_CellularNetwork();
protected:
virtual nsapi_error_t set_access_technology_impl(RadioAccessTechnology opsAct);
};
} // namespace mbed
#endif // GEMALTO_CINTERION_CELLULAR_NETWORK_H_

View File

@ -16,9 +16,9 @@
*/
#include "QUECTEL_UG96.h"
#include "QUECTEL_UG96_CellularNetwork.h"
#include "QUECTEL_UG96_CellularPower.h"
#include "QUECTEL_UG96_CellularContext.h"
#include "AT_CellularNetwork.h"
using namespace mbed;
using namespace events;
@ -45,11 +45,6 @@ QUECTEL_UG96::~QUECTEL_UG96()
{
}
AT_CellularNetwork *QUECTEL_UG96::open_network_impl(ATHandler &at)
{
return new QUECTEL_UG96_CellularNetwork(at);
}
AT_CellularPower *QUECTEL_UG96::open_power_impl(ATHandler &at)
{
return new QUECTEL_UG96_CellularPower(at);

View File

@ -36,13 +36,11 @@ public:
virtual ~QUECTEL_UG96();
protected: // AT_CellularDevice
virtual AT_CellularNetwork *open_network_impl(ATHandler &at);
virtual AT_CellularPower *open_power_impl(ATHandler &at);
virtual AT_CellularContext *create_context_impl(ATHandler &at, const char *apn);
public: // NetworkInterface
void handle_urc(FileHandle *fh);
};
} // namespace mbed

View File

@ -1,34 +0,0 @@
/*
* Copyright (c) 2018, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "QUECTEL_UG96_CellularNetwork.h"
using namespace mbed;
QUECTEL_UG96_CellularNetwork::QUECTEL_UG96_CellularNetwork(ATHandler &atHandler) : AT_CellularNetwork(atHandler)
{
}
QUECTEL_UG96_CellularNetwork::~QUECTEL_UG96_CellularNetwork()
{
}
nsapi_error_t QUECTEL_UG96_CellularNetwork::set_access_technology_impl(RadioAccessTechnology opRat)
{
_op_act = RAT_UNKNOWN;
return NSAPI_ERROR_UNSUPPORTED;
}

View File

@ -1,36 +0,0 @@
/*
* Copyright (c) 2018, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef QUECTEL_UG96_CELLULAR_NETWORK_H_
#define QUECTEL_UG96_CELLULAR_NETWORK_H_
#include "AT_CellularNetwork.h"
namespace mbed {
class QUECTEL_UG96_CellularNetwork : public AT_CellularNetwork {
public:
QUECTEL_UG96_CellularNetwork(ATHandler &atHandler);
virtual ~QUECTEL_UG96_CellularNetwork();
protected:
virtual nsapi_error_t set_access_technology_impl(RadioAccessTechnology opRat);
};
} // namespace mbed
#endif // QUECTEL_UG96_CELLULAR_NETWORK_H_

View File

@ -17,8 +17,8 @@
#include "TELIT_HE910.h"
#include "TELIT_HE910_CellularPower.h"
#include "TELIT_HE910_CellularNetwork.h"
#include "TELIT_HE910_CellularContext.h"
#include "AT_CellularNetwork.h"
using namespace mbed;
using namespace events;
@ -41,11 +41,6 @@ TELIT_HE910::~TELIT_HE910()
{
}
AT_CellularNetwork *TELIT_HE910::open_network_impl(ATHandler &at)
{
return new TELIT_HE910_CellularNetwork(at);
}
AT_CellularPower *TELIT_HE910::open_power_impl(ATHandler &at)
{
return new TELIT_HE910_CellularPower(at);

View File

@ -31,7 +31,6 @@ public:
virtual ~TELIT_HE910();
protected: // AT_CellularDevice
virtual AT_CellularNetwork *open_network_impl(ATHandler &at);
virtual AT_CellularPower *open_power_impl(ATHandler &at);
virtual AT_CellularContext *create_context_impl(ATHandler &at, const char *apn);
virtual uint16_t get_send_delay() const;

View File

@ -1,34 +0,0 @@
/*
* Copyright (c) 2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "TELIT_HE910_CellularNetwork.h"
using namespace mbed;
TELIT_HE910_CellularNetwork::TELIT_HE910_CellularNetwork(ATHandler &atHandler) : AT_CellularNetwork(atHandler)
{
}
TELIT_HE910_CellularNetwork::~TELIT_HE910_CellularNetwork()
{
}
nsapi_error_t TELIT_HE910_CellularNetwork::set_access_technology_impl(RadioAccessTechnology opRat)
{
_op_act = RAT_UNKNOWN;
return NSAPI_ERROR_UNSUPPORTED;
}

View File

@ -1,36 +0,0 @@
/*
* Copyright (c) 2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef TELIT_HE910_CELLULAR_NETWORK_H_
#define TELIT_HE910_CELLULAR_NETWORK_H_
#include "AT_CellularNetwork.h"
namespace mbed {
class TELIT_HE910_CellularNetwork : public AT_CellularNetwork {
public:
TELIT_HE910_CellularNetwork(ATHandler &atHandler);
virtual ~TELIT_HE910_CellularNetwork();
protected:
virtual nsapi_error_t set_access_technology_impl(RadioAccessTechnology opRat);
};
} // namespace mbed
#endif // TELIT_HE910_CELLULAR_NETWORK_H_

View File

@ -16,9 +16,9 @@
*/
#include "UBLOX_PPP.h"
#include "UBLOX_PPP_CellularNetwork.h"
#include "UBLOX_PPP_CellularPower.h"
#include "UBLOX_PPP_CellularContext.h"
#include "AT_CellularNetwork.h"
using namespace mbed;
using namespace events;
@ -45,11 +45,6 @@ UBLOX_PPP::~UBLOX_PPP()
{
}
AT_CellularNetwork *UBLOX_PPP::open_network_impl(ATHandler &at)
{
return new UBLOX_PPP_CellularNetwork(at);
}
AT_CellularPower *UBLOX_PPP::open_power_impl(ATHandler &at)
{
return new UBLOX_PPP_CellularPower(at);

View File

@ -28,7 +28,6 @@ public:
virtual ~UBLOX_PPP();
protected: // AT_CellularDevice
virtual AT_CellularNetwork *open_network_impl(ATHandler &at);
virtual AT_CellularPower *open_power_impl(ATHandler &at);
virtual AT_CellularContext *create_context_impl(ATHandler &at, const char *apn);
};

View File

@ -1,34 +0,0 @@
/*
* Copyright (c) 2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "UBLOX_PPP_CellularNetwork.h"
using namespace mbed;
UBLOX_PPP_CellularNetwork::UBLOX_PPP_CellularNetwork(ATHandler &atHandler) : AT_CellularNetwork(atHandler)
{
}
UBLOX_PPP_CellularNetwork::~UBLOX_PPP_CellularNetwork()
{
}
nsapi_error_t UBLOX_PPP_CellularNetwork::set_access_technology_impl(RadioAccessTechnology opRat)
{
_op_act = RAT_UNKNOWN;
return NSAPI_ERROR_UNSUPPORTED;
}

View File

@ -1,36 +0,0 @@
/*
* Copyright (c) 2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef UBLOX_PPP_CELLULAR_NETWORK_H_
#define UBLOX_PPP_CELLULAR_NETWORK_H_
#include "AT_CellularNetwork.h"
namespace mbed {
class UBLOX_PPP_CellularNetwork : public AT_CellularNetwork {
public:
UBLOX_PPP_CellularNetwork(ATHandler &atHandler);
virtual ~UBLOX_PPP_CellularNetwork();
protected:
virtual nsapi_error_t set_access_technology_impl(RadioAccessTechnology opRat);
};
} // namespace mbed
#endif // UBLOX_PPP_CELLULAR_NETWORK_H_