summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeff Hatch <Jeff.Hatch@multitech.com>2018-05-25 14:52:15 -0500
committerJeff Hatch <Jeff.Hatch@multitech.com>2018-05-25 14:52:15 -0500
commit4b1e0509379acf7773ffa6575825bffb4c068d13 (patch)
tree7cd1d4184684ba7542fc26e396c92b8c900c5ce6 /src
parentbfcef5e9d1e384cf34ebef0f7cc98858a8445827 (diff)
downloadlibmts-io-4b1e0509379acf7773ffa6575825bffb4c068d13.tar.gz
libmts-io-4b1e0509379acf7773ffa6575825bffb4c068d13.tar.bz2
libmts-io-4b1e0509379acf7773ffa6575825bffb4c068d13.zip
Add support for LE866A1-JS radio for Japan1.0.8
Diffstat (limited to 'src')
-rw-r--r--src/MTS_IO_CellularRadio.cpp18
-rw-r--r--src/MTS_IO_CellularRadioFactory.cpp6
-rw-r--r--src/MTS_IO_LE866A1JSRadio.cpp38
-rw-r--r--src/MTS_IO_LE866Radio.cpp39
4 files changed, 96 insertions, 5 deletions
diff --git a/src/MTS_IO_CellularRadio.cpp b/src/MTS_IO_CellularRadio.cpp
index 6b49546..746d3c5 100644
--- a/src/MTS_IO_CellularRadio.cpp
+++ b/src/MTS_IO_CellularRadio.cpp
@@ -292,8 +292,11 @@ CellularRadio::CODE CellularRadio::convertModelToMtsShortCode(const std::string&
sCode = "H6";
eCode = SUCCESS;
} else if (sModel.find("LE910-JN1") == 0) {
- sCode = "LDC3";
- eCode = SUCCESS;
+ sCode = "LDC3";
+ eCode = SUCCESS;
+ } else if (sModel.find("LE866A1-JS") == 0) {
+ sCode = "LSB3";
+ eCode = SUCCESS;
} else if (sModel.find("LE910-NAG") == 0) {
sCode = "LAT1";
eCode = SUCCESS;
@@ -364,8 +367,11 @@ CellularRadio::CODE CellularRadio::convertModelToType(const std::string& sModel,
sType = VALUE_TYPE_GSM;
eCode = SUCCESS;
} else if (sModel.find("LE910-JN1") == 0) {
- sType = VALUE_TYPE_LTE;
- eCode = SUCCESS;
+ sType = VALUE_TYPE_LTE;
+ eCode = SUCCESS;
+ } else if (sModel.find("LE866A1-JS") == 0) {
+ sType = VALUE_TYPE_LTE;
+ eCode = SUCCESS;
} else if (sModel.find("LE910-NAG") == 0) {
sType = VALUE_TYPE_LTE;
eCode = SUCCESS;
@@ -1556,7 +1562,9 @@ std::string CellularRadio::extractModelFromResult(const std::string& sResult) {
} else if(sResult.find("HE910-EUD") != std::string::npos) {
sModel = "HE910-EUD";
} else if(sResult.find("LE910-JN1") != std::string::npos) {
- sModel = "LE910-JN1";
+ sModel = "LE910-JN1";
+ } else if(sResult.find("LE866A1-JS") != std::string::npos) {
+ sModel = "LE866A1-JS";
} else if(sResult.find("LE910-NAG") != std::string::npos) {
sModel = "LE910-NAG";
} else if(sResult.find("LE910-NA1") != std::string::npos) {
diff --git a/src/MTS_IO_CellularRadioFactory.cpp b/src/MTS_IO_CellularRadioFactory.cpp
index df70d90..7a3f513 100644
--- a/src/MTS_IO_CellularRadioFactory.cpp
+++ b/src/MTS_IO_CellularRadioFactory.cpp
@@ -36,6 +36,7 @@
#include <mts/MTS_IO_LE910EUGRadio.h>
#include <mts/MTS_IO_ME910C1NARadio.h>
#include <mts/MTS_IO_ME910C1NVRadio.h>
+#include <mts/MTS_IO_LE866A1JSRadio.h>
#include <mts/MTS_IO_GE910Radio.h>
#include <mts/MTS_IO_CE910Radio.h>
#include <mts/MTS_IO_DE910Radio.h>
@@ -55,6 +56,7 @@ CellularRadioFactory::CellularRadioFactory() {
m_mCreationMap[GE910Radio::MODEL_NAME] = &CellularRadioFactory::createGE910;
m_mCreationMap[DE910Radio::MODEL_NAME] = &CellularRadioFactory::createDE910;
m_mCreationMap[CE910Radio::MODEL_NAME] = &CellularRadioFactory::createCE910;
+ m_mCreationMap[LE866A1JSRadio::MODEL_NAME] = &CellularRadioFactory::createLE866A1JS;
}
MTS::IO::CellularRadio* CellularRadioFactory::create(const std::string& sModel, const std::string& sPort) {
@@ -161,3 +163,7 @@ CellularRadio* CellularRadioFactory::createDE910(const std::string& sPort) {
CellularRadio* CellularRadioFactory::createCE910(const std::string& sPort) {
return new CE910Radio(sPort);
}
+
+CellularRadio* CellularRadioFactory::createLE866A1JS(const std::string &sPort) {
+ return new LE866A1JSRadio(sPort);
+}
diff --git a/src/MTS_IO_LE866A1JSRadio.cpp b/src/MTS_IO_LE866A1JSRadio.cpp
new file mode 100644
index 0000000..fc5a2ce
--- /dev/null
+++ b/src/MTS_IO_LE866A1JSRadio.cpp
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2018 by Multi-Tech Systems
+ *
+ * This file is part of libmts-io.
+ *
+ * libmts-io is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * libmts-io is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with libmts-io. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/*
+ * MTS_IO_LE866A1JSRadio.cpp
+ *
+ * Created on: May 24, 2018
+ * Author: jeff
+ */
+
+#include <mts/MTS_IO_LE866A1JSRadio.h>
+
+using namespace MTS::IO;
+
+const std::string LE866A1JSRadio::MODEL_NAME("LE866A1-JS");
+
+LE866A1JSRadio::LE866A1JSRadio(const std::string& sPort)
+: LE910Radio(MODEL_NAME, sPort)
+{
+
+}
diff --git a/src/MTS_IO_LE866Radio.cpp b/src/MTS_IO_LE866Radio.cpp
new file mode 100644
index 0000000..2e92f67
--- /dev/null
+++ b/src/MTS_IO_LE866Radio.cpp
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2018 by Multi-Tech Systems
+ *
+ * This file is part of libmts-io.
+ *
+ * libmts-io is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * libmts-io is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with libmts-io. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+/*
+ * MTS_IO_LE866Radio.cpp
+ *
+ * Created on: May 24, 2018
+ * Author: jeff
+ */
+
+#include <mts/MTS_Text.h>
+#include <mts/MTS_Logger.h>
+#include <mts/MTS_IO_LE866Radio.h>
+
+using namespace MTS::IO;
+
+LE866Radio::LE866Radio(const std::string& sLE866Model, const std::string& sPort)
+: CellularRadio(sLE866Model, sPort)
+{
+
+}
+
+