summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSerhii Kostiuk <serhii.o.kostiuk@globallogic.com>2020-06-25 10:17:59 +0300
committerSerhii Kostiuk <serhii.o.kostiuk@globallogic.com>2020-06-25 10:17:59 +0300
commit6b3026ba736d3eef4b7754dfed46e32e45c5a490 (patch)
treee5316d29beba3d8c0d1fd791e0e7bac73aa8cfb6 /include
parentadaca6b0fc6430f38ae3f0551f9a248563ad53b5 (diff)
parenta949739583abb1fe30895edfda216e83ffdbef52 (diff)
downloadlibmts-io-6b3026ba736d3eef4b7754dfed46e32e45c5a490.tar.gz
libmts-io-6b3026ba736d3eef4b7754dfed46e32e45c5a490.tar.bz2
libmts-io-6b3026ba736d3eef4b7754dfed46e32e45c5a490.zip
[MTX-3489] mPower Oct20: Porting "LNA7 Intermediate Release" changes
Merged all the changes from the intermediate release to master.
Diffstat (limited to 'include')
-rw-r--r--include/mts/MTS_IO_CellularRadio.h5
-rw-r--r--include/mts/MTS_IO_ICellularRadio.h25
-rw-r--r--include/mts/MTS_IO_QuectelRadio.h1
3 files changed, 31 insertions, 0 deletions
diff --git a/include/mts/MTS_IO_CellularRadio.h b/include/mts/MTS_IO_CellularRadio.h
index 56506af..ed87a24 100644
--- a/include/mts/MTS_IO_CellularRadio.h
+++ b/include/mts/MTS_IO_CellularRadio.h
@@ -81,6 +81,7 @@ namespace MTS {
CODE convertCellModesToString(CELLULAR_MODES eCellModes, std::string& sCellModes) override;
CODE unlockSimCard(const Json::Value& jArgs) override;
+ CODE getSimCarrierCode(std::string& sCarrierCode) override;
CODE getMipProfile(Json::Value& jMipProfile) override;
CODE validateMsl(const Json::Value& jArgs) override;
@@ -100,6 +101,7 @@ namespace MTS {
CODE updateFumo(const Json::Value& jArgs, UpdateCb& stepCb) override;
CODE resetHfa(const Json::Value& jArgs, UpdateCb& stepCb) override;
CODE activate(const Json::Value& jArgs, UpdateCb& stepCb) override;
+ CODE startOmaDm(UpdateCb& stepCb) override;
CODE setActiveFirmware(const Json::Value& jArgs) override;
CODE getActiveFirmware(std::string& sFwId) override;
CODE getEcho(bool& bEnabled) override;
@@ -163,6 +165,9 @@ namespace MTS {
*/
virtual CODE getSimLockAttempts(int& iAttemptsPin, int& iAttemptsPuk) = 0;
+ //! Get carrier code based on the SIM card ID (ICCID)
+ virtual CODE getSimCarrierCode(const std::string& sIccid, std::string& sCarrierCode);
+
void initMipProfile(Json::Value& jData);
bool splitAndAssign(const std::string& sLine, const std::string& sKey, Json::Value& jParent, const std::string& sJsonKey, Json::ValueType eType = Json::ValueType::stringValue);
diff --git a/include/mts/MTS_IO_ICellularRadio.h b/include/mts/MTS_IO_ICellularRadio.h
index 58d5076..f2d4dfe 100644
--- a/include/mts/MTS_IO_ICellularRadio.h
+++ b/include/mts/MTS_IO_ICellularRadio.h
@@ -127,6 +127,7 @@ namespace MTS {
static const char *KEY_ICCID; //!< Integrated Circuit Card Identifier
static const char *KEY_MSL; //!< Master Subsidy Lock
static const char *KEY_SUPPORTED_CELL_MODES; //!< Comma-separated list of all supported cellular modes (2g,3g,4g)
+ static const char *KEY_SIM_CARRIER_CODE; //!< Unique carrier identifier based on the SIM card information.
//Network Status Data
@@ -200,6 +201,10 @@ namespace MTS {
static const char *VALUE_ABND_DCS_1800;
static const char *VALUE_ABND_PCS_1900;
+ //Values - Carrier code; abstraction over PLMN IDs, IINs and other identifiers
+ static const char *VALUE_CARRIER_CODE_VERIZON;
+ static const char *VALUE_CARRIER_CODE_ATT;
+
static const std::vector<std::string> DEFAULT_BAIL_STRINGS;
virtual ~ICellularRadio() = 0;
@@ -290,6 +295,23 @@ namespace MTS {
*/
virtual CODE unlockSimCard(const Json::Value& jArgs) = 0;
+ /**
+ * @brief getSimCarrierCode - get unique carrier identifier based on
+ * the SIM card information.
+ *
+ * @param sCarrier - a string to be populated with one of the carrier codes:
+ *
+ * - VALUE_CARRIER_CODE_VERIZON - Verizon
+ * - VALUE_CARRIER_CODE_ATT - AT&T
+ * - VALUE_UNKNOWN - Unknown carrier
+ * - other values may be defined in the future
+ *
+ * @return CODE::SUCCESS when carrier code retrieved,
+ * CODE::ERROR otherwise (i.e. when modem is not responding,
+ * when SIM card is removed or on any other error).
+ */
+ virtual CODE getSimCarrierCode(std::string& sCarrierCode) = 0;
+
//! Gather details of the radio's Mobile IP Profile
/*!
\param Json::Value object that will be populated with MIP data
@@ -431,6 +453,9 @@ namespace MTS {
* "fwid" : "Firmware Image To Be Enabled: STRING"
* }
*/
+
+ virtual CODE startOmaDm(UpdateCb& stepCb) = 0;
+
virtual CODE setActiveFirmware(const Json::Value& jArgs) = 0;
virtual CODE getActiveFirmware(std::string& sFwId) = 0;
diff --git a/include/mts/MTS_IO_QuectelRadio.h b/include/mts/MTS_IO_QuectelRadio.h
index c6114a0..fcee069 100644
--- a/include/mts/MTS_IO_QuectelRadio.h
+++ b/include/mts/MTS_IO_QuectelRadio.h
@@ -41,6 +41,7 @@ namespace MTS {
CODE convertdBmToSignalStrength(const int32_t& dBm, int32_t& iRssi) override;
CODE setMdn(const Json::Value& jArgs) override;
+ CODE startOmaDm(ICellularRadio::UpdateCb& stepCb) override;
CODE setCellularMode(CELLULAR_MODES networks) override;