diff options
-rw-r--r-- | include/mts/MTS_IO_CellularRadio.h | 1 | ||||
-rw-r--r-- | include/mts/MTS_IO_TelitRadio.h | 1 | ||||
-rw-r--r-- | src/MTS_IO_CellularRadio.cpp | 15 | ||||
-rw-r--r-- | src/MTS_IO_TelitRadio.cpp | 15 |
4 files changed, 16 insertions, 16 deletions
diff --git a/include/mts/MTS_IO_CellularRadio.h b/include/mts/MTS_IO_CellularRadio.h index 0410e0d..1576588 100644 --- a/include/mts/MTS_IO_CellularRadio.h +++ b/include/mts/MTS_IO_CellularRadio.h @@ -66,7 +66,6 @@ namespace MTS { CODE getMsid(std::string& sMsid) override; CODE getType(std::string& sType) override; CODE getCarrier(std::string& sCarrier) override; - CODE getNetwork(std::string& sNetwork) override; CODE getTower(std::string& sTower) override; CODE getTime(std::string& sDate, std::string& sTime, std::string& sTimeZone) override; CODE getRoaming(bool& bRoaming) override; diff --git a/include/mts/MTS_IO_TelitRadio.h b/include/mts/MTS_IO_TelitRadio.h index 0c95f98..7a44529 100644 --- a/include/mts/MTS_IO_TelitRadio.h +++ b/include/mts/MTS_IO_TelitRadio.h @@ -32,6 +32,7 @@ namespace MTS { CODE getModel(std::string& sModel) override; CODE getIccid(std::string& sIccid) override; CODE getService(std::string& sService) override; + CODE getNetwork(std::string& sNetwork) override; CODE getNetworkStatus(Json::Value& jData) override; CODE setMdn(const Json::Value& jArgs) override; diff --git a/src/MTS_IO_CellularRadio.cpp b/src/MTS_IO_CellularRadio.cpp index 66d44a0..e3927ea 100644 --- a/src/MTS_IO_CellularRadio.cpp +++ b/src/MTS_IO_CellularRadio.cpp @@ -488,21 +488,6 @@ CellularRadio::CODE CellularRadio::getRoaming(bool& bRoaming) { return FAILURE; } -CellularRadio::CODE CellularRadio::getNetwork(std::string& sNetwork) { - Json::Value jData; - - printTrace("%s| Get Network", m_sName.c_str()); - sNetwork = VALUE_NOT_SUPPORTED; - - if(getNetworkStatus(jData) == SUCCESS) { - if(jData.isMember(KEY_NETWORK)) { - sNetwork = jData[KEY_NETWORK].asString(); - return SUCCESS; - } - } - return FAILURE; -} - CellularRadio::CODE CellularRadio::getSignalStrength(int32_t& rssi) { printTrace("%s| Get Signal Strength", m_sName.c_str()); std::string sCmd("AT+CSQ"); diff --git a/src/MTS_IO_TelitRadio.cpp b/src/MTS_IO_TelitRadio.cpp index 6ce240e..7f9de63 100644 --- a/src/MTS_IO_TelitRadio.cpp +++ b/src/MTS_IO_TelitRadio.cpp @@ -127,6 +127,21 @@ CellularRadio::CODE TelitRadio::getService(std::string& sService) { return SUCCESS; } +CellularRadio::CODE TelitRadio::getNetwork(std::string& sNetwork) { + Json::Value jData; + + printTrace("%s| Get Network", getName().c_str()); + sNetwork = VALUE_NOT_SUPPORTED; + + if(getNetworkStatus(jData) == SUCCESS) { + if(jData.isMember(KEY_NETWORK)) { + sNetwork = jData[KEY_NETWORK].asString(); + return SUCCESS; + } + } + return FAILURE; +} + /* AT#RFSTS - NETWORK STATUS (GSM network) |