summaryrefslogtreecommitdiff
path: root/src/MTS_IO_TelitRadio.cpp
diff options
context:
space:
mode:
authorSerhii Kostiuk <serhii.o.kostiuk@globallogic.com>2019-06-11 16:57:22 +0300
committerSerhii Kostiuk <serhii.o.kostiuk@globallogic.com>2019-06-11 16:57:22 +0300
commit38039fe0c4fcc44bdf2534f1f8f4b95de54e14a4 (patch)
treeb06b423ca2a4c89e557c242388708460b1170ffc /src/MTS_IO_TelitRadio.cpp
parentbce73d000b64fc8ecaf7a25041e97a1ef57a848e (diff)
downloadlibmts-io-38039fe0c4fcc44bdf2534f1f8f4b95de54e14a4.tar.gz
libmts-io-38039fe0c4fcc44bdf2534f1f8f4b95de54e14a4.tar.bz2
libmts-io-38039fe0c4fcc44bdf2534f1f8f4b95de54e14a4.zip
[MTS-MTQ] QuectelRadio implementation
Removed copies of the following functions: - TelitRadio::queryLteLac - TelitRadio::setCGREG - TelitRadio::queryCGREGstring Those functions are already implemented in the CellularRadio class. Their implementation is common for both Telit and Quectel. There is no need to override them in TelitRadio.
Diffstat (limited to 'src/MTS_IO_TelitRadio.cpp')
-rw-r--r--src/MTS_IO_TelitRadio.cpp53
1 files changed, 0 insertions, 53 deletions
diff --git a/src/MTS_IO_TelitRadio.cpp b/src/MTS_IO_TelitRadio.cpp
index bfcb42e..8f747f8 100644
--- a/src/MTS_IO_TelitRadio.cpp
+++ b/src/MTS_IO_TelitRadio.cpp
@@ -396,59 +396,6 @@ CellularRadio::CODE TelitRadio::getNetworkStatus(Json::Value& jData) {
return SUCCESS;
}
-
-// Get the LAC for the LTE radio that's not in the #RFSTS response
-std::string TelitRadio::queryLteLac() {
- std::string CGREGstring;
- std::string originalCGREG;
- std::string result;
-
- CGREGstring = queryCGREGstring();
- if (CGREGstring == RSP_ERROR) {
- originalCGREG = "0";
- } else {
- originalCGREG = CGREGstring.at(CGREGstring.find(",") - 1); //Position right before first comma ("+CGREG: 0,1")
- }
-
- // Temporarily set CGREG=2 to get more info
- setCGREG("2");
-
- CGREGstring = queryCGREGstring();
- if (CGREGstring == RSP_ERROR) {
- result = CellularRadio::VALUE_UNKNOWN;
- } else {
- size_t start = CGREGstring.find(":") + 1; //Position right after "#RFSTS:"
- std::vector<std::string> vParts = MTS::Text::split(MTS::Text::trim(CGREGstring.substr(start)), ",");
- if(vParts.size() < 3) {
- result = CellularRadio::VALUE_UNAVAILABLE;
- } else {
- result = MTS::Text::strip(vParts[2], '"');
- }
- }
-
- setCGREG(originalCGREG);
-
- return result;
-}
-
-void TelitRadio::setCGREG(std::string value) {
- std::string sCmd("AT+CGREG=" + value);
- std::string cmdResult(sendCommand(sCmd));
- if (cmdResult.find("OK") == std::string::npos) {
- printDebug("%s| AT#CGREG=%s returned unexpected response: [%s][%s]", getName().c_str(), value.c_str(), sCmd.c_str(), cmdResult.c_str());
- }
-}
-
-std::string TelitRadio::queryCGREGstring() {
- std::string sCmd("AT+CGREG?");
- std::string cmdResult(sendCommand(sCmd));
- if (cmdResult.find("+CGREG:") == std::string::npos) {
- printDebug("%s| AT#CGREG? returned unexpected response: [%s][%s]", getName().c_str(), sCmd.c_str(), cmdResult.c_str());
- return RSP_ERROR;
- }
- return cmdResult;
-}
-
CellularRadio::CODE TelitRadio::convertSignalStrengthTodBm(const int32_t& iRssi, int32_t& iDbm) {
//Telit Conversion