summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrii Davydenko <andrii.davydenko@globallogic.com>2022-11-02 15:35:51 +0200
committerAndrii Davydenko <andrii.davydenko@globallogic.com>2022-11-07 16:23:10 +0200
commitb8991e7f15f30ad21725b113df773db7beaa69d8 (patch)
treeb5c18db11bde2566acf989568b7dcd26e6c0bf43 /include
parente19a3685c00814f3ae3ec347264e6b2476398a48 (diff)
downloadlibmts-io-b8991e7f15f30ad21725b113df773db7beaa69d8.tar.gz
libmts-io-b8991e7f15f30ad21725b113df773db7beaa69d8.tar.bz2
libmts-io-b8991e7f15f30ad21725b113df773db7beaa69d8.zip
[MTX-4694][GP-1791] MTCAP3 mPower R.6.1.X: LNA7D support - APN setup behavior when provider is Verizon
Implement getting the CGDCONT from the modem Implement setting the CGDCONT to the modem
Diffstat (limited to 'include')
-rw-r--r--include/mts/MTS_IO_CellularRadio.h3
-rw-r--r--include/mts/MTS_IO_ICellularRadio.h41
2 files changed, 44 insertions, 0 deletions
diff --git a/include/mts/MTS_IO_CellularRadio.h b/include/mts/MTS_IO_CellularRadio.h
index f32251c..60659dc 100644
--- a/include/mts/MTS_IO_CellularRadio.h
+++ b/include/mts/MTS_IO_CellularRadio.h
@@ -145,6 +145,9 @@ namespace MTS {
CODE getVoiceSupport(Json::Value& jData) override;
CODE getVoiceSupport(bool& bVoiceEnabled, bool& bSmsOnly) override;
+ CODE getPdpContexts(Json::Value& jData) override;
+ CODE setPdpContext(const std::string& sId, const Json::Value& jConfig) override;
+
protected:
CellularRadio(const std::string& sName, const std::string& sRadioPort);
diff --git a/include/mts/MTS_IO_ICellularRadio.h b/include/mts/MTS_IO_ICellularRadio.h
index f3e15e2..91ab782 100644
--- a/include/mts/MTS_IO_ICellularRadio.h
+++ b/include/mts/MTS_IO_ICellularRadio.h
@@ -205,6 +205,10 @@ namespace MTS {
static const char *KEY_ATTEMPTS_PIN; //!< The number of attempts left to unlock the SIM card using PIN code
static const char *KEY_ATTEMPTS_PUK; //!< The number of attempts left to unlock the SIM card using PUK code
+ //PDP Context
+ static const char *KEY_PDP_CONTEXT_APN;
+ static const char *KEY_PDP_CONTEXT_IPMODE;
+
//Values - Type
static const char *VALUE_TYPE_LTE;
static const char *VALUE_TYPE_GSM;
@@ -656,6 +660,43 @@ namespace MTS {
*/
virtual CODE getSelectedBandsRaw(std::string& sRawBands) = 0;
+ /**
+ * @brief Get the list of PDP contexts from the radio
+ *
+ * @param jData - an object to be filled with data.
+ * {
+ * "<context_number: str>": {
+ * "apn": "<apn_value: str>",
+ * "ipMode": "<ip_mode: str>"
+ * }
+ * }
+ *
+ * @return CODE::SUCCESS when fetched successfully,
+ * CODE::NO_RESPONSE when the modem doesn't respond,
+ * CODE::ERROR when the radio returns "ERROR",
+ * CODE::FAILURE otherwise (unexpected response).
+ */
+ virtual CODE getPdpContexts(Json::Value& jData) = 0;
+
+ /**
+ * @brief Set the PDP context to the radio
+ *
+ * @param sId - a string value that contains an ID of the PDP context to change.
+ * @param jConfig - a JSON-object that contains:
+ * an IP mode for the specified PDP context,
+ * an APN for the specified PDP context.
+ * {
+ * "apn": "<APN>",
+ * "ipMode": "<IP MODE>"
+ * }
+ *
+ * @return CODE::SUCCESS when fetched successfully,
+ * CODE::NO_RESPONSE when the modem doesn't respond,
+ * CODE::ERROR when the radio returns "ERROR",
+ * CODE::FAILURE otherwise (unexpected response).
+ */
+ virtual CODE setPdpContext(const std::string& sId, const Json::Value& jConfig) = 0;
+
};
}
}