summaryrefslogtreecommitdiff
path: root/src/MTS_IO_CdmaRadio.cpp
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/MTS_IO_CdmaRadio.cpp
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/MTS_IO_CdmaRadio.cpp')
-rw-r--r--src/MTS_IO_CdmaRadio.cpp84
1 files changed, 42 insertions, 42 deletions
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);