summaryrefslogtreecommitdiff
path: root/src/MTS_IO_QuectelRadio.cpp
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 /src/MTS_IO_QuectelRadio.cpp
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.
Diffstat (limited to 'src/MTS_IO_QuectelRadio.cpp')
-rw-r--r--src/MTS_IO_QuectelRadio.cpp24
1 files changed, 12 insertions, 12 deletions
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)) {