summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerhii Kostiuk <serhii.o.kostiuk@globallogic.com>2020-02-18 17:47:13 +0200
committerSerhii Kostiuk <serhii.o.kostiuk@globallogic.com>2020-02-18 17:47:13 +0200
commit3b7ac31ffaa0689105030f04a2a1651e19a45664 (patch)
tree28929b64e419d6883fa9cd66d2aa8a832ca52120
parenta6d4914dbf938fbf48c6ace4280f97864c1b4866 (diff)
downloadradio-query-3b7ac31ffaa0689105030f04a2a1651e19a45664.tar.gz
radio-query-3b7ac31ffaa0689105030f04a2a1651e19a45664.tar.bz2
radio-query-3b7ac31ffaa0689105030f04a2a1651e19a45664.zip
[MTX-3232] Add "supportedCellularModes" value to the radio-query --static
This new field will return a comma-separated list of cellular modes (2g,3g,4g) that are supported by the modem. This new value allows to handle the list of supported cellular modes in the same way as we handle other static parameters like modem type and model without any need to separately call radio-query --supported-cellular-modes.
-rw-r--r--main.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index fdb7cd8..f6aa1ae 100644
--- a/main.cpp
+++ b/main.cpp
@@ -516,6 +516,14 @@ Json::Value getStaticData() {
jData[MTS::IO::ICellularRadio::KEY_MIP] = jMip;
}
+ std::string sSupportedCellModes(ICellularRadio::VALUE_UNKNOWN);
+ ICellularRadio::CELLULAR_MODES supportedCellModes;
+
+ if(g_apRadio->getSupportedCellularModes(supportedCellModes) == ICellularRadio::SUCCESS) {
+ sSupportedCellModes = cellularModeStr(supportedCellModes).c_str();
+ }
+ jData[MTS::IO::ICellularRadio::KEY_SUPPORTED_CELL_MODES] = sSupportedCellModes;
+
return jData;
}