summaryrefslogtreecommitdiff
path: root/include/mts
diff options
context:
space:
mode:
authorMaksym Telychko <maksym.telychko@globallogic.com>2019-07-25 17:57:07 +0300
committerMaksym Telychko <maksym.telychko@globallogic.com>2019-07-25 17:57:07 +0300
commit59bd86588878af7e3f541902e8f2ed3d125dde81 (patch)
tree1cdb08cc727773f89e8e0fefe9c1977a1d89212b /include/mts
parentc884d6cbebf99bb18edeba95fcb1a4191f538f01 (diff)
downloadlibmts-io-59bd86588878af7e3f541902e8f2ed3d125dde81.tar.gz
libmts-io-59bd86588878af7e3f541902e8f2ed3d125dde81.tar.bz2
libmts-io-59bd86588878af7e3f541902e8f2ed3d125dde81.zip
MTX-2891 mpower: 2-3-4g switch implementation for Telit
Diffstat (limited to 'include/mts')
-rw-r--r--include/mts/MTS_IO_ICellularRadio.h12
-rw-r--r--include/mts/MTS_IO_QuectelRadio.h4
-rw-r--r--include/mts/MTS_IO_TelitRadio.h5
3 files changed, 21 insertions, 0 deletions
diff --git a/include/mts/MTS_IO_ICellularRadio.h b/include/mts/MTS_IO_ICellularRadio.h
index e2bf652..29f710a 100644
--- a/include/mts/MTS_IO_ICellularRadio.h
+++ b/include/mts/MTS_IO_ICellularRadio.h
@@ -68,6 +68,14 @@ namespace MTS {
RADIO_NETWORK_MODE_LTE_ONLY
};
+ enum PREFERRED_NETWORKS : uint8_t {
+ PREFERRED_NETWORK_NA = 0, // NOT AVAILABLE
+ PREFERRED_NETWORK_2G = 1 << 0, // GSM
+ PREFERRED_NETWORK_3G = 1 << 1, // WCDMA
+ PREFERRED_NETWORK_4G = 1 << 2, // LTE
+ PREFERRED_NETWORK_5G = 1 << 3 // 5G
+ };
+
static CODE convertModelToType(const std::string& sModel, std::string& sType);
static CODE convertModelToMtsShortCode(const std::string& sModel, std::string& sCode, ICellularRadio *radioObj = NULL);
static CODE convertServiceDomainToString(SERVICEDOMAIN eSd, std::string& sSd);
@@ -220,6 +228,10 @@ namespace MTS {
virtual CODE getImsi(std::string& sImsi) = 0;
virtual CODE getSimStatus(std::string& sSimStatus) = 0;
+ virtual CODE getAvailablePreferredNetworks(PREFERRED_NETWORKS &networks) = 0;
+ virtual CODE getPreferredNetworks(PREFERRED_NETWORKS &networks) = 0;
+ virtual CODE setPreferredNetworks(PREFERRED_NETWORKS networks) = 0;
+
/**
* @brief getSimStatusSummary - get summary on the SIM card status
* (if there is a SIM card inserted, is it locked, etc).
diff --git a/include/mts/MTS_IO_QuectelRadio.h b/include/mts/MTS_IO_QuectelRadio.h
index 3b1ba5a..8b8b92a 100644
--- a/include/mts/MTS_IO_QuectelRadio.h
+++ b/include/mts/MTS_IO_QuectelRadio.h
@@ -44,6 +44,10 @@ namespace MTS {
CODE getRadioNetworkMode(RADIO_NETWORK_MODE &mode) override;
CODE setRadioNetworkMode(RADIO_NETWORK_MODE mode) override;
+ CODE getAvailablePreferredNetworks(PREFERRED_NETWORKS &networks) override;
+ CODE getPreferredNetworks(PREFERRED_NETWORKS &networks) override;
+ CODE setPreferredNetworks(PREFERRED_NETWORKS networks) override;
+
protected:
QuectelRadio(const std::string& sName, const std::string& sRadioPort);
diff --git a/include/mts/MTS_IO_TelitRadio.h b/include/mts/MTS_IO_TelitRadio.h
index 6382696..7b04125 100644
--- a/include/mts/MTS_IO_TelitRadio.h
+++ b/include/mts/MTS_IO_TelitRadio.h
@@ -42,6 +42,10 @@ namespace MTS {
CODE getRadioNetworkMode(RADIO_NETWORK_MODE &mode) override;
CODE setRadioNetworkMode(RADIO_NETWORK_MODE mode) override;
+ CODE getAvailablePreferredNetworks(PREFERRED_NETWORKS &networks) override;
+ CODE getPreferredNetworks(PREFERRED_NETWORKS &networks) override;
+ CODE setPreferredNetworks(PREFERRED_NETWORKS networks) override;
+
protected:
TelitRadio(const std::string& sName, const std::string& sRadioPort);
@@ -53,6 +57,7 @@ namespace MTS {
private:
virtual CODE getSimLockAttempts(int& iAttemptsPin, int& iAttemptsPuk, const std::string& sLockStatus);
+ static ICellularRadio::PREFERRED_NETWORKS preferredNetwork(PREFERRED_NETWORKS prefNetwork, int wds);
};
}