summaryrefslogtreecommitdiff
path: root/include/mts/MTS_IO_CellularRadio.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/mts/MTS_IO_CellularRadio.h')
-rw-r--r--include/mts/MTS_IO_CellularRadio.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/include/mts/MTS_IO_CellularRadio.h b/include/mts/MTS_IO_CellularRadio.h
index 899ceeb..9866d73 100644
--- a/include/mts/MTS_IO_CellularRadio.h
+++ b/include/mts/MTS_IO_CellularRadio.h
@@ -61,6 +61,7 @@ namespace MTS {
CODE getMeid(std::string& sMeid) override;
CODE getImsi(std::string& sImsi) override;
CODE getSimStatus(std::string& sSimStatus) override;
+ CODE getSimStatusSummary(Json::Value& jData) override;
CODE getLac(std::string& sLac) override;
CODE getMdn(std::string& sMdn) override;
CODE getMsid(std::string& sMsid) override;
@@ -75,6 +76,9 @@ namespace MTS {
CODE getRegistration(REGISTRATION& eRegistration) override;
CODE convertRegistrationToString(REGISTRATION eRegistration, std::string& sRegistration) override;
+
+ CODE unlockSimCard(const Json::Value& jArgs) override;
+
CODE getMipProfile(Json::Value& jMipProfile) override;
CODE validateMsl(const Json::Value& jArgs) override;
CODE setMsid(const Json::Value& jArgs) override;
@@ -122,6 +126,40 @@ namespace MTS {
virtual void getCommonNetworkStats(Json::Value& jData);
+ /**
+ * @brief getIsSimInserted - returns if the SIM card is inserted / installed or not.
+ *
+ * @param bData - an object to be filled with the SIM card insertion status.
+ * `true` when SIM card is inserted / installed / present,
+ * `false` otherwise.
+ * @return CODE::SUCCESS when SIM insertion status is fetched successfully,
+ * CODE::NOT_APPLICABLE when the modem doesn't support this feature,
+ * CODE::ERROR otherwise (when modem is inaccessible or in other cases).
+ */
+ virtual CODE getIsSimInserted(bool& bData) = 0;
+
+ /**
+ * @brief getSimLockStatus - return the SIM lock status as defined by AT+CPIN? command.
+ * Returns "READY", "SIM PIN", "SIM PUK" or other SIM status.
+ *
+ * @param sData - an object to be filled with the SIM lock status
+ * @return CODE::SUCCESS when SIM status is fetched successfully,
+ * CODE::NOT_APPLICABLE when the modem doesn't support this feature,
+ * CODE::ERROR otherwise (SIM card removed, modem is inaccessible, etc).
+ */
+ virtual CODE getSimLockStatus(std::string& sData);
+
+ /**
+ * @brief getSimLockAttempts - get the number of SIM unlock attempts left.
+ *
+ * @param iAttemptsPin - the number of attempts left to enter a PIN code.
+ * @param iAttemptsPuk - the number of attempts left to enter a PUK code.
+ * @return CODE::SUCCESS when both numbers are fetched successfully,
+ * CODE::NOT_APPLICABLE when the modem doesn't support this feature,
+ * CODE::ERROR otherwise (SIM card removed, modem is inaccessible, etc).
+ */
+ virtual CODE getSimLockAttempts(int& iAttemptsPin, int& iAttemptsPuk) = 0;
+
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);