summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaksym Telychko <maksym.telychko@globallogic.com>2019-06-06 14:45:58 +0300
committerMaksym Telychko <maksym.telychko@globallogic.com>2019-06-06 14:45:58 +0300
commit53efcef2e2f521135b323e194c45f1d9fa7b5d5d (patch)
tree1212563b63ade85fb58d81a67168826cc36e0c31 /src
parent86e572b513259e1f7164dd4e4b0f490c870bfc30 (diff)
downloadlibmts-io-53efcef2e2f521135b323e194c45f1d9fa7b5d5d.tar.gz
libmts-io-53efcef2e2f521135b323e194c45f1d9fa7b5d5d.tar.bz2
libmts-io-53efcef2e2f521135b323e194c45f1d9fa7b5d5d.zip
[MTS-MTQ] refactoring: namespace usage
Using identificators in appropriate namespace
Diffstat (limited to 'src')
-rw-r--r--src/MTS_IO_CE910Radio.cpp2
-rw-r--r--src/MTS_IO_CdmaRadio.cpp84
-rw-r--r--src/MTS_IO_DE910Radio.cpp2
-rw-r--r--src/MTS_IO_GE910Radio.cpp2
-rw-r--r--src/MTS_IO_HE910Radio.cpp2
-rw-r--r--src/MTS_IO_LE910C1APRadio.cpp2
-rw-r--r--src/MTS_IO_LE910C1NSRadio.cpp2
-rw-r--r--src/MTS_IO_LE910NA1Radio.cpp8
-rw-r--r--src/MTS_IO_LE910Radio.cpp6
-rw-r--r--src/MTS_IO_LE910SVGRadio.cpp2
-rw-r--r--src/MTS_IO_ME910C1NVRadio.cpp68
-rw-r--r--src/MTS_IO_ME910C1WWRadio.cpp8
-rw-r--r--src/MTS_IO_ME910Radio.cpp4
13 files changed, 96 insertions, 96 deletions
diff --git a/src/MTS_IO_CE910Radio.cpp b/src/MTS_IO_CE910Radio.cpp
index 7bdf280..fc6cfd4 100644
--- a/src/MTS_IO_CE910Radio.cpp
+++ b/src/MTS_IO_CE910Radio.cpp
@@ -39,7 +39,7 @@ CE910Radio::CE910Radio(const std::string& sPort)
}
-CellularRadio::CODE CE910Radio::setRxDiversity(const Json::Value& jArgs) {
+CE910Radio::CODE CE910Radio::setRxDiversity(const Json::Value& jArgs) {
/* Command string for CE radios: N/A */
return FAILURE;
}
diff --git a/src/MTS_IO_CdmaRadio.cpp b/src/MTS_IO_CdmaRadio.cpp
index 5b53f02..8057650 100644
--- a/src/MTS_IO_CdmaRadio.cpp
+++ b/src/MTS_IO_CdmaRadio.cpp
@@ -44,16 +44,16 @@ CdmaRadio::~CdmaRadio() {
}
-CellularRadio::CODE CdmaRadio::getImei(std::string& sImei) {
+CdmaRadio::CODE CdmaRadio::getImei(std::string& sImei) {
printTrace("%s| Get IMEI", getName().c_str());
return getMeid(sImei);
}
-CellularRadio::CODE CdmaRadio::getMeid(std::string& sMeid) {
+CdmaRadio::CODE CdmaRadio::getMeid(std::string& sMeid) {
printTrace("%s| Get MEID", getName().c_str());
sMeid = VALUE_NOT_SUPPORTED;
std::string sCmd("AT#MEIDESN?");
- std::string sResult = CellularRadio::sendCommand(sCmd);
+ std::string sResult = sendCommand(sCmd);
size_t pos = sResult.find(RSP_OK);
if (pos == std::string::npos) {
printWarning("%s| Unable to get MEID from radio using command [%s]", getName().c_str(), sCmd.c_str());
@@ -72,11 +72,11 @@ CellularRadio::CODE CdmaRadio::getMeid(std::string& sMeid) {
return SUCCESS;
}
-CellularRadio::CODE CdmaRadio::getMsid(std::string& sMsid) {
+CdmaRadio::CODE CdmaRadio::getMsid(std::string& sMsid) {
printTrace("%s| Get MSID", getName().c_str());
sMsid = VALUE_NOT_SUPPORTED;
std::string sCmd("AT$MSID?");
- std::string sResult = CellularRadio::sendCommand(sCmd);
+ std::string sResult = sendCommand(sCmd);
size_t end = sResult.find(RSP_OK);
if (end == std::string::npos) {
printWarning("%s| Unable to get MSID from radio using command [%s]", getName().c_str(), sCmd.c_str());
@@ -92,7 +92,7 @@ CellularRadio::CODE CdmaRadio::getMsid(std::string& sMsid) {
return SUCCESS;
}
-CellularRadio::CODE CdmaRadio::getCarrier(std::string& sCarrier) {
+CdmaRadio::CODE CdmaRadio::getCarrier(std::string& sCarrier) {
if(m_sCarrier != "") {
sCarrier = m_sCarrier;
return SUCCESS;
@@ -113,33 +113,33 @@ CellularRadio::CODE CdmaRadio::getCarrier(std::string& sCarrier) {
return SUCCESS;
}
-CellularRadio::CODE CdmaRadio::getNetwork(std::string& sNetwork) {
+CdmaRadio::CODE CdmaRadio::getNetwork(std::string& sNetwork) {
return getCarrier(sNetwork);
}
-CellularRadio::CODE CdmaRadio::getSimStatus(std::string& sSimStatus) {
+CdmaRadio::CODE CdmaRadio::getSimStatus(std::string& sSimStatus) {
printTrace("%s| Get SIM Status", getName().c_str());
sSimStatus = VALUE_NOT_SUPPORTED;
return NOT_APPLICABLE;
}
-CellularRadio::CODE CdmaRadio::getIccid(std::string& sIccid) {
+CdmaRadio::CODE CdmaRadio::getIccid(std::string& sIccid) {
printTrace("%s| Get ICCID", getName().c_str());
sIccid = VALUE_NOT_SUPPORTED;
return NOT_APPLICABLE;
}
-CellularRadio::CODE CdmaRadio::getLac(std::string& sLac) {
+CdmaRadio::CODE CdmaRadio::getLac(std::string& sLac) {
printTrace("%s| Get LAC", getName().c_str());
sLac = VALUE_NOT_SUPPORTED;
return NOT_APPLICABLE;
}
-CellularRadio::CODE CdmaRadio::getService(std::string& sService) {
+CdmaRadio::CODE CdmaRadio::getService(std::string& sService) {
printTrace("%s| Get Service", getName().c_str());
sService = VALUE_NOT_SUPPORTED;
std::string sCmd("AT+SERVICE?");
- std::string sResult = CellularRadio::sendCommand(sCmd);
+ std::string sResult = sendCommand(sCmd);
size_t end = sResult.find(RSP_OK);
if (end == std::string::npos) {
printWarning("%s| Unable to get Service from radio using command [%s]", getName().c_str(), sCmd.c_str());
@@ -167,11 +167,11 @@ CellularRadio::CODE CdmaRadio::getService(std::string& sService) {
return SUCCESS;
}
-CellularRadio::CODE CdmaRadio::getHardware(std::string& sHardware) {
+CdmaRadio::CODE CdmaRadio::getHardware(std::string& sHardware) {
printTrace("%s| Get Hardware", getName().c_str());
sHardware = VALUE_NOT_SUPPORTED;
std::string sCmd("AT#HWREV");
- std::string sResult = CellularRadio::sendCommand(sCmd);
+ std::string sResult = sendCommand(sCmd);
size_t pos = sResult.find(RSP_OK);
if (pos == std::string::npos) {
printWarning("%s| Unable to get hardware from radio using command [%s]", getName().c_str(), sCmd.c_str());
@@ -187,11 +187,11 @@ CellularRadio::CODE CdmaRadio::getHardware(std::string& sHardware) {
return SUCCESS;
}
-CellularRadio::CODE CdmaRadio::getMdn(std::string& sMdn) {
+CdmaRadio::CODE CdmaRadio::getMdn(std::string& sMdn) {
printTrace("%s| Get MDN", getName().c_str());
sMdn = VALUE_NOT_SUPPORTED;
std::string sCmd("AT+CNUM");
- std::string sResult = CellularRadio::sendCommand(sCmd);
+ std::string sResult = sendCommand(sCmd);
size_t end = sResult.find(RSP_OK);
if (end == std::string::npos) {
printWarning("%s| Unable to get MDN from radio using command [%s]", getName().c_str(), sCmd.c_str());
@@ -213,7 +213,7 @@ CellularRadio::CODE CdmaRadio::getMdn(std::string& sMdn) {
return SUCCESS;
}
-CellularRadio::CODE CdmaRadio::validateMsl(const Json::Value& jArgs) {
+CdmaRadio::CODE CdmaRadio::validateMsl(const Json::Value& jArgs) {
printTrace("%s| Validate MSL", getName().c_str());
if(!jArgs["msl"].isString()) {
@@ -239,7 +239,7 @@ CellularRadio::CODE CdmaRadio::validateMsl(const Json::Value& jArgs) {
return setMdn(jMdn);
}
-CellularRadio::CODE CdmaRadio::setMdn(const Json::Value& jArgs) {
+CdmaRadio::CODE CdmaRadio::setMdn(const Json::Value& jArgs) {
printTrace("%s| Set MDN", getName().c_str());
if(!jArgs["mdn"].isString()) {
@@ -283,7 +283,7 @@ CellularRadio::CODE CdmaRadio::setMdn(const Json::Value& jArgs) {
return SUCCESS;
}
-CellularRadio::CODE CdmaRadio::setMsid(const Json::Value& jArgs) {
+CdmaRadio::CODE CdmaRadio::setMsid(const Json::Value& jArgs) {
printTrace("%s| Set MSID", getName().c_str());
if(!jArgs["msid"].isString()) {
printError("%s| Arguments missing \"msid\"", getName().c_str());
@@ -318,7 +318,7 @@ CellularRadio::CODE CdmaRadio::setMsid(const Json::Value& jArgs) {
return SUCCESS;
}
-CellularRadio::CODE CdmaRadio::getMipProfile(Json::Value& jMipProfile) {
+CdmaRadio::CODE CdmaRadio::getMipProfile(Json::Value& jMipProfile) {
printTrace("%s| Get MIP Active Profile", getName().c_str());
initMipProfile(jMipProfile);
@@ -406,7 +406,7 @@ CellularRadio::CODE CdmaRadio::getMipProfile(Json::Value& jMipProfile) {
}
-CellularRadio::CODE CdmaRadio::setMipActiveProfile(const Json::Value& jArgs) {
+CdmaRadio::CODE CdmaRadio::setMipActiveProfile(const Json::Value& jArgs) {
printTrace("%s| Set MIP Active Profile", getName().c_str());
if(!jArgs["activeProfile"].isString()) {
@@ -426,7 +426,7 @@ CellularRadio::CODE CdmaRadio::setMipActiveProfile(const Json::Value& jArgs) {
return SUCCESS;
}
-CellularRadio::CODE CdmaRadio::setMipNai(const Json::Value& jArgs) {
+CdmaRadio::CODE CdmaRadio::setMipNai(const Json::Value& jArgs) {
printTrace("%s| Set MIP NAI", getName().c_str());
if(!jArgs["nai"].isString()) {
@@ -446,7 +446,7 @@ CellularRadio::CODE CdmaRadio::setMipNai(const Json::Value& jArgs) {
return SUCCESS;
}
-CellularRadio::CODE CdmaRadio::setMipHomeIp(const Json::Value& jArgs) {
+CdmaRadio::CODE CdmaRadio::setMipHomeIp(const Json::Value& jArgs) {
printTrace("%s| Set MIP Home IP", getName().c_str());
if(!jArgs["homeIp"].isString()) {
@@ -466,7 +466,7 @@ CellularRadio::CODE CdmaRadio::setMipHomeIp(const Json::Value& jArgs) {
return SUCCESS;
}
-CellularRadio::CODE CdmaRadio::setMipPrimaryHa(const Json::Value& jArgs) {
+CdmaRadio::CODE CdmaRadio::setMipPrimaryHa(const Json::Value& jArgs) {
printTrace("%s| Set MIP Primary HA", getName().c_str());
if(!jArgs["primaryHa"].isString()) {
@@ -486,7 +486,7 @@ CellularRadio::CODE CdmaRadio::setMipPrimaryHa(const Json::Value& jArgs) {
return SUCCESS;
}
-CellularRadio::CODE CdmaRadio::setMipSecondaryHa(const Json::Value& jArgs) {
+CdmaRadio::CODE CdmaRadio::setMipSecondaryHa(const Json::Value& jArgs) {
printTrace("%s| Set MIP Secondary HA", getName().c_str());
if(!jArgs["secondaryHa"].isString()) {
@@ -506,7 +506,7 @@ CellularRadio::CODE CdmaRadio::setMipSecondaryHa(const Json::Value& jArgs) {
return SUCCESS;
}
-CellularRadio::CODE CdmaRadio::setMipMnAaaSpi(const Json::Value& jArgs) {
+CdmaRadio::CODE CdmaRadio::setMipMnAaaSpi(const Json::Value& jArgs) {
printTrace("%s| Set MIP MN-AAA SPI", getName().c_str());
if(!jArgs["mnAaaSpi"].isString()) {
@@ -526,7 +526,7 @@ CellularRadio::CODE CdmaRadio::setMipMnAaaSpi(const Json::Value& jArgs) {
return SUCCESS;
}
-CellularRadio::CODE CdmaRadio::setMipMnHaSpi(const Json::Value& jArgs) {
+CdmaRadio::CODE CdmaRadio::setMipMnHaSpi(const Json::Value& jArgs) {
printTrace("%s| Set MIP MN-HA SPI", getName().c_str());
if(!jArgs["mnHaSpi"].isString()) {
@@ -546,7 +546,7 @@ CellularRadio::CODE CdmaRadio::setMipMnHaSpi(const Json::Value& jArgs) {
return SUCCESS;
}
-CellularRadio::CODE CdmaRadio::setMipRevTun(const Json::Value& jArgs) {
+CdmaRadio::CODE CdmaRadio::setMipRevTun(const Json::Value& jArgs) {
printTrace("%s| Set MIP Rev Tun", getName().c_str());
if(!jArgs["revTun"].isString()) {
@@ -566,7 +566,7 @@ CellularRadio::CODE CdmaRadio::setMipRevTun(const Json::Value& jArgs) {
return SUCCESS;
}
-CellularRadio::CODE CdmaRadio::setMipMnAaaSs(const Json::Value& jArgs) {
+CdmaRadio::CODE CdmaRadio::setMipMnAaaSs(const Json::Value& jArgs) {
printTrace("%s| Set MIP MN-AAA SS", getName().c_str());
if(!jArgs["mnAaaSs"].isString()) {
@@ -586,7 +586,7 @@ CellularRadio::CODE CdmaRadio::setMipMnAaaSs(const Json::Value& jArgs) {
return SUCCESS;
}
-CellularRadio::CODE CdmaRadio::setMipMnHaSs(const Json::Value& jArgs) {
+CdmaRadio::CODE CdmaRadio::setMipMnHaSs(const Json::Value& jArgs) {
printTrace("%s| Set MIP MN-HA SS", getName().c_str());
if(!jArgs["mnHaSs"].isString()) {
@@ -606,7 +606,7 @@ CellularRadio::CODE CdmaRadio::setMipMnHaSs(const Json::Value& jArgs) {
return SUCCESS;
}
-CellularRadio::CODE CdmaRadio::updateDc(const Json::Value& jArgs, UpdateCb& stepCb) {
+CdmaRadio::CODE CdmaRadio::updateDc(const Json::Value& jArgs, UpdateCb& stepCb) {
printTrace("%s| Update Device Configuration", getName().c_str());
std::string sCarrier;
@@ -616,7 +616,7 @@ CellularRadio::CODE CdmaRadio::updateDc(const Json::Value& jArgs, UpdateCb& step
return NOT_APPLICABLE;
}
- CellularRadio::CODE result = FAILURE;
+ CODE result = FAILURE;
std::size_t pos = 0;
std::size_t end = 0;
@@ -703,7 +703,7 @@ CellularRadio::CODE CdmaRadio::updateDc(const Json::Value& jArgs, UpdateCb& step
return result;
}
-CellularRadio::CODE CdmaRadio::updatePrl(const Json::Value& jArgs, UpdateCb& stepCb) {
+CdmaRadio::CODE CdmaRadio::updatePrl(const Json::Value& jArgs, UpdateCb& stepCb) {
printTrace("%s| Update Preferred Roaming List", getName().c_str());
std::string sCarrier;
@@ -713,7 +713,7 @@ CellularRadio::CODE CdmaRadio::updatePrl(const Json::Value& jArgs, UpdateCb& ste
return NOT_APPLICABLE;
}
- CellularRadio::CODE result = FAILURE;
+ CODE result = FAILURE;
std::size_t pos = 0;
std::size_t end = 0;
@@ -800,7 +800,7 @@ CellularRadio::CODE CdmaRadio::updatePrl(const Json::Value& jArgs, UpdateCb& ste
return result;
}
-CellularRadio::CODE CdmaRadio::updateFumo(const Json::Value& jArgs, UpdateCb& stepCb) {
+CdmaRadio::CODE CdmaRadio::updateFumo(const Json::Value& jArgs, UpdateCb& stepCb) {
printTrace("%s| Update Firmware Update Management Object", getName().c_str());
std::string sCarrier;
@@ -810,7 +810,7 @@ CellularRadio::CODE CdmaRadio::updateFumo(const Json::Value& jArgs, UpdateCb& st
return NOT_APPLICABLE;
}
- CellularRadio::CODE result = FAILURE;
+ CODE result = FAILURE;
std::size_t pos = 0;
std::size_t end = 0;
@@ -957,7 +957,7 @@ CellularRadio::CODE CdmaRadio::updateFumo(const Json::Value& jArgs, UpdateCb& st
return result;
}
-CellularRadio::CODE CdmaRadio::resetHfa(const Json::Value& jArgs, UpdateCb& stepCb) {
+CdmaRadio::CODE CdmaRadio::resetHfa(const Json::Value& jArgs, UpdateCb& stepCb) {
printTrace("%s| HFA Reset (after device reboot HFA will occur)", getName().c_str());
std::string sCarrier;
@@ -971,7 +971,7 @@ CellularRadio::CODE CdmaRadio::resetHfa(const Json::Value& jArgs, UpdateCb& step
return INVALID_ARGS;
}
- CellularRadio::CODE result = FAILURE;
+ CODE result = FAILURE;
std::size_t pos = 0;
std::size_t end = 0;
@@ -1075,7 +1075,7 @@ CellularRadio::CODE CdmaRadio::resetHfa(const Json::Value& jArgs, UpdateCb& step
return result;
}
-CellularRadio::CODE CdmaRadio::activate(const Json::Value& jArgs, UpdateCb& stepCb) {
+CdmaRadio::CODE CdmaRadio::activate(const Json::Value& jArgs, UpdateCb& stepCb) {
printTrace("%s| Activation", getName().c_str());
std::string sActivationCmd;
@@ -1107,7 +1107,7 @@ CellularRadio::CODE CdmaRadio::activate(const Json::Value& jArgs, UpdateCb& step
}
//Set MDN & MSID
- CellularRadio::CODE code;
+ CODE code;
code = setMdn(jArgs);
if(code != SUCCESS) {
return code;
@@ -1130,7 +1130,7 @@ CellularRadio::CODE CdmaRadio::activate(const Json::Value& jArgs, UpdateCb& step
return NOT_APPLICABLE;
}
- CellularRadio::CODE result = FAILURE;
+ CODE result = FAILURE;
std::size_t pos = 0;
std::size_t end = 0;
@@ -1214,7 +1214,7 @@ CellularRadio::CODE CdmaRadio::activate(const Json::Value& jArgs, UpdateCb& step
return result;
}
-CellularRadio::CODE CdmaRadio::getNetworkStatus(Json::Value& jData) {
+CdmaRadio::CODE CdmaRadio::getNetworkStatus(Json::Value& jData) {
printTrace("%s| Get Network Status", getName().c_str());
getCommonNetworkStats(jData);
diff --git a/src/MTS_IO_DE910Radio.cpp b/src/MTS_IO_DE910Radio.cpp
index eccb3eb..8749da6 100644
--- a/src/MTS_IO_DE910Radio.cpp
+++ b/src/MTS_IO_DE910Radio.cpp
@@ -39,7 +39,7 @@ DE910Radio::DE910Radio(const std::string& sPort)
}
-CellularRadio::CODE DE910Radio::setRxDiversity(const Json::Value& jArgs) {
+DE910Radio::CODE DE910Radio::setRxDiversity(const Json::Value& jArgs) {
/* Command string for EV3 radios: AT#CRXD= */
if (jArgs["enabled"].asString() != "1" && jArgs["enabled"].asString() != "0")
{
diff --git a/src/MTS_IO_GE910Radio.cpp b/src/MTS_IO_GE910Radio.cpp
index e402b13..f31f4fc 100644
--- a/src/MTS_IO_GE910Radio.cpp
+++ b/src/MTS_IO_GE910Radio.cpp
@@ -39,7 +39,7 @@ GE910Radio::GE910Radio(const std::string& sPort)
}
-CellularRadio::CODE GE910Radio::setRxDiversity(const Json::Value& jArgs) {
+GE910Radio::CODE GE910Radio::setRxDiversity(const Json::Value& jArgs) {
/* Command string for GE radios: N/A */
return FAILURE;
}
diff --git a/src/MTS_IO_HE910Radio.cpp b/src/MTS_IO_HE910Radio.cpp
index bc08932..0178c9d 100644
--- a/src/MTS_IO_HE910Radio.cpp
+++ b/src/MTS_IO_HE910Radio.cpp
@@ -37,7 +37,7 @@ HE910Radio::HE910Radio(const std::string& sHE910Model, const std::string& sPort)
}
-CellularRadio::CODE HE910Radio::setRxDiversity(const Json::Value& jArgs) {
+HE910Radio::CODE HE910Radio::setRxDiversity(const Json::Value& jArgs) {
/* Command string for H5 radios: "AT#RXDIV" */
if (jArgs["enabled"].asString() != "1" && jArgs["enabled"].asString() != "0")
{
diff --git a/src/MTS_IO_LE910C1APRadio.cpp b/src/MTS_IO_LE910C1APRadio.cpp
index 3a560fa..befb809 100644
--- a/src/MTS_IO_LE910C1APRadio.cpp
+++ b/src/MTS_IO_LE910C1APRadio.cpp
@@ -30,7 +30,7 @@ LE910C1APRadio::LE910C1APRadio(const std::string& sPort)
}
-CellularRadio::CODE LE910C1APRadio::getCarrier(std::string& sCarrier) {
+LE910C1APRadio::CODE LE910C1APRadio::getCarrier(std::string& sCarrier) {
sCarrier = "Sprint";
return SUCCESS;
}
diff --git a/src/MTS_IO_LE910C1NSRadio.cpp b/src/MTS_IO_LE910C1NSRadio.cpp
index 6c403a0..425ab93 100644
--- a/src/MTS_IO_LE910C1NSRadio.cpp
+++ b/src/MTS_IO_LE910C1NSRadio.cpp
@@ -39,7 +39,7 @@ LE910C1NSRadio::LE910C1NSRadio(const std::string& sPort)
}
-CellularRadio::CODE LE910C1NSRadio::getCarrier(std::string& sCarrier) {
+LE910C1NSRadio::CODE LE910C1NSRadio::getCarrier(std::string& sCarrier) {
sCarrier = "Sprint";
return SUCCESS;
}
diff --git a/src/MTS_IO_LE910NA1Radio.cpp b/src/MTS_IO_LE910NA1Radio.cpp
index 64583b4..382432b 100644
--- a/src/MTS_IO_LE910NA1Radio.cpp
+++ b/src/MTS_IO_LE910NA1Radio.cpp
@@ -38,8 +38,8 @@ LE910NA1Radio::LE910NA1Radio(const std::string& sPort)
}
-CellularRadio::CODE LE910NA1Radio::setActiveFirmware(const Json::Value& jArgs) {
- CellularRadio::CODE rc;
+LE910NA1Radio::CODE LE910NA1Radio::setActiveFirmware(const Json::Value& jArgs) {
+ CODE rc;
// Set command allows enabling a specific firmware image on products
// embedding 2 different firmware images:
@@ -82,9 +82,9 @@ CellularRadio::CODE LE910NA1Radio::setActiveFirmware(const Json::Value& jArgs) {
return sendBasicCommand(sCmd, 5000);
}
-CellularRadio::CODE LE910NA1Radio::getActiveFirmware(std::string& sFwId) {
+LE910NA1Radio::CODE LE910NA1Radio::getActiveFirmware(std::string& sFwId) {
std::string sCmd;
- CellularRadio::CODE rc;
+ CODE rc;
//
// Read command reports the current active firmware image:
// AT#FWSWITCH?
diff --git a/src/MTS_IO_LE910Radio.cpp b/src/MTS_IO_LE910Radio.cpp
index 76ccae2..f383b68 100644
--- a/src/MTS_IO_LE910Radio.cpp
+++ b/src/MTS_IO_LE910Radio.cpp
@@ -38,7 +38,7 @@ LE910Radio::LE910Radio(const std::string& sLE910Model, const std::string& sPort)
}
-CellularRadio::CODE LE910Radio::setRxDiversity(const Json::Value& jArgs) {
+LE910Radio::CODE LE910Radio::setRxDiversity(const Json::Value& jArgs) {
/* Command string for LAT1,LVW2,LEU1 radios: "AT#RXDIV=" */
/* Setting needs to append ",1" to the 0/1 value */
if (jArgs["enabled"].asString() != "1" && jArgs["enabled"].asString() != "0")
@@ -49,10 +49,10 @@ CellularRadio::CODE LE910Radio::setRxDiversity(const Json::Value& jArgs) {
sCmd += jArgs["enabled"].asString();
sCmd += ",1";
- return CellularRadio::sendBasicCommand(sCmd);
+ return sendBasicCommand(sCmd);
}
-CellularRadio::CODE LE910Radio::getModemLocation(std::string& sLocation) {
+LE910Radio::CODE LE910Radio::getModemLocation(std::string& sLocation) {
const std::string& whitespace = " \t";
printTrace("LE910Radio getModemLocation");
std::string sCmd("AT$GPSACP");
diff --git a/src/MTS_IO_LE910SVGRadio.cpp b/src/MTS_IO_LE910SVGRadio.cpp
index 692350d..e0afd67 100644
--- a/src/MTS_IO_LE910SVGRadio.cpp
+++ b/src/MTS_IO_LE910SVGRadio.cpp
@@ -39,7 +39,7 @@ LE910SVGRadio::LE910SVGRadio(const std::string& sPort)
}
-CellularRadio::CODE LE910SVGRadio::getCarrier(std::string& sCarrier) {
+LE910SVGRadio::CODE LE910SVGRadio::getCarrier(std::string& sCarrier) {
sCarrier = "Verizon";
return SUCCESS;
}
diff --git a/src/MTS_IO_ME910C1NVRadio.cpp b/src/MTS_IO_ME910C1NVRadio.cpp
index e9a4874..08c18e9 100644
--- a/src/MTS_IO_ME910C1NVRadio.cpp
+++ b/src/MTS_IO_ME910C1NVRadio.cpp
@@ -53,13 +53,13 @@ ME910C1NVRadio::ME910C1NVRadio(const std::string& sPort)
}
-CellularRadio::CODE ME910C1NVRadio::getCarrier(std::string& sCarrier) {
+ME910C1NVRadio::CODE ME910C1NVRadio::getCarrier(std::string& sCarrier) {
sCarrier = "Verizon";
return SUCCESS;
}
-CellularRadio::CODE ME910C1NVRadio::doGetFirmwareNumbers(std::string &sFirmware, std::string &sFirmwareBuild) {
- CellularRadio::CODE rc = FAILURE;
+ME910C1NVRadio::CODE ME910C1NVRadio::doGetFirmwareNumbers(std::string &sFirmware, std::string &sFirmwareBuild) {
+ CODE rc = FAILURE;
rc = getFirmware(sFirmware);
if (rc != SUCCESS){
@@ -74,9 +74,9 @@ CellularRadio::CODE ME910C1NVRadio::doGetFirmwareNumbers(std::string &sFirmware,
return rc;
}
-CellularRadio::CODE ME910C1NVRadio::doFumoReadConfig(const Json::Value& jArgs, Json::Value &jConfig)
+ME910C1NVRadio::CODE ME910C1NVRadio::doFumoReadConfig(const Json::Value& jArgs, Json::Value &jConfig)
{
- CellularRadio::CODE rc = INVALID_ARGS;
+ CODE rc = INVALID_ARGS;
std::string sPath;
do
@@ -196,9 +196,9 @@ CellularRadio::CODE ME910C1NVRadio::doFumoReadConfig(const Json::Value& jArgs, J
return rc;
}
-CellularRadio::CODE ME910C1NVRadio::doFumoSetup(const Json::Value &jConfig, UpdateCb& stepCb)
+ME910C1NVRadio::CODE ME910C1NVRadio::doFumoSetup(const Json::Value &jConfig, UpdateCb& stepCb)
{
- CellularRadio::CODE rc = FAILURE;
+ CODE rc = FAILURE;
std::string sCmd;
std::string sContextId = jConfig[KEY_FUMO_PDPID].asString();
@@ -215,7 +215,7 @@ CellularRadio::CODE ME910C1NVRadio::doFumoSetup(const Json::Value &jConfig, Upda
// AT#SGACT=<cid>,<stat>[,<userId>,<pwd>]
//
sCmd = "AT#SGACT=" + sContextId + ",0";
- rc = CellularRadio::sendBasicCommand(sCmd);
+ rc = sendBasicCommand(sCmd);
if (rc != SUCCESS) {
if(stepCb) {
stepCb(Json::Value("FUMO Error: Failed to deactivate PDP context"));
@@ -244,7 +244,7 @@ CellularRadio::CODE ME910C1NVRadio::doFumoSetup(const Json::Value &jConfig, Upda
if (!sApn.empty()) {
sCmd += ",\"" + sApn + "\"";
}
- rc = CellularRadio::sendBasicCommand(sCmd, 1000);
+ rc = sendBasicCommand(sCmd, 1000);
if (rc != SUCCESS) {
if(stepCb) {
stepCb(Json::Value("FUMO Error: Failed to setup PDP context"));
@@ -267,7 +267,7 @@ CellularRadio::CODE ME910C1NVRadio::doFumoSetup(const Json::Value &jConfig, Upda
// less than max packet size (timeout value in hundreds of milliseconds).
//
sCmd = "AT#SCFG=1," + sContextId + ",300,90,600,50";
- rc = CellularRadio::sendBasicCommand(sCmd);
+ rc = sendBasicCommand(sCmd);
if (rc != SUCCESS) {
if(stepCb) {
stepCb(Json::Value("FUMO Error: Failed to set connection configuration parameters"));
@@ -279,7 +279,7 @@ CellularRadio::CODE ME910C1NVRadio::doFumoSetup(const Json::Value &jConfig, Upda
// Activate PDP context
//
sCmd = "AT#SGACT=" + sContextId + ",1";
- rc = CellularRadio::sendBasicCommand(sCmd, 60 * 1000);
+ rc = sendBasicCommand(sCmd, 60 * 1000);
if (rc != SUCCESS) {
if(stepCb) {
stepCb(Json::Value("FUMO Error: Failed to activate PDP context"));
@@ -292,9 +292,9 @@ CellularRadio::CODE ME910C1NVRadio::doFumoSetup(const Json::Value &jConfig, Upda
return rc;
}
-CellularRadio::CODE ME910C1NVRadio::doFumoFtp(const Json::Value &jConfig, UpdateCb& stepCb)
+ME910C1NVRadio::CODE ME910C1NVRadio::doFumoFtp(const Json::Value &jConfig, UpdateCb& stepCb)
{
- CellularRadio::CODE rc = FAILURE;
+ CODE rc = FAILURE;
std::string sCmd;
std::string sResult;
@@ -305,7 +305,7 @@ CellularRadio::CODE ME910C1NVRadio::doFumoFtp(const Json::Value &jConfig, Update
// AT#FTPTO= [<tout>]
// <tout> - time-out in 100 ms units
//
- rc = CellularRadio::sendBasicCommand("AT#FTPTO=2400");
+ rc = sendBasicCommand("AT#FTPTO=2400");
if (rc != SUCCESS) {
if(stepCb) {
stepCb(Json::Value("FUMO Error: Failed to setup connection timeout"));
@@ -322,7 +322,7 @@ CellularRadio::CODE ME910C1NVRadio::doFumoFtp(const Json::Value &jConfig, Update
sCmd += "\"" + jConfig[KEY_FUMO_ADDRESS].asString() + "\",";
sCmd += "\"" + jConfig[KEY_FUMO_USER].asString() + "\",";
sCmd += "\"" + jConfig[KEY_FUMO_PASSWORD].asString() + "\",1";
- rc = CellularRadio::sendBasicCommand(sCmd, 60 * 1000);
+ rc = sendBasicCommand(sCmd, 60 * 1000);
if (rc != SUCCESS) {
if(stepCb) {
stepCb(Json::Value("FUMO Error: Failed to open connection"));
@@ -344,7 +344,7 @@ CellularRadio::CODE ME910C1NVRadio::doFumoFtp(const Json::Value &jConfig, Update
// 0 - binary
// 1 - ascii
//
- rc = CellularRadio::sendBasicCommand("AT#FTPTYPE=0", 1000);
+ rc = sendBasicCommand("AT#FTPTYPE=0", 1000);
if (rc != SUCCESS) {
if(stepCb) {
stepCb(Json::Value("FUMO Error: failed to set file transfer type"));
@@ -363,7 +363,7 @@ CellularRadio::CODE ME910C1NVRadio::doFumoFtp(const Json::Value &jConfig, Update
sCmd += jConfig[KEY_FUMO_DIR].asString() + "/";
}
sCmd += "\"";
- rc = CellularRadio::sendBasicCommand(sCmd, 60 * 1000);
+ rc = sendBasicCommand(sCmd, 60 * 1000);
if (rc != SUCCESS) {
if(stepCb) {
stepCb(Json::Value("FUMO Error: failed to change working directory on the server"));
@@ -380,7 +380,7 @@ CellularRadio::CODE ME910C1NVRadio::doFumoFtp(const Json::Value &jConfig, Update
//
sCmd = "AT#FTPGETOTA=";
sCmd += "\"" + jConfig[KEY_FUMO_FILE].asString() + "\",1,1";
- CellularRadio::sendBasicCommand(sCmd);
+ sendBasicCommand(sCmd);
//
// Noticed that after successful AT#FTPGETOTA the radio resets the connection.
@@ -396,12 +396,12 @@ CellularRadio::CODE ME910C1NVRadio::doFumoFtp(const Json::Value &jConfig, Update
{
MTS::Thread::sleep(5000);
- rc = CellularRadio::sendBasicCommand("AT");
+ rc = sendBasicCommand("AT");
if (rc == SUCCESS) {
break;
}
- CellularRadio::resetConnection(1);
+ resetConnection(1);
}
oTimer.stop();
@@ -450,7 +450,7 @@ CellularRadio::CODE ME910C1NVRadio::doFumoFtp(const Json::Value &jConfig, Update
//
// AT#FTPCLOSE
//
- CellularRadio::CODE rcclose = CellularRadio::sendBasicCommand("AT#FTPCLOSE", 60 * 1000);
+ CODE rcclose = sendBasicCommand("AT#FTPCLOSE", 60 * 1000);
if (rcclose != SUCCESS && rc == SUCCESS) {
if(stepCb) {
// Only one "FUMO Error" message should be sent
@@ -468,9 +468,9 @@ CellularRadio::CODE ME910C1NVRadio::doFumoFtp(const Json::Value &jConfig, Update
return rc;
}
-CellularRadio::CODE ME910C1NVRadio::doFumoCleanup(const Json::Value &jConfig, UpdateCb& stepCb)
+ME910C1NVRadio::CODE ME910C1NVRadio::doFumoCleanup(const Json::Value &jConfig, UpdateCb& stepCb)
{
- CellularRadio::CODE rc = FAILURE;
+ CODE rc = FAILURE;
std::string sCmd;
std::string sContextId = jConfig[KEY_FUMO_PDPID].asString();
@@ -479,7 +479,7 @@ CellularRadio::CODE ME910C1NVRadio::doFumoCleanup(const Json::Value &jConfig, Up
// Deactivate PDP context
//
sCmd = "AT#SGACT=" + sContextId + ",0";
- rc = CellularRadio::sendBasicCommand(sCmd, 10000);
+ rc = sendBasicCommand(sCmd, 10000);
if (rc != SUCCESS) {
if(stepCb) {
stepCb(Json::Value("FUMO Error: Failed to deactivate PDP context"));
@@ -488,9 +488,9 @@ CellularRadio::CODE ME910C1NVRadio::doFumoCleanup(const Json::Value &jConfig, Up
return rc;
}
-CellularRadio::CODE ME910C1NVRadio::doFumoApplyFirmware(const Json::Value &jConfig, UpdateCb& stepCb)
+ME910C1NVRadio::CODE ME910C1NVRadio::doFumoApplyFirmware(const Json::Value &jConfig, UpdateCb& stepCb)
{
- CellularRadio::CODE rc = FAILURE;
+ CODE rc = FAILURE;
if (jConfig.isMember(KEY_FUMO_DRYRUN)) {
if(stepCb) {
@@ -499,7 +499,7 @@ CellularRadio::CODE ME910C1NVRadio::doFumoApplyFirmware(const Json::Value &jConf
return SUCCESS;
}
- rc = CellularRadio::sendBasicCommand("AT#OTAUP=0", 10000);
+ rc = sendBasicCommand("AT#OTAUP=0", 10000);
if (rc != SUCCESS) {
if(stepCb) {
stepCb(Json::Value("FUMO Error: failed to apply the firmware"));
@@ -514,11 +514,11 @@ CellularRadio::CODE ME910C1NVRadio::doFumoApplyFirmware(const Json::Value &jConf
return rc;
}
-CellularRadio::CODE ME910C1NVRadio::doFumoWaitNewFirmware(const Json::Value &jConfig, UpdateCb& stepCb)
+ME910C1NVRadio::CODE ME910C1NVRadio::doFumoWaitNewFirmware(const Json::Value &jConfig, UpdateCb& stepCb)
{
std::string sFirmware;
std::string sFirmwareBuild;
- CellularRadio::CODE rc = FAILURE;
+ CODE rc = FAILURE;
if (jConfig.isMember(KEY_FUMO_DRYRUN)) {
if(stepCb) {
@@ -539,7 +539,7 @@ CellularRadio::CODE ME910C1NVRadio::doFumoWaitNewFirmware(const Json::Value &jCo
if (doGetFirmwareNumbers(sFirmware, sFirmwareBuild) != SUCCESS) {
// The radio is probably unavailable
- CellularRadio::resetConnection(100);
+ resetConnection(100);
continue;
}
@@ -570,9 +570,9 @@ CellularRadio::CODE ME910C1NVRadio::doFumoWaitNewFirmware(const Json::Value &jCo
}
-CellularRadio::CODE ME910C1NVRadio::doFumoPerform(const Json::Value &jConfig, UpdateCb& stepCb)
+ME910C1NVRadio::CODE ME910C1NVRadio::doFumoPerform(const Json::Value &jConfig, UpdateCb& stepCb)
{
- CellularRadio::CODE rc = FAILURE;
+ CODE rc = FAILURE;
UpdateCb dummyCb;
@@ -606,10 +606,10 @@ CellularRadio::CODE ME910C1NVRadio::doFumoPerform(const Json::Value &jConfig, Up
return rc;
}
-CellularRadio::CODE ME910C1NVRadio::updateFumo(const Json::Value& jArgs, UpdateCb& stepCb)
+ME910C1NVRadio::CODE ME910C1NVRadio::updateFumo(const Json::Value& jArgs, UpdateCb& stepCb)
{
Json::Value jConfig(Json::objectValue);
- CellularRadio::CODE rc = FAILURE;
+ CODE rc = FAILURE;
rc = doFumoReadConfig(jArgs, jConfig);
if (rc != SUCCESS) {
diff --git a/src/MTS_IO_ME910C1WWRadio.cpp b/src/MTS_IO_ME910C1WWRadio.cpp
index d26749a..2bc86a1 100644
--- a/src/MTS_IO_ME910C1WWRadio.cpp
+++ b/src/MTS_IO_ME910C1WWRadio.cpp
@@ -32,8 +32,8 @@ ME910C1WWRadio::ME910C1WWRadio(const std::string& sPort)
}
-CellularRadio::CODE ME910C1WWRadio::setActiveFirmware(const Json::Value& jArgs) {
- CellularRadio::CODE rc;
+ME910C1WWRadio::CODE ME910C1WWRadio::setActiveFirmware(const Json::Value& jArgs) {
+ CODE rc;
// Set command allows enabling a specific firmware image on products
// embedding 2 different firmware images:
@@ -76,9 +76,9 @@ CellularRadio::CODE ME910C1WWRadio::setActiveFirmware(const Json::Value& jArgs)
return sendBasicCommand(sCmd, 5000);
}
-CellularRadio::CODE ME910C1WWRadio::getActiveFirmware(std::string& sFwId) {
+ME910C1WWRadio::CODE ME910C1WWRadio::getActiveFirmware(std::string& sFwId) {
std::string sCmd;
- CellularRadio::CODE rc;
+ CODE rc;
//
// Read command reports the current active firmware image:
// AT#FWSWITCH?
diff --git a/src/MTS_IO_ME910Radio.cpp b/src/MTS_IO_ME910Radio.cpp
index 42796e9..590a883 100644
--- a/src/MTS_IO_ME910Radio.cpp
+++ b/src/MTS_IO_ME910Radio.cpp
@@ -30,12 +30,12 @@ ME910Radio::ME910Radio(const std::string& sME910Model, const std::string& sPort)
}
-CellularRadio::CODE ME910Radio::setRxDiversity(const Json::Value& jArgs) {
+ME910Radio::CODE ME910Radio::setRxDiversity(const Json::Value& jArgs) {
return FAILURE;
}
-CellularRadio::CODE ME910Radio::getFirmwareBuild(std::string& sFirmwareBuild) {
+ME910Radio::CODE ME910Radio::getFirmwareBuild(std::string& sFirmwareBuild) {
std::string sCmd("AT#CFVR");
std::string sResult = sendCommand(sCmd);