From 285cee922e229cb1bbd704e6227dbbb3756bd889 Mon Sep 17 00:00:00 2001 From: "rodion.shyshkin" Date: Wed, 31 Mar 2021 20:49:08 +0300 Subject: [GP-1111] mPower R. Apr 2021: +CEMODE shall be set to CEMODE=2 - libmts-io for Telit Adding an ability to set UE mode of operation to libmts-io. There was added two clear virtual methods in iCellularRadio, correct implementation for them for Telit LTE modems and implementation with error messages for all other. --- include/mts/MTS_IO_CellularRadio.h | 4 ++++ include/mts/MTS_IO_ICellularRadio.h | 12 ++++++++++++ include/mts/MTS_IO_LE910Radio.h | 3 +++ 3 files changed, 19 insertions(+) (limited to 'include/mts') diff --git a/include/mts/MTS_IO_CellularRadio.h b/include/mts/MTS_IO_CellularRadio.h index 2b03d8f..d0f7a14 100644 --- a/include/mts/MTS_IO_CellularRadio.h +++ b/include/mts/MTS_IO_CellularRadio.h @@ -134,6 +134,10 @@ namespace MTS { virtual std::string waitResponse(IsNeedMoreData& isNeedMoreData, int32_t timeoutMillis = 100) override; + CODE setUeModeOfOperation(UE_MODES_OF_OPERATION newmode) override; + CODE getUeModeOfOperation(UE_MODES_OF_OPERATION& newmode) override; + CODE convertUeModeToString(UE_MODES_OF_OPERATION mode, std::string &string) 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 61ffd20..b84d4b8 100644 --- a/include/mts/MTS_IO_ICellularRadio.h +++ b/include/mts/MTS_IO_ICellularRadio.h @@ -68,6 +68,14 @@ namespace MTS { CELLULAR_MODE_5G = 1 << 3 // 5G }; + enum UE_MODES_OF_OPERATION : uint8_t { + UNKNOWN_MODE = 0, // current mode of operation is not available + PS_MODE1, // only EPS (LTE) services are allowed, the usage is “voice centric” + PS_MODE2, // only EPS (LTE) services are allowed, the usage is “data centric” + CS_PS_MODE1, // both EPS and non-EPS services are allowed, the usage is “voice centric” + CS_PS_MODE2 // both EPS and non-EPS services are allowed, the usage is “data centric” + }; + 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); @@ -562,6 +570,10 @@ namespace MTS { virtual std::string waitResponse(IsNeedMoreData& isNeedMoreData, int32_t timeoutMillis = 100) = 0; + + virtual CODE setUeModeOfOperation(UE_MODES_OF_OPERATION newmode) = 0; + virtual CODE getUeModeOfOperation(UE_MODES_OF_OPERATION& newmode) = 0; + virtual CODE convertUeModeToString(UE_MODES_OF_OPERATION mode, std::string& string) = 0; }; } } diff --git a/include/mts/MTS_IO_LE910Radio.h b/include/mts/MTS_IO_LE910Radio.h index 35e704d..e8a0dec 100644 --- a/include/mts/MTS_IO_LE910Radio.h +++ b/include/mts/MTS_IO_LE910Radio.h @@ -45,6 +45,9 @@ namespace MTS { CODE setRxDiversity(const Json::Value& jArgs); CODE getModemLocation(std::string& sLocation); + CODE setUeModeOfOperation(UE_MODES_OF_OPERATION newmode) override; + CODE getUeModeOfOperation(UE_MODES_OF_OPERATION &newmode) override; + protected: private: -- cgit v1.2.3 From 2ff46750ec3f1004a5c153944c18dbb081911a03 Mon Sep 17 00:00:00 2001 From: "rodion.shyshkin" Date: Wed, 31 Mar 2021 22:29:58 +0300 Subject: [GP-1111] mPower R. Apr 2021: +CEMODE shall be set to CEMODE=2 - libmts-io for Telit Changes after a code review --- include/mts/MTS_IO_CellularRadio.h | 1 - include/mts/MTS_IO_ICellularRadio.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'include/mts') diff --git a/include/mts/MTS_IO_CellularRadio.h b/include/mts/MTS_IO_CellularRadio.h index d0f7a14..6840398 100644 --- a/include/mts/MTS_IO_CellularRadio.h +++ b/include/mts/MTS_IO_CellularRadio.h @@ -136,7 +136,6 @@ namespace MTS { CODE setUeModeOfOperation(UE_MODES_OF_OPERATION newmode) override; CODE getUeModeOfOperation(UE_MODES_OF_OPERATION& newmode) override; - CODE convertUeModeToString(UE_MODES_OF_OPERATION mode, std::string &string) override; protected: diff --git a/include/mts/MTS_IO_ICellularRadio.h b/include/mts/MTS_IO_ICellularRadio.h index b84d4b8..63b4f08 100644 --- a/include/mts/MTS_IO_ICellularRadio.h +++ b/include/mts/MTS_IO_ICellularRadio.h @@ -80,6 +80,7 @@ namespace MTS { static CODE convertModelToMtsShortCode(const std::string& sModel, std::string& sCode, ICellularRadio *radioObj = NULL); static CODE convertServiceDomainToString(SERVICEDOMAIN eSd, std::string& sSd); static CODE convertActiveBandToString(ACTIVEBAND eBand, std::string& sBand); + static CODE convertUeModeToString(UE_MODES_OF_OPERATION mode, std::string& string); static std::string sendCommand(MTS::AutoPtr& apIo, const std::string& sCmd, @@ -573,7 +574,6 @@ namespace MTS { virtual CODE setUeModeOfOperation(UE_MODES_OF_OPERATION newmode) = 0; virtual CODE getUeModeOfOperation(UE_MODES_OF_OPERATION& newmode) = 0; - virtual CODE convertUeModeToString(UE_MODES_OF_OPERATION mode, std::string& string) = 0; }; } } -- cgit v1.2.3 From 76df85f676adde6f31c35f7809f9f7794baca2a1 Mon Sep 17 00:00:00 2001 From: "rodion.shyshkin" Date: Wed, 31 Mar 2021 22:54:54 +0300 Subject: [GP-1111] mPower R. Apr 2021: +CEMODE shall be set to CEMODE=2 - libmts-io for Telit Changes after a code review. --- include/mts/MTS_IO_ICellularRadio.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/mts') diff --git a/include/mts/MTS_IO_ICellularRadio.h b/include/mts/MTS_IO_ICellularRadio.h index 63b4f08..e8ae891 100644 --- a/include/mts/MTS_IO_ICellularRadio.h +++ b/include/mts/MTS_IO_ICellularRadio.h @@ -81,6 +81,7 @@ namespace MTS { static CODE convertServiceDomainToString(SERVICEDOMAIN eSd, std::string& sSd); static CODE convertActiveBandToString(ACTIVEBAND eBand, std::string& sBand); static CODE convertUeModeToString(UE_MODES_OF_OPERATION mode, std::string& string); + static CODE convertStringToUeMode(const std::string& sMode, UE_MODES_OF_OPERATION& mode); static std::string sendCommand(MTS::AutoPtr& apIo, const std::string& sCmd, -- cgit v1.2.3