From 3b7ac31ffaa0689105030f04a2a1651e19a45664 Mon Sep 17 00:00:00 2001 From: Serhii Kostiuk Date: Tue, 18 Feb 2020 17:47:13 +0200 Subject: [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. --- main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'main.cpp') 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; } -- cgit v1.2.3