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 @@ HE910Radio::HE910Radio(const std::string& sHE910Model, const std::string& sPort)
}
-HE910Radio::CODE HE910Radio::setRxDiversity(const Json::Value& jArgs) {
+ICellularRadio::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 befb809..dca5faa 100644
--- a/src/MTS_IO_LE910C1APRadio.cpp
+++ b/src/MTS_IO_LE910C1APRadio.cpp
@@ -30,7 +30,7 @@ LE910C1APRadio::LE910C1APRadio(const std::string& sPort)
}
-LE910C1APRadio::CODE LE910C1APRadio::getCarrier(std::string& sCarrier) {
+ICellularRadio::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 425ab93..907edd7 100644
--- a/src/MTS_IO_LE910C1NSRadio.cpp
+++ b/src/MTS_IO_LE910C1NSRadio.cpp
@@ -39,7 +39,7 @@ LE910C1NSRadio::LE910C1NSRadio(const std::string& sPort)
}
-LE910C1NSRadio::CODE LE910C1NSRadio::getCarrier(std::string& sCarrier) {
+ICellularRadio::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 8ae15ad..c7341b0 100644
--- a/src/MTS_IO_LE910NA1Radio.cpp
+++ b/src/MTS_IO_LE910NA1Radio.cpp
@@ -38,8 +38,8 @@ LE910NA1Radio::LE910NA1Radio(const std::string& sPort)
}
-LE910NA1Radio::CODE LE910NA1Radio::setActiveFirmware(const Json::Value& jArgs) {
- CODE rc;
+ICellularRadio::CODE LE910NA1Radio::setActiveFirmware(const Json::Value& jArgs) {
+ ICellularRadio::CODE rc;
// Set command allows enabling a specific firmware image on products
// embedding 2 different firmware images:
@@ -82,9 +82,9 @@ LE910NA1Radio::CODE LE910NA1Radio::setActiveFirmware(const Json::Value& jArgs) {
return sendBasicCommand(sCmd, 5000);
}
-LE910NA1Radio::CODE LE910NA1Radio::getActiveFirmware(std::string& sFwId) {
+ICellularRadio::CODE LE910NA1Radio::getActiveFirmware(std::string& sFwId) {
std::string sCmd;
- CODE rc;
+ ICellularRadio::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 b02c2ce..ea905a8 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)
}
-LE910Radio::CODE LE910Radio::setRxDiversity(const Json::Value& jArgs) {
+ICellularRadio::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")
@@ -52,7 +52,7 @@ LE910Radio::CODE LE910Radio::setRxDiversity(const Json::Value& jArgs) {
return sendBasicCommand(sCmd);
}
-LE910Radio::CODE LE910Radio::getModemLocation(std::string& sLocation) {
+ICellularRadio::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 e0afd67..a43165a 100644
--- a/src/MTS_IO_LE910SVGRadio.cpp
+++ b/src/MTS_IO_LE910SVGRadio.cpp
@@ -39,7 +39,7 @@ LE910SVGRadio::LE910SVGRadio(const std::string& sPort)
}
-LE910SVGRadio::CODE LE910SVGRadio::getCarrier(std::string& sCarrier) {
+ICellularRadio::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 c7aae7b..0af5f24 100644
--- a/src/MTS_IO_ME910C1NVRadio.cpp
+++ b/src/MTS_IO_ME910C1NVRadio.cpp
@@ -53,13 +53,13 @@ ME910C1NVRadio::ME910C1NVRadio(const std::string& sPort)
}
-ME910C1NVRadio::CODE ME910C1NVRadio::getCarrier(std::string& sCarrier) {
+ICellularRadio::CODE ME910C1NVRadio::getCarrier(std::string& sCarrier) {
sCarrier = "Verizon";
return SUCCESS;
}
-ME910C1NVRadio::CODE ME910C1NVRadio::doGetFirmwareNumbers(std::string &sFirmware, std::string &sFirmwareBuild) {
- CODE rc = FAILURE;
+ICellularRadio::CODE ME910C1NVRadio::doGetFirmwareNumbers(std::string &sFirmware, std::string &sFirmwareBuild) {
+ ICellularRadio::CODE rc = FAILURE;
rc = getFirmware(sFirmware);
if (rc != SUCCESS){
@@ -74,9 +74,9 @@ ME910C1NVRadio::CODE ME910C1NVRadio::doGetFirmwareNumbers(std::string &sFirmware
return rc;
}
-ME910C1NVRadio::CODE ME910C1NVRadio::doFumoReadConfig(const Json::Value& jArgs, Json::Value &jConfig)
+ICellularRadio::CODE ME910C1NVRadio::doFumoReadConfig(const Json::Value& jArgs, Json::Value &jConfig)
{
- CODE rc = INVALID_ARGS;
+ ICellularRadio::CODE rc = INVALID_ARGS;
std::string sPath;
do
@@ -196,9 +196,9 @@ ME910C1NVRadio::CODE ME910C1NVRadio::doFumoReadConfig(const Json::Value& jArgs,
return rc;
}
-ME910C1NVRadio::CODE ME910C1NVRadio::doFumoSetup(const Json::Value &jConfig, UpdateCb& stepCb)
+ICellularRadio::CODE ME910C1NVRadio::doFumoSetup(const Json::Value &jConfig, UpdateCb& stepCb)
{
- CODE rc = FAILURE;
+ ICellularRadio::CODE rc = FAILURE;
std::string sCmd;
std::string sContextId = jConfig[KEY_FUMO_PDPID].asString();
@@ -292,9 +292,9 @@ ME910C1NVRadio::CODE ME910C1NVRadio::doFumoSetup(const Json::Value &jConfig, Upd
return rc;
}
-ME910C1NVRadio::CODE ME910C1NVRadio::doFumoFtp(const Json::Value &jConfig, UpdateCb& stepCb)
+ICellularRadio::CODE ME910C1NVRadio::doFumoFtp(const Json::Value &jConfig, UpdateCb& stepCb)
{
- CODE rc = FAILURE;
+ ICellularRadio::CODE rc = FAILURE;
std::string sCmd;
std::string sResult;
@@ -450,7 +450,7 @@ ME910C1NVRadio::CODE ME910C1NVRadio::doFumoFtp(const Json::Value &jConfig, Updat
//
// AT#FTPCLOSE
//
- CODE rcclose = sendBasicCommand("AT#FTPCLOSE", 60 * 1000);
+ ICellularRadio::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 @@ ME910C1NVRadio::CODE ME910C1NVRadio::doFumoFtp(const Json::Value &jConfig, Updat
return rc;
}
-ME910C1NVRadio::CODE ME910C1NVRadio::doFumoCleanup(const Json::Value &jConfig, UpdateCb& stepCb)
+ICellularRadio::CODE ME910C1NVRadio::doFumoCleanup(const Json::Value &jConfig, UpdateCb& stepCb)
{
- CODE rc = FAILURE;
+ ICellularRadio::CODE rc = FAILURE;
std::string sCmd;
std::string sContextId = jConfig[KEY_FUMO_PDPID].asString();
@@ -488,9 +488,9 @@ ME910C1NVRadio::CODE ME910C1NVRadio::doFumoCleanup(const Json::Value &jConfig, U
return rc;
}
-ME910C1NVRadio::CODE ME910C1NVRadio::doFumoApplyFirmware(const Json::Value &jConfig, UpdateCb& stepCb)
+ICellularRadio::CODE ME910C1NVRadio::doFumoApplyFirmware(const Json::Value &jConfig, UpdateCb& stepCb)
{
- CODE rc = FAILURE;
+ ICellularRadio::CODE rc = FAILURE;
if (jConfig.isMember(KEY_FUMO_DRYRUN)) {
if(stepCb) {
@@ -514,11 +514,11 @@ ME910C1NVRadio::CODE ME910C1NVRadio::doFumoApplyFirmware(const Json::Value &jCon
return rc;
}
-ME910C1NVRadio::CODE ME910C1NVRadio::doFumoWaitNewFirmware(const Json::Value &jConfig, UpdateCb& stepCb)
+ICellularRadio::CODE ME910C1NVRadio::doFumoWaitNewFirmware(const Json::Value &jConfig, UpdateCb& stepCb)
{
std::string sFirmware;
std::string sFirmwareBuild;
- CODE rc = FAILURE;
+ ICellularRadio::CODE rc = FAILURE;
if (jConfig.isMember(KEY_FUMO_DRYRUN)) {
if(stepCb) {
@@ -570,9 +570,9 @@ ME910C1NVRadio::CODE ME910C1NVRadio::doFumoWaitNewFirmware(const Json::Value &jC
}
-ME910C1NVRadio::CODE ME910C1NVRadio::doFumoPerform(const Json::Value &jConfig, UpdateCb& stepCb)
+ICellularRadio::CODE ME910C1NVRadio::doFumoPerform(const Json::Value &jConfig, UpdateCb& stepCb)
{
- CODE rc = FAILURE;
+ ICellularRadio::CODE rc = FAILURE;
UpdateCb dummyCb;
@@ -606,10 +606,10 @@ ME910C1NVRadio::CODE ME910C1NVRadio::doFumoPerform(const Json::Value &jConfig, U
return rc;
}
-ME910C1NVRadio::CODE ME910C1NVRadio::updateFumo(const Json::Value& jArgs, UpdateCb& stepCb)
+ICellularRadio::CODE ME910C1NVRadio::updateFumo(const Json::Value& jArgs, UpdateCb& stepCb)
{
Json::Value jConfig(Json::objectValue);
- CODE rc = FAILURE;
+ ICellularRadio::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 0228eda..0469d5d 100644
--- a/src/MTS_IO_ME910C1WWRadio.cpp
+++ b/src/MTS_IO_ME910C1WWRadio.cpp
@@ -32,8 +32,8 @@ ME910C1WWRadio::ME910C1WWRadio(const std::string& sPort)
}
-ME910C1WWRadio::CODE ME910C1WWRadio::setActiveFirmware(const Json::Value& jArgs) {
- CODE rc;
+ICellularRadio::CODE ME910C1WWRadio::setActiveFirmware(const Json::Value& jArgs) {
+ ICellularRadio::CODE rc;
// Set command allows enabling a specific firmware image on products
// embedding 2 different firmware images:
@@ -76,9 +76,9 @@ ME910C1WWRadio::CODE ME910C1WWRadio::setActiveFirmware(const Json::Value& jArgs)
return sendBasicCommand(sCmd, 5000);
}
-ME910C1WWRadio::CODE ME910C1WWRadio::getActiveFirmware(std::string& sFwId) {
+ICellularRadio::CODE ME910C1WWRadio::getActiveFirmware(std::string& sFwId) {
std::string sCmd;
- CODE rc;
+ ICellularRadio::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 4ae8a75..2b181d2 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)
}
-ME910Radio::CODE ME910Radio::setRxDiversity(const Json::Value& jArgs) {
+ICellularRadio::CODE ME910Radio::setRxDiversity(const Json::Value& jArgs) {
return FAILURE;
}
-ME910Radio::CODE ME910Radio::getFirmwareBuild(std::string& sFirmwareBuild) {
+ICellularRadio::CODE ME910Radio::getFirmwareBuild(std::string& sFirmwareBuild) {
std::string sCmd("AT#CFVR");
std::string sResult = sendCommand(sCmd);
diff --git a/src/MTS_IO_QuectelRadio.cpp b/src/MTS_IO_QuectelRadio.cpp
index 0712788..f3227a5 100644
--- a/src/MTS_IO_QuectelRadio.cpp
+++ b/src/MTS_IO_QuectelRadio.cpp
@@ -44,7 +44,7 @@ bool QuectelRadio::resetRadio(uint32_t iTimeoutMillis) {
return false;
}
-CellularRadio::CODE QuectelRadio::getModel(std::string& sModel) {
+ICellularRadio::CODE QuectelRadio::getModel(std::string& sModel) {
printTrace("%s| Get Model", getName().c_str());
//Always returns SUCCESS because the model should be m_sName
sModel = getName();
@@ -70,7 +70,7 @@ CellularRadio::CODE QuectelRadio::getModel(std::string& sModel) {
return SUCCESS;
}
-CellularRadio::CODE QuectelRadio::getIccid(std::string& sIccid) {
+ICellularRadio::CODE QuectelRadio::getIccid(std::string& sIccid) {
printTrace("%s| Get ICCID", getName().c_str());
sIccid = ICellularRadio::VALUE_NOT_SUPPORTED;
@@ -96,7 +96,7 @@ CellularRadio::CODE QuectelRadio::getIccid(std::string& sIccid) {
return SUCCESS;
}
-CellularRadio::CODE QuectelRadio::getService(std::string& sService) {
+ICellularRadio::CODE QuectelRadio::getService(std::string& sService) {
printTrace("%s| Get Service", getName().c_str());
sService = ICellularRadio::VALUE_NOT_SUPPORTED;
std::string sCmd("AT+COPS?");
@@ -136,7 +136,7 @@ CellularRadio::CODE QuectelRadio::getService(std::string& sService) {
return SUCCESS;
}
-CellularRadio::CODE QuectelRadio::getNetwork(std::string& sNetwork) {
+ICellularRadio::CODE QuectelRadio::getNetwork(std::string& sNetwork) {
/*
* TODO: Refactor using MccMncTable once it'll be corrected.
*
@@ -389,7 +389,7 @@ CellularRadio::CODE QuectelRadio::getNetworkStatus(Json::Value& jData) {
return SUCCESS;
}
-CellularRadio::CODE QuectelRadio::convertSignalStrengthTodBm(const int32_t& iRssi, int32_t& iDbm) {
+ICellularRadio::CODE QuectelRadio::convertSignalStrengthTodBm(const int32_t& iRssi, int32_t& iDbm) {
int dbmSteps, minValue, maxValue, rssiOffset;
int rawDbm;
@@ -415,7 +415,7 @@ CellularRadio::CODE QuectelRadio::convertSignalStrengthTodBm(const int32_t& iRss
return SUCCESS;
}
-CellularRadio::CODE QuectelRadio::convertdBmToSignalStrength(const int32_t& iDBm, int32_t& iRssi) {
+ICellularRadio::CODE QuectelRadio::convertdBmToSignalStrength(const int32_t& iDBm, int32_t& iRssi) {
//Quectel Conversion FOR NORMAL SCALING
const int dbmSteps = 2;
const int minValue = -113;
@@ -432,17 +432,17 @@ CellularRadio::CODE QuectelRadio::convertdBmToSignalStrength(const int32_t& iDBm
return SUCCESS;
}
-CellularRadio::CODE QuectelRadio::setMdn(const Json::Value& jArgs) {
+ICellularRadio::CODE QuectelRadio::setMdn(const Json::Value& jArgs) {
printTrace("%s| Set MDN", getName().c_str());
return NOT_APPLICABLE;
}
-CellularRadio::CODE QuectelRadio::getServiceDomain(ICellularRadio::SERVICEDOMAIN& sd) {
+ICellularRadio::CODE QuectelRadio::getServiceDomain(ICellularRadio::SERVICEDOMAIN& sd) {
printTrace("%s| Get Service Domain", getName().c_str());
std::string sCmd("AT+QCFG=\"servicedomain\"");
std::string sResult = sendCommand(sCmd);
- size_t end = sResult.find(RSP_OK);
+ size_t end = sResult.find(ICellularRadio::RSP_OK);
if (end == std::string::npos) {
printWarning("%s| Unable to get service domain using command [%s]", getName().c_str(), sCmd.c_str());
@@ -470,7 +470,7 @@ CellularRadio::CODE QuectelRadio::getServiceDomain(ICellularRadio::SERVICEDOMAIN
return SUCCESS;
}
-CellularRadio::CODE QuectelRadio::getIsSimInserted(bool& bData) {
+ICellularRadio::CODE QuectelRadio::getIsSimInserted(bool& bData) {
printTrace("%s| Get SIM insertion status", getName().c_str());
// AT+QSIMSTAT? execution can take up to 300ms according to the datasheet. Setting timeout to 500ms just for sure.
@@ -509,7 +509,7 @@ CellularRadio::CODE QuectelRadio::getIsSimInserted(bool& bData) {
return SUCCESS;
}
-CellularRadio::CODE QuectelRadio::getSimLockAttempts(int& iAttemptsPin, int& iAttemptsPuk) {
+ICellularRadio::CODE QuectelRadio::getSimLockAttempts(int& iAttemptsPin, int& iAttemptsPuk) {
printTrace("%s| Get SIM unlock attempts left", getName().c_str());
// AT+QPINC execution can take more time that expected. Set timeout to 2s just to be sure.
@@ -553,7 +553,7 @@ CellularRadio::CODE QuectelRadio::getSimLockAttempts(int& iAttemptsPin, int& iAt
return SUCCESS;
}
-CellularRadio::CODE QuectelRadio::convertToActiveBand(const std::string& sQuectelBand, ICellularRadio::ACTIVEBAND& band) {
+ICellularRadio::CODE QuectelRadio::convertToActiveBand(const std::string& sQuectelBand, ICellularRadio::ACTIVEBAND& band) {
int iQuectelBand = -1;
if (!MTS::Text::parse(iQuectelBand, sQuectelBand)) {
diff --git a/src/MTS_IO_TelitRadio.cpp b/src/MTS_IO_TelitRadio.cpp
index c8448e2..340c0ac 100644
--- a/src/MTS_IO_TelitRadio.cpp
+++ b/src/MTS_IO_TelitRadio.cpp
@@ -46,7 +46,7 @@ bool TelitRadio::resetRadio(uint32_t iTimeoutMillis) {
}
-CellularRadio::CODE TelitRadio::getModel(std::string& sModel) {
+ICellularRadio::CODE TelitRadio::getModel(std::string& sModel) {
printTrace("%s| Get Model", getName().c_str());
//Always returns SUCCESS because the model should be m_sName
sModel = getName();
@@ -72,7 +72,7 @@ CellularRadio::CODE TelitRadio::getModel(std::string& sModel) {
return SUCCESS;
}
-CellularRadio::CODE TelitRadio::getIccid(std::string& sIccid) {
+ICellularRadio::CODE TelitRadio::getIccid(std::string& sIccid) {
printTrace("%s| Get ICCID", getName().c_str());
sIccid = ICellularRadio::VALUE_NOT_SUPPORTED;
std::string sCmd("AT#CCID");
@@ -95,7 +95,7 @@ CellularRadio::CODE TelitRadio::getIccid(std::string& sIccid) {
return SUCCESS;
}
-CellularRadio::CODE TelitRadio::getService(std::string& sService) {
+ICellularRadio::CODE TelitRadio::getService(std::string& sService) {
printTrace("%s| Get Service", getName().c_str());
sService = ICellularRadio::VALUE_NOT_SUPPORTED;
std::string sCmd("AT#PSNT?");
@@ -127,7 +127,7 @@ CellularRadio::CODE TelitRadio::getService(std::string& sService) {
return SUCCESS;
}
-CellularRadio::CODE TelitRadio::getNetwork(std::string& sNetwork) {
+ICellularRadio::CODE TelitRadio::getNetwork(std::string& sNetwork) {
Json::Value jData;
printTrace("%s| Get Network", getName().c_str());
@@ -217,7 +217,7 @@ CellularRadio::CODE TelitRadio::getNetwork(std::string& sNetwork) {
<SD> -
<ABND> -
*/
-CellularRadio::CODE TelitRadio::getNetworkStatus(Json::Value& jData) {
+ICellularRadio::CODE TelitRadio::getNetworkStatus(Json::Value& jData) {
int32_t iValue;
std::string sValue;
const uint32_t GSM_NETWORK_FORMAT = 14;
@@ -396,7 +396,7 @@ CellularRadio::CODE TelitRadio::getNetworkStatus(Json::Value& jData) {
return SUCCESS;
}
-CellularRadio::CODE TelitRadio::convertSignalStrengthTodBm(const int32_t& iRssi, int32_t& iDbm) {
+ICellularRadio::CODE TelitRadio::convertSignalStrengthTodBm(const int32_t& iRssi, int32_t& iDbm) {
//Telit Conversion
if(iRssi < 0 || iRssi == 99) {
@@ -419,7 +419,7 @@ CellularRadio::CODE TelitRadio::convertSignalStrengthTodBm(const int32_t& iRssi,
return SUCCESS;
}
-CellularRadio::CODE TelitRadio::convertdBmToSignalStrength(const int32_t& iDBm, int32_t& iRssi) {
+ICellularRadio::CODE TelitRadio::convertdBmToSignalStrength(const int32_t& iDBm, int32_t& iRssi) {
//Telit Conversion
if(iDBm <= -113) {
iRssi = 0;
@@ -437,7 +437,7 @@ CellularRadio::CODE TelitRadio::convertdBmToSignalStrength(const int32_t& iDBm,
return SUCCESS;
}
-CellularRadio::CODE TelitRadio::setMdn(const Json::Value& jArgs) {
+ICellularRadio::CODE TelitRadio::setMdn(const Json::Value& jArgs) {
printTrace("%s| Set MDN", getName().c_str());
if(!jArgs["mdn"].isString()) {
@@ -574,7 +574,7 @@ ICellularRadio::CODE TelitRadio::setRadioNetworkMode(RADIO_NETWORK_MODE mode)
return SUCCESS;
}
-CellularRadio::CODE TelitRadio::getIsSimInserted(bool& bData) {
+ICellularRadio::CODE TelitRadio::getIsSimInserted(bool& bData) {
printTrace("%s| Get SIM insertion status", getName().c_str());
std::string sCmd("AT#SIMDET?");
std::string sResult = sendCommand(sCmd);
@@ -611,9 +611,9 @@ CellularRadio::CODE TelitRadio::getIsSimInserted(bool& bData) {
return SUCCESS;
}
-CellularRadio::CODE TelitRadio::getSimLockAttempts(int& iAttemptsPin, int& iAttemptsPuk) {
+ICellularRadio::CODE TelitRadio::getSimLockAttempts(int& iAttemptsPin, int& iAttemptsPuk) {
std::string sLockStatus;
- CODE retCode;
+ ICellularRadio::CODE retCode;
retCode = getSimLockStatus(sLockStatus);
if (retCode != SUCCESS) {
@@ -624,7 +624,7 @@ CellularRadio::CODE TelitRadio::getSimLockAttempts(int& iAttemptsPin, int& iAtte
return getSimLockAttempts(iAttemptsPin, iAttemptsPuk, sLockStatus);
}
-CellularRadio::CODE TelitRadio::getSimLockAttempts(int& iAttemptsPin, int& iAttemptsPuk, const std::string& sLockStatus) {
+ICellularRadio::CODE TelitRadio::getSimLockAttempts(int& iAttemptsPin, int& iAttemptsPuk, const std::string& sLockStatus) {
printTrace("%s| Get SIM unlock attempts left", getName().c_str());
std::string sCmd("AT#PCT");
std::string sResult = sendCommand(sCmd, DEFAULT_BAIL_STRINGS, 500);