summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerhii Kostiuk <serhii.o.kostiuk@globallogic.com>2020-06-16 15:41:43 +0300
committerSerhii Kostiuk <serhii.o.kostiuk@globallogic.com>2020-06-16 15:42:09 +0300
commitf807d5cb2941b0d13edbbc3b935dd6999bef1e45 (patch)
tree4d3d0bebb17c269b57acaa40d1b5b0b41e90aa9d
parent24c00df883e38873d192fdb46b5d2a963b65ffd0 (diff)
downloadradio-query-f807d5cb2941b0d13edbbc3b935dd6999bef1e45.tar.gz
radio-query-f807d5cb2941b0d13edbbc3b935dd6999bef1e45.tar.bz2
radio-query-f807d5cb2941b0d13edbbc3b935dd6999bef1e45.zip
[GP-654] Add SIM card-based carrier detection
Changes after a code review. Renamed "MTS Carrier Code" to the "Carrier Code".
-rw-r--r--main.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/main.cpp b/main.cpp
index 414a3a8..98a2c23 100644
--- a/main.cpp
+++ b/main.cpp
@@ -87,7 +87,7 @@ const uint32_t OPT_LOCATION = 0x00010000;
const uint32_t OPT_FIRMWAREBUILD = 0x00020000;
const uint32_t OPT_SIM_STATUS = 0x00040000;
const uint32_t OPT_RADIO_CODE = 0x00080000;
-const uint32_t OPT_MTS_SIM_CARRIER = 0x00100000;
+const uint32_t OPT_SIM_CARRIER_CODE = 0x00100000;
const uint32_t OPT_SUMMARY_STATIC = 0x01000000;
const uint32_t OPT_SUMMARY_NETWORK = 0x02000000;
@@ -322,9 +322,9 @@ int main(int argc, char** argv) {
printf("%s", sValue.c_str());
}
}
- } else if (g_iOptions & OPT_MTS_SIM_CARRIER) {
+ } else if (g_iOptions & OPT_SIM_CARRIER_CODE) {
std::string sValue;
- result = g_apRadio->getMtsSimCarrierCode(sValue);
+ result = g_apRadio->getSimCarrierCode(sValue);
if (result == ICellularRadio::SUCCESS) {
printf("%s", sValue.c_str());
}
@@ -540,10 +540,10 @@ Json::Value getStaticData() {
jData[MTS::IO::ICellularRadio::KEY_SUPPORTED_CELL_MODES] = sSupportedCellModes;
std::string sCarrierCode(ICellularRadio::VALUE_UNKNOWN);
- if(g_apRadio->getMtsSimCarrierCode(sCarrierCode) != ICellularRadio::SUCCESS) {
+ if(g_apRadio->getSimCarrierCode(sCarrierCode) != ICellularRadio::SUCCESS) {
printWarning("SIM carrier information not found");
}
- jData[MTS::IO::ICellularRadio::KEY_MTS_SIM_CARRIER_CODE] = sCarrierCode;
+ jData[MTS::IO::ICellularRadio::KEY_SIM_CARRIER_CODE] = sCarrierCode;
return jData;
}
@@ -597,7 +597,7 @@ void parseOptions(int argc, char** argv) {
{ "dynamic", no_argument, &iOption, OPT_SUMMARY_NETWORK },
{ "cellular-mode",no_argument, &iOption, OPT_CELL_MODE },
{ "supported-cellular-modes", no_argument, &iOption, OPT_SUPPORTED_CELL_MODE },
- { "mts-sim-carrier-code", no_argument, &iOption, OPT_MTS_SIM_CARRIER },
+ { "sim-carrier-code", no_argument, &iOption, OPT_SIM_CARRIER_CODE },
{ 0, 0, 0, 0 } };
/* getopt_long stores the option index here. */
@@ -706,7 +706,7 @@ void printHelp(const std::string& sApp) {
printf("\t--sim-status\n");
printf("\t--cellular-mode\n");
printf("\t--supported-cellular-modes\n");
- printf("\t--mts-sim-carrier-code\n");
+ printf("\t--sim-carrier-code\n");
// Applicable for LTE910-NA1 dual FW images only
// printf("\t--active-firmware\n");
printf("\n");