summaryrefslogtreecommitdiff
path: root/src/MTS_IO_TelitRadio.cpp
diff options
context:
space:
mode:
authorSerhii Kostiuk <serhii.o.kostiuk@globallogic.com>2019-06-11 15:52:53 +0300
committerSerhii Kostiuk <serhii.o.kostiuk@globallogic.com>2019-06-11 16:23:13 +0300
commitf335cec14c262b22f8d9f84e528917d7b1a53fa5 (patch)
tree694944ba5046b891f01bba4d740a376dcbebd042 /src/MTS_IO_TelitRadio.cpp
parent6848f0470159df2318c2377a08766a3bb9dcb4c3 (diff)
downloadlibmts-io-f335cec14c262b22f8d9f84e528917d7b1a53fa5.tar.gz
libmts-io-f335cec14c262b22f8d9f84e528917d7b1a53fa5.tar.bz2
libmts-io-f335cec14c262b22f8d9f84e528917d7b1a53fa5.zip
[MTS-MTQ] QuectelRadio implementation
Moved CellularRadio::getNetwork implementation to the TelitRadio::getNetwork as Quectel radio doesn't have a AT#RFSTS command that returns the needed field.
Diffstat (limited to 'src/MTS_IO_TelitRadio.cpp')
-rw-r--r--src/MTS_IO_TelitRadio.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/MTS_IO_TelitRadio.cpp b/src/MTS_IO_TelitRadio.cpp
index 6ce240e..7f9de63 100644
--- a/src/MTS_IO_TelitRadio.cpp
+++ b/src/MTS_IO_TelitRadio.cpp
@@ -127,6 +127,21 @@ CellularRadio::CODE TelitRadio::getService(std::string& sService) {
return SUCCESS;
}
+CellularRadio::CODE TelitRadio::getNetwork(std::string& sNetwork) {
+ Json::Value jData;
+
+ printTrace("%s| Get Network", getName().c_str());
+ sNetwork = VALUE_NOT_SUPPORTED;
+
+ if(getNetworkStatus(jData) == SUCCESS) {
+ if(jData.isMember(KEY_NETWORK)) {
+ sNetwork = jData[KEY_NETWORK].asString();
+ return SUCCESS;
+ }
+ }
+ return FAILURE;
+}
+
/* AT#RFSTS - NETWORK STATUS
(GSM network)