summaryrefslogtreecommitdiff
path: root/src/MTS_IO_CellularRadio.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/MTS_IO_CellularRadio.cpp')
-rw-r--r--src/MTS_IO_CellularRadio.cpp28
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) {