diff options
author | Serhii Kostiuk <serhii.o.kostiuk@globallogic.com> | 2020-02-25 15:27:18 +0200 |
---|---|---|
committer | Serhii Kostiuk <serhii.o.kostiuk@globallogic.com> | 2020-02-25 16:13:35 +0200 |
commit | 85fc8d9a281b57cc356bf38ca72bd7880e4001d3 (patch) | |
tree | 02b57463a70fdc3ea3bc77e48ed14ce15bca83f0 | |
parent | 5d81a9e8d2afc8d2f1dbf9ab29d9248dcb54378a (diff) | |
download | libmts-io-85fc8d9a281b57cc356bf38ca72bd7880e4001d3.tar.gz libmts-io-85fc8d9a281b57cc356bf38ca72bd7880e4001d3.tar.bz2 libmts-io-85fc8d9a281b57cc356bf38ca72bd7880e4001d3.zip |
[MTX-3239] Add "cellularMode" value to the radio-query --dynamic
Added "cellularMode" value to the list dynamic (network stats) params
-rw-r--r-- | include/mts/MTS_IO_ICellularRadio.h | 1 | ||||
-rw-r--r-- | src/MTS_IO_CellularRadio.cpp | 8 | ||||
-rw-r--r-- | src/MTS_IO_ICellularRadio.cpp | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/include/mts/MTS_IO_ICellularRadio.h b/include/mts/MTS_IO_ICellularRadio.h index b9ac36f..58d5076 100644 --- a/include/mts/MTS_IO_ICellularRadio.h +++ b/include/mts/MTS_IO_ICellularRadio.h @@ -133,6 +133,7 @@ namespace MTS { static const char *KEY_ROAMING; //!< Indicates whether or not using Home Network static const char *KEY_DATETIME; //!< Date and Time from tower static const char *KEY_SERVICE; //!< Service Connection Type [GPRS, EGPRS, WCDMA, HSDPA, 1xRTT, EVDO] + static const char *KEY_CELL_MODE; //!< Specifies the cellular mode that is currently used by the modem [2g, 3g, 4g] static const char *KEY_NETWORK; //!< Cellular Service Provider static const char *KEY_NETWORK_REG; //!< Network Registration static const char *KEY_CID; //!< Cellular ID (Tower) in HEX diff --git a/src/MTS_IO_CellularRadio.cpp b/src/MTS_IO_CellularRadio.cpp index 299ca19..d50f917 100644 --- a/src/MTS_IO_CellularRadio.cpp +++ b/src/MTS_IO_CellularRadio.cpp @@ -695,6 +695,14 @@ void CellularRadio::getCommonNetworkStats(Json::Value& jData) { jData[ICellularRadio::KEY_NETWORK_REG] = sNetworkReg; } } + + std::string sCurrentCellMode; + CELLULAR_MODES eModes; + if (getCellularMode(eModes) == SUCCESS) { + if (convertCellModesToString(eModes, sCurrentCellMode) == SUCCESS) { + jData[ICellularRadio::KEY_CELL_MODE] = sCurrentCellMode; + } + } } ICellularRadio::CODE CellularRadio::getSimLockStatus(std::string& sData) diff --git a/src/MTS_IO_ICellularRadio.cpp b/src/MTS_IO_ICellularRadio.cpp index 339294d..53c8faa 100644 --- a/src/MTS_IO_ICellularRadio.cpp +++ b/src/MTS_IO_ICellularRadio.cpp @@ -55,6 +55,7 @@ const char *MTS::IO::ICellularRadio::KEY_SUPPORTED_CELL_MODES = "supportedCellul const char *MTS::IO::ICellularRadio::KEY_ROAMING = "roaming"; //!< Indicates whether or not using Home Network const char *MTS::IO::ICellularRadio::KEY_DATETIME = "datetime"; //!< Date and Time from tower const char *MTS::IO::ICellularRadio::KEY_SERVICE = "service"; //!< Service Connection Type [GPRS, EGPRS, WCDMA, HSDPA, 1xRTT, EVDO] +const char *MTS::IO::ICellularRadio::KEY_CELL_MODE = "cellularMode"; //!< Specifies the cellular mode that is currently used by the modem [2g, 3g, 4g] const char *MTS::IO::ICellularRadio::KEY_NETWORK = "network"; //!< Cellular Service Provider const char *MTS::IO::ICellularRadio::KEY_NETWORK_REG = "netreg"; //!< Network Registration const char *MTS::IO::ICellularRadio::KEY_CID = "cid"; //!< Cellular ID = Tower in HEX |