From eb806b681d0d9b7c5d97230822db8eacd632e35f Mon Sep 17 00:00:00 2001 From: mudassar-ublox Date: Tue, 20 Mar 2018 12:03:42 +0500 Subject: [PATCH] Renaming Ublox library for mbed cellular framework (cherry picked from commit 737609736591d12ea369d5b364d132e7a6367ae2) --- .../framework/common/CellularTargets.h | 4 ++-- .../UBLOX_LISA_U.cpp => PPP/UBLOX_PPP.cpp} | 18 +++++++++--------- .../{LISA_U/UBLOX_LISA_U.h => PPP/UBLOX_PPP.h} | 12 ++++++------ .../UBLOX_PPP_CellularNetwork.cpp} | 12 ++++++------ .../UBLOX_PPP_CellularNetwork.h} | 12 ++++++------ .../UBLOX_PPP_CellularPower.cpp} | 10 +++++----- .../UBLOX_PPP_CellularPower.h} | 12 ++++++------ 7 files changed, 40 insertions(+), 40 deletions(-) rename features/cellular/framework/targets/UBLOX/{LISA_U/UBLOX_LISA_U.cpp => PPP/UBLOX_PPP.cpp} (63%) rename features/cellular/framework/targets/UBLOX/{LISA_U/UBLOX_LISA_U.h => PPP/UBLOX_PPP.h} (82%) rename features/cellular/framework/targets/UBLOX/{LISA_U/UBLOX_LISA_U_CellularNetwork.cpp => PPP/UBLOX_PPP_CellularNetwork.cpp} (64%) rename features/cellular/framework/targets/UBLOX/{LISA_U/UBLOX_LISA_U_CellularNetwork.h => PPP/UBLOX_PPP_CellularNetwork.h} (77%) rename features/cellular/framework/targets/UBLOX/{LISA_U/UBLOX_LISA_U_CellularPower.cpp => PPP/UBLOX_PPP_CellularPower.cpp} (75%) rename features/cellular/framework/targets/UBLOX/{LISA_U/UBLOX_LISA_U_CellularPower.h => PPP/UBLOX_PPP_CellularPower.h} (75%) diff --git a/features/cellular/framework/common/CellularTargets.h b/features/cellular/framework/common/CellularTargets.h index f683bd4301..bb5f427107 100644 --- a/features/cellular/framework/common/CellularTargets.h +++ b/features/cellular/framework/common/CellularTargets.h @@ -28,9 +28,9 @@ namespace mbed { #elif TARGET_MTB_MTS_DRAGONFLY #define CELLULAR_DEVICE TELIT_HE910 #elif TARGET_UBLOX_C030 -#define CELLULAR_DEVICE UBLOX_LISA_U +#define CELLULAR_DEVICE UBLOX_PPP #elif TARGET_UBLOX_C027 -#define CELLULAR_DEVICE UBLOX_LISA_U +#define CELLULAR_DEVICE UBLOX_PPP #else //#error Cellular target not defined, see cellular/targets.h //#define CELLULAR_TARGET diff --git a/features/cellular/framework/targets/UBLOX/LISA_U/UBLOX_LISA_U.cpp b/features/cellular/framework/targets/UBLOX/PPP/UBLOX_PPP.cpp similarity index 63% rename from features/cellular/framework/targets/UBLOX/LISA_U/UBLOX_LISA_U.cpp rename to features/cellular/framework/targets/UBLOX/PPP/UBLOX_PPP.cpp index 50310ca9d1..813358e0d6 100644 --- a/features/cellular/framework/targets/UBLOX/LISA_U/UBLOX_LISA_U.cpp +++ b/features/cellular/framework/targets/UBLOX/PPP/UBLOX_PPP.cpp @@ -15,33 +15,33 @@ * limitations under the License. */ -#include "UBLOX_LISA_U.h" -#include "UBLOX_LISA_U_CellularNetwork.h" -#include "UBLOX_LISA_U_CellularPower.h" +#include "UBLOX_PPP.h" +#include "UBLOX_PPP_CellularNetwork.h" +#include "UBLOX_PPP_CellularPower.h" using namespace mbed; using namespace events; -UBLOX_LISA_U::UBLOX_LISA_U(EventQueue &queue) : AT_CellularDevice(queue) +UBLOX_PPP::UBLOX_PPP(EventQueue &queue) : AT_CellularDevice(queue) { } -UBLOX_LISA_U::~UBLOX_LISA_U() +UBLOX_PPP::~UBLOX_PPP() { } -CellularNetwork *UBLOX_LISA_U::open_network(FileHandle *fh) +CellularNetwork *UBLOX_PPP::open_network(FileHandle *fh) { if (!_network) { - _network = new UBLOX_LISA_U_CellularNetwork(*get_at_handler(fh)); + _network = new UBLOX_PPP_CellularNetwork(*get_at_handler(fh)); } return _network; } -CellularPower *UBLOX_LISA_U::open_power(FileHandle *fh) +CellularPower *UBLOX_PPP::open_power(FileHandle *fh) { if (!_power) { - _power = new UBLOX_LISA_U_CellularPower(*get_at_handler(fh)); + _power = new UBLOX_PPP_CellularPower(*get_at_handler(fh)); } return _power; } diff --git a/features/cellular/framework/targets/UBLOX/LISA_U/UBLOX_LISA_U.h b/features/cellular/framework/targets/UBLOX/PPP/UBLOX_PPP.h similarity index 82% rename from features/cellular/framework/targets/UBLOX/LISA_U/UBLOX_LISA_U.h rename to features/cellular/framework/targets/UBLOX/PPP/UBLOX_PPP.h index eedd88d831..235d3ac844 100644 --- a/features/cellular/framework/targets/UBLOX/LISA_U/UBLOX_LISA_U.h +++ b/features/cellular/framework/targets/UBLOX/PPP/UBLOX_PPP.h @@ -15,19 +15,19 @@ * limitations under the License. */ -#ifndef UBLOX_LISA_U_H_ -#define UBLOX_LISA_U_H_ +#ifndef UBLOX_PPP_H_ +#define UBLOX_PPP_H_ #include "AT_CellularDevice.h" namespace mbed { -class UBLOX_LISA_U : public AT_CellularDevice +class UBLOX_PPP : public AT_CellularDevice { public: - UBLOX_LISA_U(events::EventQueue &queue); - virtual ~UBLOX_LISA_U(); + UBLOX_PPP(events::EventQueue &queue); + virtual ~UBLOX_PPP(); public: // CellularDevice virtual CellularNetwork *open_network(FileHandle *fh); @@ -36,4 +36,4 @@ public: // CellularDevice } // namespace mbed -#endif // UBLOX_LISA_U_H_ +#endif // UBLOX_PPP_H_ diff --git a/features/cellular/framework/targets/UBLOX/LISA_U/UBLOX_LISA_U_CellularNetwork.cpp b/features/cellular/framework/targets/UBLOX/PPP/UBLOX_PPP_CellularNetwork.cpp similarity index 64% rename from features/cellular/framework/targets/UBLOX/LISA_U/UBLOX_LISA_U_CellularNetwork.cpp rename to features/cellular/framework/targets/UBLOX/PPP/UBLOX_PPP_CellularNetwork.cpp index b48910cee2..5df5c5f5e9 100644 --- a/features/cellular/framework/targets/UBLOX/LISA_U/UBLOX_LISA_U_CellularNetwork.cpp +++ b/features/cellular/framework/targets/UBLOX/PPP/UBLOX_PPP_CellularNetwork.cpp @@ -15,29 +15,29 @@ * limitations under the License. */ -#include "UBLOX_LISA_U_CellularNetwork.h" +#include "UBLOX_PPP_CellularNetwork.h" using namespace mbed; -UBLOX_LISA_U_CellularNetwork::UBLOX_LISA_U_CellularNetwork(ATHandler &atHandler) : AT_CellularNetwork(atHandler) +UBLOX_PPP_CellularNetwork::UBLOX_PPP_CellularNetwork(ATHandler &atHandler) : AT_CellularNetwork(atHandler) { } -UBLOX_LISA_U_CellularNetwork::~UBLOX_LISA_U_CellularNetwork() +UBLOX_PPP_CellularNetwork::~UBLOX_PPP_CellularNetwork() { } -bool UBLOX_LISA_U_CellularNetwork::get_modem_stack_type(nsapi_ip_stack_t requested_stack) +bool UBLOX_PPP_CellularNetwork::get_modem_stack_type(nsapi_ip_stack_t requested_stack) { return requested_stack == IPV4_STACK ? true : false; } -bool UBLOX_LISA_U_CellularNetwork::has_registration(RegistrationType reg_type) +bool UBLOX_PPP_CellularNetwork::has_registration(RegistrationType reg_type) { return (reg_type == C_REG || reg_type == C_GREG); } -nsapi_error_t UBLOX_LISA_U_CellularNetwork::set_access_technology_impl(operator_t::RadioAccessTechnology opRat) +nsapi_error_t UBLOX_PPP_CellularNetwork::set_access_technology_impl(operator_t::RadioAccessTechnology opRat) { _op_act = operator_t::RAT_UNKNOWN; return NSAPI_ERROR_UNSUPPORTED; diff --git a/features/cellular/framework/targets/UBLOX/LISA_U/UBLOX_LISA_U_CellularNetwork.h b/features/cellular/framework/targets/UBLOX/PPP/UBLOX_PPP_CellularNetwork.h similarity index 77% rename from features/cellular/framework/targets/UBLOX/LISA_U/UBLOX_LISA_U_CellularNetwork.h rename to features/cellular/framework/targets/UBLOX/PPP/UBLOX_PPP_CellularNetwork.h index d7dfa1bf91..cb5615aef0 100644 --- a/features/cellular/framework/targets/UBLOX/LISA_U/UBLOX_LISA_U_CellularNetwork.h +++ b/features/cellular/framework/targets/UBLOX/PPP/UBLOX_PPP_CellularNetwork.h @@ -15,18 +15,18 @@ * limitations under the License. */ -#ifndef UBLOX_LISA_U_CELLULAR_NETWORK_H_ -#define UBLOX_LISA_U_CELLULAR_NETWORK_H_ +#ifndef UBLOX_PPP_CELLULAR_NETWORK_H_ +#define UBLOX_PPP_CELLULAR_NETWORK_H_ #include "AT_CellularNetwork.h" namespace mbed { -class UBLOX_LISA_U_CellularNetwork : public AT_CellularNetwork +class UBLOX_PPP_CellularNetwork : public AT_CellularNetwork { public: - UBLOX_LISA_U_CellularNetwork(ATHandler &atHandler); - virtual ~UBLOX_LISA_U_CellularNetwork(); + UBLOX_PPP_CellularNetwork(ATHandler &atHandler); + virtual ~UBLOX_PPP_CellularNetwork(); protected: virtual bool get_modem_stack_type(nsapi_ip_stack_t requested_stack); @@ -38,4 +38,4 @@ protected: } // namespace mbed -#endif // UBLOX_LISA_U_CELLULAR_NETWORK_H_ +#endif // UBLOX_PPP_CELLULAR_NETWORK_H_ diff --git a/features/cellular/framework/targets/UBLOX/LISA_U/UBLOX_LISA_U_CellularPower.cpp b/features/cellular/framework/targets/UBLOX/PPP/UBLOX_PPP_CellularPower.cpp similarity index 75% rename from features/cellular/framework/targets/UBLOX/LISA_U/UBLOX_LISA_U_CellularPower.cpp rename to features/cellular/framework/targets/UBLOX/PPP/UBLOX_PPP_CellularPower.cpp index 984c7f1209..8cb78aab2f 100644 --- a/features/cellular/framework/targets/UBLOX/LISA_U/UBLOX_LISA_U_CellularPower.cpp +++ b/features/cellular/framework/targets/UBLOX/PPP/UBLOX_PPP_CellularPower.cpp @@ -15,23 +15,23 @@ * limitations under the License. */ -#include "UBLOX_LISA_U_CellularPower.h" +#include "UBLOX_PPP_CellularPower.h" #include "onboard_modem_api.h" using namespace mbed; -UBLOX_LISA_U_CellularPower::UBLOX_LISA_U_CellularPower(ATHandler &atHandler) : AT_CellularPower(atHandler) +UBLOX_PPP_CellularPower::UBLOX_PPP_CellularPower(ATHandler &atHandler) : AT_CellularPower(atHandler) { } -UBLOX_LISA_U_CellularPower::~UBLOX_LISA_U_CellularPower() +UBLOX_PPP_CellularPower::~UBLOX_PPP_CellularPower() { } -nsapi_error_t UBLOX_LISA_U_CellularPower::on() +nsapi_error_t UBLOX_PPP_CellularPower::on() { #if MODEM_ON_BOARD ::onboard_modem_init(); @@ -40,7 +40,7 @@ nsapi_error_t UBLOX_LISA_U_CellularPower::on() return NSAPI_ERROR_OK; } -nsapi_error_t UBLOX_LISA_U_CellularPower::off() +nsapi_error_t UBLOX_PPP_CellularPower::off() { #if MODEM_ON_BOARD ::onboard_modem_power_down(); diff --git a/features/cellular/framework/targets/UBLOX/LISA_U/UBLOX_LISA_U_CellularPower.h b/features/cellular/framework/targets/UBLOX/PPP/UBLOX_PPP_CellularPower.h similarity index 75% rename from features/cellular/framework/targets/UBLOX/LISA_U/UBLOX_LISA_U_CellularPower.h rename to features/cellular/framework/targets/UBLOX/PPP/UBLOX_PPP_CellularPower.h index ea56bc0153..c97ba4cdf1 100644 --- a/features/cellular/framework/targets/UBLOX/LISA_U/UBLOX_LISA_U_CellularPower.h +++ b/features/cellular/framework/targets/UBLOX/PPP/UBLOX_PPP_CellularPower.h @@ -15,18 +15,18 @@ * limitations under the License. */ -#ifndef UBLOX_LISA_U_CELLULARPOWER_H_ -#define UBLOX_LISA_U_CELLULARPOWER_H_ +#ifndef UBLOX_PPP_CELLULARPOWER_H_ +#define UBLOX_PPP_CELLULARPOWER_H_ #include "AT_CellularPower.h" namespace mbed { -class UBLOX_LISA_U_CellularPower : public AT_CellularPower +class UBLOX_PPP_CellularPower : public AT_CellularPower { public: - UBLOX_LISA_U_CellularPower(ATHandler &atHandler); - virtual ~UBLOX_LISA_U_CellularPower(); + UBLOX_PPP_CellularPower(ATHandler &atHandler); + virtual ~UBLOX_PPP_CellularPower(); public: //from CellularPower @@ -37,4 +37,4 @@ public: //from CellularPower } // namespace mbed -#endif // UBLOX_LISA_U_CELLULARPOWER_H_ +#endif // UBLOX_PPP_CELLULARPOWER_H_