diff options
author | Jeff Hatch <Jeff.Hatch@multitech.com> | 2018-05-02 14:55:40 -0500 |
---|---|---|
committer | Jeff Hatch <Jeff.Hatch@multitech.com> | 2018-05-02 14:55:40 -0500 |
commit | 1b8146c578dbea3868e16e560f5800007d104b5f (patch) | |
tree | 1c583bef4092c961c8c87d6d7daf3796a0e94f15 /src/MTS_IO_CellularRadio.cpp | |
parent | 9fc7c4094a2d1cfa9f23ed8e3ac80d111fd4e87f (diff) | |
download | libmts-io-1b8146c578dbea3868e16e560f5800007d104b5f.tar.gz libmts-io-1b8146c578dbea3868e16e560f5800007d104b5f.tar.bz2 libmts-io-1b8146c578dbea3868e16e560f5800007d104b5f.zip |
Add support for getting the Firmware Build Version from the Telit radio1.0.6
Diffstat (limited to 'src/MTS_IO_CellularRadio.cpp')
-rw-r--r-- | src/MTS_IO_CellularRadio.cpp | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/src/MTS_IO_CellularRadio.cpp b/src/MTS_IO_CellularRadio.cpp index 2b15194..7366166 100644 --- a/src/MTS_IO_CellularRadio.cpp +++ b/src/MTS_IO_CellularRadio.cpp @@ -75,12 +75,13 @@ const std::string CellularRadio::VALUE_DENIED("DENIED"); const std::string CellularRadio::VALUE_ROAMING("ROAMING"); //Static Data -const std::string CellularRadio::KEY_TYPE("type"); //!< GSM or CDMA -const std::string CellularRadio::KEY_CODE("code"); //!< Product Code : H5, H6, C2, EV3, G3 -const std::string CellularRadio::KEY_MODEL("model"); //!< Model : HE910, LE910, CE910, DE910, GE910 -const std::string CellularRadio::KEY_MANUFACTURER("manufacturer"); //!< Manufacturer: Telit -const std::string CellularRadio::KEY_HARDWARE("hardware"); //!< Radio Hardware Version -const std::string CellularRadio::KEY_FIRMWARE("firmware"); //!< Radio Firmware Version +const std::string CellularRadio::KEY_TYPE("type"); //!< GSM or CDMA +const std::string CellularRadio::KEY_CODE("code"); //!< Product Code : H5, H6, C2, EV3, G3 +const std::string CellularRadio::KEY_MODEL("model"); //!< Model : HE910, LE910, CE910, DE910, GE910 +const std::string CellularRadio::KEY_MANUFACTURER("manufacturer"); //!< Manufacturer: Telit +const std::string CellularRadio::KEY_HARDWARE("hardware"); //!< Radio Hardware Version +const std::string CellularRadio::KEY_FIRMWARE("firmware"); //!< Radio Firmware Version +const std::string CellularRadio::KEY_FIRMWARE_BUILD("firmwarebuild"); //!< Radio Firmware Build const std::string CellularRadio::KEY_CARRIER("carrier"); //!< Cellular Service Provider (Home Network) const std::string CellularRadio::VALUE_CARRIER_VERIZON("Verizon"); @@ -103,6 +104,7 @@ const std::string CellularRadio::KEY_ROAMING("roaming"); //!< Indicates wheth const std::string CellularRadio::KEY_DATETIME("datetime"); //!< Date and Time from tower const std::string CellularRadio::KEY_SERVICE("service"); //!< Service Connection Type [GPRS, EGPRS, WCDMA, HSDPA, 1xRTT, EVDO] const std::string CellularRadio::KEY_NETWORK("network"); //!< Cellular Service Provider +const std::string CellularRadio::KEY_NETWORK_REG("netreg"); //!< Network Registration const std::string CellularRadio::KEY_CID("cid"); //!< Cellular ID (Tower) in HEX const std::string CellularRadio::KEY_LAC("lac"); //!< Location Area Code in HEX const std::string CellularRadio::KEY_RAC("rac"); //!< Routing Area Code in HEX @@ -419,6 +421,11 @@ CellularRadio::CODE CellularRadio::getFirmware(std::string& sFirmware) { return SUCCESS; } +CellularRadio::CODE CellularRadio::getFirmwareBuild(std::string& sFirmwareBuild) { + sFirmwareBuild = VALUE_NOT_SUPPORTED; + return FAILURE; +} + CellularRadio::CODE CellularRadio::getHardware(std::string& sHardware) { printTrace("%s| Get Hardware", m_sName.c_str()); sHardware = VALUE_NOT_SUPPORTED; @@ -1209,9 +1216,16 @@ void CellularRadio::getCommonNetworkStats(Json::Value& jData) { } std::string sDate, sTime, sTimeZone; if(getTime(sDate, sTime, sTimeZone) == SUCCESS) { - jData[KEY_DATETIME] = sDate + " " + sTime + " GMT" + sTimeZone; } + + std::string sNetworkReg; + CellularRadio::REGISTRATION eReg; + if (getRegistration(eReg) == SUCCESS) { + if (convertRegistrationToString(eReg, sNetworkReg) == SUCCESS) { + jData[CellularRadio::KEY_NETWORK_REG] = sNetworkReg; + } + } } void CellularRadio::initMipProfile(Json::Value& jData) { |