summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerhii Kostiuk <serhii.o.kostiuk@globallogic.com>2019-07-18 11:41:24 +0300
committerSerhii Kostiuk <serhii.o.kostiuk@globallogic.com>2019-07-18 15:41:52 +0300
commit0330513b8913d1d7bf14bad99d64ab002b770b7c (patch)
tree4f0e44ed31f0e536835260ff5b4849f84289ee9c
parentfe970f5bb77354b7507e230b1465e9178c80ee7a (diff)
downloadlibmts-io-0330513b8913d1d7bf14bad99d64ab002b770b7c.tar.gz
libmts-io-0330513b8913d1d7bf14bad99d64ab002b770b7c.tar.bz2
libmts-io-0330513b8913d1d7bf14bad99d64ab002b770b7c.zip
[MTR-MTQ] Namespace-related usage improvements
Restored full qualification of the ICellularRadio::CODE object type for all files that used full qualification before (effectively, for all source files and only one header file). This commit partially reverses 53efcef2e2f521135b323e194c45f1d9fa7b5d5d.
-rw-r--r--include/mts/MTS_IO_ME910C1WWRadio.h4
-rw-r--r--src/MTS_IO_CE910Radio.cpp2
-rw-r--r--src/MTS_IO_CdmaRadio.cpp76
-rw-r--r--src/MTS_IO_CellularRadio.cpp102
-rw-r--r--src/MTS_IO_DE910Radio.cpp2
-rw-r--r--src/MTS_IO_EG95Radio.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.cpp4
-rw-r--r--src/MTS_IO_LE910SVGRadio.cpp2
-rw-r--r--src/MTS_IO_ME910C1NVRadio.cpp40
-rw-r--r--src/MTS_IO_ME910C1WWRadio.cpp8
-rw-r--r--src/MTS_IO_ME910Radio.cpp4
-rw-r--r--src/MTS_IO_QuectelRadio.cpp24
-rw-r--r--src/MTS_IO_TelitRadio.cpp24
18 files changed, 155 insertions, 155 deletions
diff --git a/include/mts/MTS_IO_ME910C1WWRadio.h b/include/mts/MTS_IO_ME910C1WWRadio.h
index 6612d83..d45d86a 100644
--- a/include/mts/MTS_IO_ME910C1WWRadio.h
+++ b/include/mts/MTS_IO_ME910C1WWRadio.h
@@ -33,8 +33,8 @@ namespace MTS {
ME910C1WWRadio(const std::string& sPort);
virtual ~ME910C1WWRadio(){};
- CODE setActiveFirmware(const Json::Value& jArgs);
- CODE getActiveFirmware(std::string& sFwId);
+ ICellularRadio::CODE setActiveFirmware(const Json::Value& jArgs);
+ ICellularRadio::CODE getActiveFirmware(std::string& sFwId);
protected:
diff --git a/src/MTS_IO_CE910Radio.cpp b/src/MTS_IO_CE910Radio.cpp
index fc6cfd4..d1cad9b 100644
--- a/src/MTS_IO_CE910Radio.cpp
+++ b/src/MTS_IO_CE910Radio.cpp
@@ -39,7 +39,7 @@ CE910Radio::CE910Radio(const std::string& sPort)
}
-CE910Radio::CODE CE910Radio::setRxDiversity(const Json::Value& jArgs) {
+ICellularRadio::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 09db89b..f84fd34 100644
--- a/src/MTS_IO_CdmaRadio.cpp
+++ b/src/MTS_IO_CdmaRadio.cpp
@@ -44,12 +44,12 @@ CdmaRadio::~CdmaRadio() {
}
-CdmaRadio::CODE CdmaRadio::getImei(std::string& sImei) {
+ICellularRadio::CODE CdmaRadio::getImei(std::string& sImei) {
printTrace("%s| Get IMEI", getName().c_str());
return getMeid(sImei);
}
-CdmaRadio::CODE CdmaRadio::getMeid(std::string& sMeid) {
+ICellularRadio::CODE CdmaRadio::getMeid(std::string& sMeid) {
printTrace("%s| Get MEID", getName().c_str());
sMeid = ICellularRadio::VALUE_NOT_SUPPORTED;
std::string sCmd("AT#MEIDESN?");
@@ -72,7 +72,7 @@ CdmaRadio::CODE CdmaRadio::getMeid(std::string& sMeid) {
return SUCCESS;
}
-CdmaRadio::CODE CdmaRadio::getMsid(std::string& sMsid) {
+ICellularRadio::CODE CdmaRadio::getMsid(std::string& sMsid) {
printTrace("%s| Get MSID", getName().c_str());
sMsid = ICellularRadio::VALUE_NOT_SUPPORTED;
std::string sCmd("AT$MSID?");
@@ -92,14 +92,14 @@ CdmaRadio::CODE CdmaRadio::getMsid(std::string& sMsid) {
return SUCCESS;
}
-CdmaRadio::CODE CdmaRadio::getCarrier(std::string& sCarrier) {
+ICellularRadio::CODE CdmaRadio::getCarrier(std::string& sCarrier) {
if(m_sCarrier != "") {
sCarrier = m_sCarrier;
return SUCCESS;
}
std::string sFirmware;
- CODE code = getFirmware(sFirmware);
+ ICellularRadio::CODE code = getFirmware(sFirmware);
if(code != SUCCESS) {
return code;
}
@@ -113,29 +113,29 @@ CdmaRadio::CODE CdmaRadio::getCarrier(std::string& sCarrier) {
return SUCCESS;
}
-CdmaRadio::CODE CdmaRadio::getNetwork(std::string& sNetwork) {
+ICellularRadio::CODE CdmaRadio::getNetwork(std::string& sNetwork) {
return getCarrier(sNetwork);
}
-CdmaRadio::CODE CdmaRadio::getSimStatus(std::string& sSimStatus) {
+ICellularRadio::CODE CdmaRadio::getSimStatus(std::string& sSimStatus) {
printTrace("%s| Get SIM Status", getName().c_str());
sSimStatus = ICellularRadio::VALUE_NOT_SUPPORTED;
return NOT_APPLICABLE;
}
-CdmaRadio::CODE CdmaRadio::getIccid(std::string& sIccid) {
+ICellularRadio::CODE CdmaRadio::getIccid(std::string& sIccid) {
printTrace("%s| Get ICCID", getName().c_str());
sIccid = ICellularRadio::VALUE_NOT_SUPPORTED;
return NOT_APPLICABLE;
}
-CdmaRadio::CODE CdmaRadio::getLac(std::string& sLac) {
+ICellularRadio::CODE CdmaRadio::getLac(std::string& sLac) {
printTrace("%s| Get LAC", getName().c_str());
sLac = ICellularRadio::VALUE_NOT_SUPPORTED;
return NOT_APPLICABLE;
}
-CdmaRadio::CODE CdmaRadio::getService(std::string& sService) {
+ICellularRadio::CODE CdmaRadio::getService(std::string& sService) {
printTrace("%s| Get Service", getName().c_str());
sService = ICellularRadio::VALUE_NOT_SUPPORTED;
std::string sCmd("AT+SERVICE?");
@@ -167,7 +167,7 @@ CdmaRadio::CODE CdmaRadio::getService(std::string& sService) {
return SUCCESS;
}
-CdmaRadio::CODE CdmaRadio::getHardware(std::string& sHardware) {
+ICellularRadio::CODE CdmaRadio::getHardware(std::string& sHardware) {
printTrace("%s| Get Hardware", getName().c_str());
sHardware = ICellularRadio::VALUE_NOT_SUPPORTED;
std::string sCmd("AT#HWREV");
@@ -187,7 +187,7 @@ CdmaRadio::CODE CdmaRadio::getHardware(std::string& sHardware) {
return SUCCESS;
}
-CdmaRadio::CODE CdmaRadio::getMdn(std::string& sMdn) {
+ICellularRadio::CODE CdmaRadio::getMdn(std::string& sMdn) {
printTrace("%s| Get MDN", getName().c_str());
sMdn = ICellularRadio::VALUE_NOT_SUPPORTED;
std::string sCmd("AT+CNUM");
@@ -213,7 +213,7 @@ CdmaRadio::CODE CdmaRadio::getMdn(std::string& sMdn) {
return SUCCESS;
}
-CdmaRadio::CODE CdmaRadio::validateMsl(const Json::Value& jArgs) {
+ICellularRadio::CODE CdmaRadio::validateMsl(const Json::Value& jArgs) {
printTrace("%s| Validate MSL", getName().c_str());
if(!jArgs["msl"].isString()) {
@@ -239,7 +239,7 @@ CdmaRadio::CODE CdmaRadio::validateMsl(const Json::Value& jArgs) {
return setMdn(jMdn);
}
-CdmaRadio::CODE CdmaRadio::setMdn(const Json::Value& jArgs) {
+ICellularRadio::CODE CdmaRadio::setMdn(const Json::Value& jArgs) {
printTrace("%s| Set MDN", getName().c_str());
if(!jArgs["mdn"].isString()) {
@@ -283,7 +283,7 @@ CdmaRadio::CODE CdmaRadio::setMdn(const Json::Value& jArgs) {
return SUCCESS;
}
-CdmaRadio::CODE CdmaRadio::setMsid(const Json::Value& jArgs) {
+ICellularRadio::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 @@ CdmaRadio::CODE CdmaRadio::setMsid(const Json::Value& jArgs) {
return SUCCESS;
}
-CdmaRadio::CODE CdmaRadio::getMipProfile(Json::Value& jMipProfile) {
+ICellularRadio::CODE CdmaRadio::getMipProfile(Json::Value& jMipProfile) {
printTrace("%s| Get MIP Active Profile", getName().c_str());
initMipProfile(jMipProfile);
@@ -406,7 +406,7 @@ CdmaRadio::CODE CdmaRadio::getMipProfile(Json::Value& jMipProfile) {
}
-CdmaRadio::CODE CdmaRadio::setMipActiveProfile(const Json::Value& jArgs) {
+ICellularRadio::CODE CdmaRadio::setMipActiveProfile(const Json::Value& jArgs) {
printTrace("%s| Set MIP Active Profile", getName().c_str());
if(!jArgs["activeProfile"].isString()) {
@@ -426,7 +426,7 @@ CdmaRadio::CODE CdmaRadio::setMipActiveProfile(const Json::Value& jArgs) {
return SUCCESS;
}
-CdmaRadio::CODE CdmaRadio::setMipNai(const Json::Value& jArgs) {
+ICellularRadio::CODE CdmaRadio::setMipNai(const Json::Value& jArgs) {
printTrace("%s| Set MIP NAI", getName().c_str());
if(!jArgs["nai"].isString()) {
@@ -446,7 +446,7 @@ CdmaRadio::CODE CdmaRadio::setMipNai(const Json::Value& jArgs) {
return SUCCESS;
}
-CdmaRadio::CODE CdmaRadio::setMipHomeIp(const Json::Value& jArgs) {
+ICellularRadio::CODE CdmaRadio::setMipHomeIp(const Json::Value& jArgs) {
printTrace("%s| Set MIP Home IP", getName().c_str());
if(!jArgs["homeIp"].isString()) {
@@ -466,7 +466,7 @@ CdmaRadio::CODE CdmaRadio::setMipHomeIp(const Json::Value& jArgs) {
return SUCCESS;
}
-CdmaRadio::CODE CdmaRadio::setMipPrimaryHa(const Json::Value& jArgs) {
+ICellularRadio::CODE CdmaRadio::setMipPrimaryHa(const Json::Value& jArgs) {
printTrace("%s| Set MIP Primary HA", getName().c_str());
if(!jArgs["primaryHa"].isString()) {
@@ -486,7 +486,7 @@ CdmaRadio::CODE CdmaRadio::setMipPrimaryHa(const Json::Value& jArgs) {
return SUCCESS;
}
-CdmaRadio::CODE CdmaRadio::setMipSecondaryHa(const Json::Value& jArgs) {
+ICellularRadio::CODE CdmaRadio::setMipSecondaryHa(const Json::Value& jArgs) {
printTrace("%s| Set MIP Secondary HA", getName().c_str());
if(!jArgs["secondaryHa"].isString()) {
@@ -506,7 +506,7 @@ CdmaRadio::CODE CdmaRadio::setMipSecondaryHa(const Json::Value& jArgs) {
return SUCCESS;
}
-CdmaRadio::CODE CdmaRadio::setMipMnAaaSpi(const Json::Value& jArgs) {
+ICellularRadio::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 @@ CdmaRadio::CODE CdmaRadio::setMipMnAaaSpi(const Json::Value& jArgs) {
return SUCCESS;
}
-CdmaRadio::CODE CdmaRadio::setMipMnHaSpi(const Json::Value& jArgs) {
+ICellularRadio::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 @@ CdmaRadio::CODE CdmaRadio::setMipMnHaSpi(const Json::Value& jArgs) {
return SUCCESS;
}
-CdmaRadio::CODE CdmaRadio::setMipRevTun(const Json::Value& jArgs) {
+ICellularRadio::CODE CdmaRadio::setMipRevTun(const Json::Value& jArgs) {
printTrace("%s| Set MIP Rev Tun", getName().c_str());
if(!jArgs["revTun"].isString()) {
@@ -566,7 +566,7 @@ CdmaRadio::CODE CdmaRadio::setMipRevTun(const Json::Value& jArgs) {
return SUCCESS;
}
-CdmaRadio::CODE CdmaRadio::setMipMnAaaSs(const Json::Value& jArgs) {
+ICellularRadio::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 @@ CdmaRadio::CODE CdmaRadio::setMipMnAaaSs(const Json::Value& jArgs) {
return SUCCESS;
}
-CdmaRadio::CODE CdmaRadio::setMipMnHaSs(const Json::Value& jArgs) {
+ICellularRadio::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 @@ CdmaRadio::CODE CdmaRadio::setMipMnHaSs(const Json::Value& jArgs) {
return SUCCESS;
}
-CdmaRadio::CODE CdmaRadio::updateDc(const Json::Value& jArgs, UpdateCb& stepCb) {
+ICellularRadio::CODE CdmaRadio::updateDc(const Json::Value& jArgs, UpdateCb& stepCb) {
printTrace("%s| Update Device Configuration", getName().c_str());
std::string sCarrier;
@@ -616,7 +616,7 @@ CdmaRadio::CODE CdmaRadio::updateDc(const Json::Value& jArgs, UpdateCb& stepCb)
return NOT_APPLICABLE;
}
- CODE result = FAILURE;
+ ICellularRadio::CODE result = FAILURE;
std::size_t pos = 0;
std::size_t end = 0;
@@ -703,7 +703,7 @@ CdmaRadio::CODE CdmaRadio::updateDc(const Json::Value& jArgs, UpdateCb& stepCb)
return result;
}
-CdmaRadio::CODE CdmaRadio::updatePrl(const Json::Value& jArgs, UpdateCb& stepCb) {
+ICellularRadio::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 @@ CdmaRadio::CODE CdmaRadio::updatePrl(const Json::Value& jArgs, UpdateCb& stepCb)
return NOT_APPLICABLE;
}
- CODE result = FAILURE;
+ ICellularRadio::CODE result = FAILURE;
std::size_t pos = 0;
std::size_t end = 0;
@@ -800,7 +800,7 @@ CdmaRadio::CODE CdmaRadio::updatePrl(const Json::Value& jArgs, UpdateCb& stepCb)
return result;
}
-CdmaRadio::CODE CdmaRadio::updateFumo(const Json::Value& jArgs, UpdateCb& stepCb) {
+ICellularRadio::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 @@ CdmaRadio::CODE CdmaRadio::updateFumo(const Json::Value& jArgs, UpdateCb& stepCb
return NOT_APPLICABLE;
}
- CODE result = FAILURE;
+ ICellularRadio::CODE result = FAILURE;
std::size_t pos = 0;
std::size_t end = 0;
@@ -957,7 +957,7 @@ CdmaRadio::CODE CdmaRadio::updateFumo(const Json::Value& jArgs, UpdateCb& stepCb
return result;
}
-CdmaRadio::CODE CdmaRadio::resetHfa(const Json::Value& jArgs, UpdateCb& stepCb) {
+ICellularRadio::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 @@ CdmaRadio::CODE CdmaRadio::resetHfa(const Json::Value& jArgs, UpdateCb& stepCb)
return INVALID_ARGS;
}
- CODE result = FAILURE;
+ ICellularRadio::CODE result = FAILURE;
std::size_t pos = 0;
std::size_t end = 0;
@@ -1075,7 +1075,7 @@ CdmaRadio::CODE CdmaRadio::resetHfa(const Json::Value& jArgs, UpdateCb& stepCb)
return result;
}
-CdmaRadio::CODE CdmaRadio::activate(const Json::Value& jArgs, UpdateCb& stepCb) {
+ICellularRadio::CODE CdmaRadio::activate(const Json::Value& jArgs, UpdateCb& stepCb) {
printTrace("%s| Activation", getName().c_str());
std::string sActivationCmd;
@@ -1107,7 +1107,7 @@ CdmaRadio::CODE CdmaRadio::activate(const Json::Value& jArgs, UpdateCb& stepCb)
}
//Set MDN & MSID
- CODE code;
+ ICellularRadio::CODE code;
code = setMdn(jArgs);
if(code != SUCCESS) {
return code;
@@ -1130,7 +1130,7 @@ CdmaRadio::CODE CdmaRadio::activate(const Json::Value& jArgs, UpdateCb& stepCb)
return NOT_APPLICABLE;
}
- CODE result = FAILURE;
+ ICellularRadio::CODE result = FAILURE;
std::size_t pos = 0;
std::size_t end = 0;
@@ -1214,7 +1214,7 @@ CdmaRadio::CODE CdmaRadio::activate(const Json::Value& jArgs, UpdateCb& stepCb)
return result;
}
-CdmaRadio::CODE CdmaRadio::getNetworkStatus(Json::Value& jData) {
+ICellularRadio::CODE CdmaRadio::getNetworkStatus(Json::Value& jData) {
printTrace("%s| Get Network Status", getName().c_str());
getCommonNetworkStats(jData);
diff --git a/src/MTS_IO_CellularRadio.cpp b/src/MTS_IO_CellularRadio.cpp
index feccd3c..3f0c037 100644
--- a/src/MTS_IO_CellularRadio.cpp
+++ b/src/MTS_IO_CellularRadio.cpp
@@ -113,7 +113,7 @@ bool CellularRadio::initialize(uint32_t iTimeoutMillis) {
}
bool bEnabled;
- CODE eCode = getEcho(bEnabled);
+ ICellularRadio::CODE eCode = getEcho(bEnabled);
if(eCode == SUCCESS && bEnabled) {
printDebug("%s| Disabling 'echo'", m_sName.c_str());
setEcho(false);
@@ -173,7 +173,7 @@ const std::string& CellularRadio::getName() const {
return m_sName;
}
-CellularRadio::CODE CellularRadio::getFirmware(std::string& sFirmware) {
+ICellularRadio::CODE CellularRadio::getFirmware(std::string& sFirmware) {
printTrace("%s| Get Firmware", m_sName.c_str());
sFirmware = ICellularRadio::VALUE_NOT_SUPPORTED;
std::string sCmd("AT+CGMR");
@@ -195,12 +195,12 @@ CellularRadio::CODE CellularRadio::getFirmware(std::string& sFirmware) {
return SUCCESS;
}
-CellularRadio::CODE CellularRadio::getFirmwareBuild(std::string& sFirmwareBuild) {
+ICellularRadio::CODE CellularRadio::getFirmwareBuild(std::string& sFirmwareBuild) {
sFirmwareBuild = ICellularRadio::VALUE_NOT_SUPPORTED;
return FAILURE;
}
-CellularRadio::CODE CellularRadio::getHardware(std::string& sHardware) {
+ICellularRadio::CODE CellularRadio::getHardware(std::string& sHardware) {
printTrace("%s| Get Hardware", m_sName.c_str());
sHardware = ICellularRadio::VALUE_NOT_SUPPORTED;
@@ -214,7 +214,7 @@ CellularRadio::CODE CellularRadio::getHardware(std::string& sHardware) {
return FAILURE;
}
-CellularRadio::CODE CellularRadio::getManufacturer(std::string& sManufacturer) {
+ICellularRadio::CODE CellularRadio::getManufacturer(std::string& sManufacturer) {
printTrace("%s| Get Manufacturer", m_sName.c_str());
sManufacturer = ICellularRadio::VALUE_NOT_SUPPORTED;
std::string sCmd("AT+GMI");
@@ -234,7 +234,7 @@ CellularRadio::CODE CellularRadio::getManufacturer(std::string& sManufacturer) {
return SUCCESS;
}
-CellularRadio::CODE CellularRadio::getImei(std::string& sImei) {
+ICellularRadio::CODE CellularRadio::getImei(std::string& sImei) {
printTrace("%s| Get IMEI", m_sName.c_str());
sImei = ICellularRadio::VALUE_NOT_SUPPORTED;
@@ -257,12 +257,12 @@ CellularRadio::CODE CellularRadio::getImei(std::string& sImei) {
return SUCCESS;
}
-CellularRadio::CODE CellularRadio::getMeid(std::string& sMeid) {
+ICellularRadio::CODE CellularRadio::getMeid(std::string& sMeid) {
printTrace("%s| Get MEID", m_sName.c_str());
return getImei(sMeid);
}
-CellularRadio::CODE CellularRadio::getImsi(std::string& sImsi) {
+ICellularRadio::CODE CellularRadio::getImsi(std::string& sImsi) {
printTrace("%s| Get IMSI", m_sName.c_str());
sImsi = ICellularRadio::VALUE_NOT_SUPPORTED;
@@ -285,19 +285,19 @@ CellularRadio::CODE CellularRadio::getImsi(std::string& sImsi) {
return SUCCESS;
}
-CellularRadio::CODE CellularRadio::getSimStatus(std::string& sSimStatus) {
+ICellularRadio::CODE CellularRadio::getSimStatus(std::string& sSimStatus) {
printTrace("%s| Get SIM Status", getName().c_str());
sSimStatus = ICellularRadio::VALUE_UNKNOWN;
return FAILURE;
}
-CellularRadio::CODE CellularRadio::getSimStatusSummary(Json::Value& jData) {
+ICellularRadio::CODE CellularRadio::getSimStatusSummary(Json::Value& jData) {
bool bIsSimInserted = false;
bool bIsSimLocked = true;
int iAttemptsPin = 0;
int iAttemptsPuk = 0;
std::string sSimLockStatus;
- CODE retCode;
+ ICellularRadio::CODE retCode;
do {
retCode = getIsSimInserted(bIsSimInserted);
@@ -335,7 +335,7 @@ CellularRadio::CODE CellularRadio::getSimStatusSummary(Json::Value& jData) {
return retCode;
}
-CellularRadio::CODE CellularRadio::getLac(std::string& sLac) {
+ICellularRadio::CODE CellularRadio::getLac(std::string& sLac) {
Json::Value jData;
printTrace("%s| Get LAC", m_sName.c_str());
@@ -351,7 +351,7 @@ CellularRadio::CODE CellularRadio::getLac(std::string& sLac) {
return FAILURE;
}
-CellularRadio::CODE CellularRadio::getMdn(std::string& sMdn) {
+ICellularRadio::CODE CellularRadio::getMdn(std::string& sMdn) {
printTrace("%s| Get MDN", m_sName.c_str());
sMdn = ICellularRadio::VALUE_NOT_SUPPORTED;
@@ -385,7 +385,7 @@ CellularRadio::CODE CellularRadio::getMdn(std::string& sMdn) {
return SUCCESS;
}
-CellularRadio::CODE CellularRadio::getMsid(std::string& sMsid) {
+ICellularRadio::CODE CellularRadio::getMsid(std::string& sMsid) {
printTrace("%s| Get MSID", m_sName.c_str());
sMsid = "";
@@ -401,13 +401,13 @@ CellularRadio::CODE CellularRadio::getMsid(std::string& sMsid) {
return FAILURE;
}
-CellularRadio::CODE CellularRadio::getType(std::string& sType) {
+ICellularRadio::CODE CellularRadio::getType(std::string& sType) {
printTrace("%s| Get Type", m_sName.c_str());
sType = ICellularRadio::VALUE_NOT_SUPPORTED;
return FAILURE;
}
-CellularRadio::CODE CellularRadio::getCarrier(std::string& sCarrier) {
+ICellularRadio::CODE CellularRadio::getCarrier(std::string& sCarrier) {
printTrace("%s| Get Carrier", m_sName.c_str());
if(m_sCarrier == "") {
Json::Value jData;
@@ -437,7 +437,7 @@ CellularRadio::CODE CellularRadio::getCarrier(std::string& sCarrier) {
return SUCCESS;
}
-CellularRadio::CODE CellularRadio::getTower(std::string& sTower) {
+ICellularRadio::CODE CellularRadio::getTower(std::string& sTower) {
Json::Value jData;
printTrace("%s| Get Tower", m_sName.c_str());
@@ -452,7 +452,7 @@ CellularRadio::CODE CellularRadio::getTower(std::string& sTower) {
return FAILURE;
}
-CellularRadio::CODE CellularRadio::getTime(std::string& sDate, std::string& sTime, std::string& sTimeZone) {
+ICellularRadio::CODE CellularRadio::getTime(std::string& sDate, std::string& sTime, std::string& sTimeZone) {
Json::Value jData;
printTrace("%s| Get Time", m_sName.c_str());
@@ -527,7 +527,7 @@ CellularRadio::CODE CellularRadio::getTime(std::string& sDate, std::string& sTim
return FAILURE;
}
-CellularRadio::CODE CellularRadio::getRoaming(bool& bRoaming) {
+ICellularRadio::CODE CellularRadio::getRoaming(bool& bRoaming) {
Json::Value jData;
printTrace("%s| Get Roaming", m_sName.c_str());
@@ -541,7 +541,7 @@ CellularRadio::CODE CellularRadio::getRoaming(bool& bRoaming) {
return FAILURE;
}
-CellularRadio::CODE CellularRadio::getSignalStrength(int32_t& rssi) {
+ICellularRadio::CODE CellularRadio::getSignalStrength(int32_t& rssi) {
printTrace("%s| Get Signal Strength", m_sName.c_str());
// AT+CSQ execution can take up to 300ms according to the Quectel datasheet. Setting timeout to 500ms just for sure.
@@ -567,12 +567,12 @@ CellularRadio::CODE CellularRadio::getSignalStrength(int32_t& rssi) {
return SUCCESS;
}
-CellularRadio::CODE CellularRadio::getModemLocation(std::string&) {
+ICellularRadio::CODE CellularRadio::getModemLocation(std::string&) {
printTrace("%s|CellularRadio getModemLocation - not supported", m_sName.c_str());
return FAILURE;
}
-CellularRadio::CODE CellularRadio::getEcho(bool& bEnabled) {
+ICellularRadio::CODE CellularRadio::getEcho(bool& bEnabled) {
printTrace("%s| Echo Test", m_sName.c_str());
std::string sResult = sendCommand("AT");
if(sResult.size() == 0) {
@@ -588,8 +588,8 @@ CellularRadio::CODE CellularRadio::getEcho(bool& bEnabled) {
return SUCCESS;
}
-CellularRadio::CODE CellularRadio::setEcho(bool bEnabled) {
- CODE eCode = FAILURE;
+ICellularRadio::CODE CellularRadio::setEcho(bool bEnabled) {
+ ICellularRadio::CODE eCode = FAILURE;
if(bEnabled) {
eCode = sendBasicCommand("ATE1");
m_bEchoEnabled = (eCode == SUCCESS ) ? true : m_bEchoEnabled;
@@ -601,7 +601,7 @@ CellularRadio::CODE CellularRadio::setEcho(bool bEnabled) {
return eCode;
}
-CellularRadio::CODE CellularRadio::getStaticInformation(Json::Value& jData) {
+ICellularRadio::CODE CellularRadio::getStaticInformation(Json::Value& jData) {
printTrace("%s| Get Static Information", m_sName.c_str());
printTrace("%s| Static Information:\n%s\n", m_sName.c_str(), jData.toStyledString().c_str());
@@ -696,7 +696,7 @@ void CellularRadio::getCommonNetworkStats(Json::Value& jData) {
}
}
-CellularRadio::CODE CellularRadio::getSimLockStatus(std::string& sData)
+ICellularRadio::CODE CellularRadio::getSimLockStatus(std::string& sData)
{
printTrace("%s| Get SIM lock status", m_sName.c_str());
@@ -736,7 +736,7 @@ void CellularRadio::initMipProfile(Json::Value& jData) {
jData[ICellularRadio::KEY_MIP_MNHASS] = false;
}
-CellularRadio::CODE CellularRadio::getRegistration(REGISTRATION& eRegistration) {
+ICellularRadio::CODE CellularRadio::getRegistration(REGISTRATION& eRegistration) {
std::string sCmd;
std::string sResp;
@@ -770,9 +770,9 @@ CellularRadio::CODE CellularRadio::getRegistration(REGISTRATION& eRegistration)
return SUCCESS;
}
-CellularRadio::CODE CellularRadio::convertRegistrationToString(REGISTRATION eRegistration, std::string& sRegistration) {
+ICellularRadio::CODE CellularRadio::convertRegistrationToString(REGISTRATION eRegistration, std::string& sRegistration) {
- CODE eCode = FAILURE;
+ ICellularRadio::CODE eCode = FAILURE;
switch (eRegistration) {
case NOT_REGISTERED: sRegistration = ICellularRadio::VALUE_NOT_REGISTERED; eCode = SUCCESS; break;
case REGISTERED: sRegistration = ICellularRadio::VALUE_REGISTERED; eCode = SUCCESS; break;
@@ -784,7 +784,7 @@ CellularRadio::CODE CellularRadio::convertRegistrationToString(REGISTRATION eReg
return eCode;
}
-CellularRadio::CODE CellularRadio::unlockSimCard(const Json::Value& jArgs) {
+ICellularRadio::CODE CellularRadio::unlockSimCard(const Json::Value& jArgs) {
printTrace("%s| Unlock the SIM card using PIN code", m_sName.c_str());
if(!jArgs["pin"].isString()) {
@@ -803,128 +803,128 @@ CellularRadio::CODE CellularRadio::unlockSimCard(const Json::Value& jArgs) {
return SUCCESS;
}
-CellularRadio::CODE CellularRadio::validateMsl(const Json::Value&) {
+ICellularRadio::CODE CellularRadio::validateMsl(const Json::Value&) {
printTrace("%s| Validate MSL", m_sName.c_str());
return NOT_APPLICABLE;
}
-CellularRadio::CODE CellularRadio::setMsid(const Json::Value&) {
+ICellularRadio::CODE CellularRadio::setMsid(const Json::Value&) {
printTrace("%s| Set MSID", m_sName.c_str());
return NOT_APPLICABLE;
}
-CellularRadio::CODE CellularRadio::getMipProfile(Json::Value&) {
+ICellularRadio::CODE CellularRadio::getMipProfile(Json::Value&) {
printTrace("%s| Get MIP Active Profile", m_sName.c_str());
return NOT_APPLICABLE;
}
-CellularRadio::CODE CellularRadio::setMipActiveProfile(const Json::Value&) {
+ICellularRadio::CODE CellularRadio::setMipActiveProfile(const Json::Value&) {
printTrace("%s| Set MIP Active Profile", m_sName.c_str());
return NOT_APPLICABLE;
}
-CellularRadio::CODE CellularRadio::setMipNai(const Json::Value&) {
+ICellularRadio::CODE CellularRadio::setMipNai(const Json::Value&) {
printTrace("%s| Set MIP NAI", m_sName.c_str());
return NOT_APPLICABLE;
}
-CellularRadio::CODE CellularRadio::setMipHomeIp(const Json::Value&) {
+ICellularRadio::CODE CellularRadio::setMipHomeIp(const Json::Value&) {
printTrace("%s| Set MIP Home IP", m_sName.c_str());
return NOT_APPLICABLE;
}
-CellularRadio::CODE CellularRadio::setMipPrimaryHa(const Json::Value&) {
+ICellularRadio::CODE CellularRadio::setMipPrimaryHa(const Json::Value&) {
printTrace("%s| Set MIP Primary HA", m_sName.c_str());
return NOT_APPLICABLE;
}
-CellularRadio::CODE CellularRadio::setMipSecondaryHa(const Json::Value&) {
+ICellularRadio::CODE CellularRadio::setMipSecondaryHa(const Json::Value&) {
printTrace("%s| Set MIP Secondary HA", m_sName.c_str());
return NOT_APPLICABLE;
}
-CellularRadio::CODE CellularRadio::setMipMnAaaSpi(const Json::Value&) {
+ICellularRadio::CODE CellularRadio::setMipMnAaaSpi(const Json::Value&) {
printTrace("%s| Set MIP MN-AAA SPI", m_sName.c_str());
return NOT_APPLICABLE;
}
-CellularRadio::CODE CellularRadio::setMipMnHaSpi(const Json::Value&) {
+ICellularRadio::CODE CellularRadio::setMipMnHaSpi(const Json::Value&) {
printTrace("%s| Set MIP MN-HA SPI", m_sName.c_str());
return NOT_APPLICABLE;
}
-CellularRadio::CODE CellularRadio::setMipRevTun(const Json::Value&) {
+ICellularRadio::CODE CellularRadio::setMipRevTun(const Json::Value&) {
printTrace("%s| Set MIP Rev Tun", m_sName.c_str());
return NOT_APPLICABLE;
}
-CellularRadio::CODE CellularRadio::setMipMnAaaSs(const Json::Value&) {
+ICellularRadio::CODE CellularRadio::setMipMnAaaSs(const Json::Value&) {
printTrace("%s| Set MIP MN-AAA SS", m_sName.c_str());
return NOT_APPLICABLE;
}
-CellularRadio::CODE CellularRadio::setMipMnHaSs(const Json::Value&) {
+ICellularRadio::CODE CellularRadio::setMipMnHaSs(const Json::Value&) {
printTrace("%s| Set MIP MN-HA SS", m_sName.c_str());
return NOT_APPLICABLE;
}
-CellularRadio::CODE CellularRadio::updateDc(const Json::Value&, UpdateCb&) {
+ICellularRadio::CODE CellularRadio::updateDc(const Json::Value&, UpdateCb&) {
printTrace("%s| Update Device Configuration", m_sName.c_str());
return NOT_APPLICABLE;
}
-CellularRadio::CODE CellularRadio::updatePrl(const Json::Value&, UpdateCb&) {
+ICellularRadio::CODE CellularRadio::updatePrl(const Json::Value&, UpdateCb&) {
printTrace("%s| Update Preferred Roaming List", m_sName.c_str());
return NOT_APPLICABLE;
}
-CellularRadio::CODE CellularRadio::updateFumo(const Json::Value&, UpdateCb&) {
+ICellularRadio::CODE CellularRadio::updateFumo(const Json::Value&, UpdateCb&) {
printTrace("%s| Update Firmware Update Management Object", m_sName.c_str());
return NOT_APPLICABLE;
}
-CellularRadio::CODE CellularRadio::resetHfa(const Json::Value&, UpdateCb&) {
+ICellularRadio::CODE CellularRadio::resetHfa(const Json::Value&, UpdateCb&) {
printTrace("%s| HFA Reset", m_sName.c_str());
return NOT_APPLICABLE;
}
-CellularRadio::CODE CellularRadio::activate(const Json::Value&, UpdateCb&) {
+ICellularRadio::CODE CellularRadio::activate(const Json::Value&, UpdateCb&) {
printTrace("%s| Activation", m_sName.c_str());
return NOT_APPLICABLE;
}
-CellularRadio::CODE CellularRadio::setActiveFirmware(const Json::Value&) {
+ICellularRadio::CODE CellularRadio::setActiveFirmware(const Json::Value&) {
printTrace("%s| Set Active Firmware Image Number: not applicable", m_sName.c_str());
return NOT_APPLICABLE;
}
-CellularRadio::CODE CellularRadio::getActiveFirmware(std::string& sFwId) {
+ICellularRadio::CODE CellularRadio::getActiveFirmware(std::string& sFwId) {
printTrace("%s| Get Active Firmware Image Number: not applicable", m_sName.c_str());
sFwId = ICellularRadio::VALUE_NOT_SUPPORTED;
return NOT_APPLICABLE;
}
-CellularRadio::CODE CellularRadio::sendBasicCommand(const std::string& sCmd, int32_t iTimeoutMillis, const char& ESC) {
+ICellularRadio::CODE CellularRadio::sendBasicCommand(const std::string& sCmd, int32_t iTimeoutMillis, const char& ESC) {
std::string response = sendCommand(sCmd, DEFAULT_BAIL_STRINGS, iTimeoutMillis, ESC);
if (response.size() == 0) {
return NO_RESPONSE;
diff --git a/src/MTS_IO_DE910Radio.cpp b/src/MTS_IO_DE910Radio.cpp
index 8749da6..26668f1 100644
--- a/src/MTS_IO_DE910Radio.cpp
+++ b/src/MTS_IO_DE910Radio.cpp
@@ -39,7 +39,7 @@ DE910Radio::DE910Radio(const std::string& sPort)
}
-DE910Radio::CODE DE910Radio::setRxDiversity(const Json::Value& jArgs) {
+ICellularRadio::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_EG95Radio.cpp b/src/MTS_IO_EG95Radio.cpp
index 8469454..5c9ed69 100644
--- a/src/MTS_IO_EG95Radio.cpp
+++ b/src/MTS_IO_EG95Radio.cpp
@@ -35,7 +35,7 @@ EG95Radio::~EG95Radio() {
}
-EG95Radio::CODE EG95Radio::setRxDiversity(const Json::Value& jArgs) {
+ICellularRadio::CODE EG95Radio::setRxDiversity(const Json::Value& jArgs) {
/* Command string for EG95 radios: AT+QCFG="diversity",(0-1) */
if (jArgs["enabled"].asString() != "1" && jArgs["enabled"].asString() != "0") {
return FAILURE;
diff --git a/src/MTS_IO_GE910Radio.cpp b/src/MTS_IO_GE910Radio.cpp
index c99d16c..61332b5 100644
--- a/src/MTS_IO_GE910Radio.cpp
+++ b/src/MTS_IO_GE910Radio.cpp
@@ -39,7 +39,7 @@ GE910Radio::GE910Radio(const std::string& sPort)
}
-GE910Radio::CODE GE910Radio::setRxDiversity(const Json::Value& jArgs) {
+ICellularRadio::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 cc0e873..4c0a759 100644
--- a/src/MTS_IO_HE910Radio.cpp
+++ b/src/MTS_IO_HE910Radio.cpp
@@ -37,7 +37,7