summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Hatch <jhatch@multitech.com>2019-11-26 09:17:03 -0600
committerJeff Hatch <jhatch@multitech.com>2019-11-26 09:17:03 -0600
commitf71e927e5af349bb9c778298cdeb8437a9a0e0cc (patch)
treed08672713f41ac9538e4b1085b9aa17f9d16a28b
parent7e44d14074eef23a8532f3e1070cdd51779428b1 (diff)
parent8dfb7d7bdcd06cd50e501d3e84d86de7cba2f2a5 (diff)
downloadlibmts-io-f71e927e5af349bb9c778298cdeb8437a9a0e0cc.tar.gz
libmts-io-f71e927e5af349bb9c778298cdeb8437a9a0e0cc.tar.bz2
libmts-io-f71e927e5af349bb9c778298cdeb8437a9a0e0cc.zip
Merge branch 'MTX-3072-lvw3-support' into 'master'
[GP-359][MTX-3072] mPower Edge: LVW3 radio support See merge request !6
-rw-r--r--include/mts/MTS_IO_CellularRadioFactory.h1
-rw-r--r--include/mts/MTS_IO_LE910SV1Radio.h48
-rw-r--r--src/MTS_IO_CellularRadioFactory.cpp6
-rw-r--r--src/MTS_IO_ICellularRadio.cpp8
-rw-r--r--src/MTS_IO_LE910SV1Radio.cpp36
5 files changed, 99 insertions, 0 deletions
diff --git a/include/mts/MTS_IO_CellularRadioFactory.h b/include/mts/MTS_IO_CellularRadioFactory.h
index c9cb56f..9b36489 100644
--- a/include/mts/MTS_IO_CellularRadioFactory.h
+++ b/include/mts/MTS_IO_CellularRadioFactory.h
@@ -43,6 +43,7 @@ namespace MTS {
ICellularRadio* createLE910C4NF(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT) const;
ICellularRadio* createLE910NA1(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT) const;
ICellularRadio* createLE910SVG(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT) const;
+ ICellularRadio* createLE910SV1(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT) const;
ICellularRadio* createLE910EUG(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT) const;
ICellularRadio* createLE910C4EU(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT) const;
ICellularRadio* createLE910EU1(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT) const;
diff --git a/include/mts/MTS_IO_LE910SV1Radio.h b/include/mts/MTS_IO_LE910SV1Radio.h
new file mode 100644
index 0000000..80536c1
--- /dev/null
+++ b/include/mts/MTS_IO_LE910SV1Radio.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2019 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/>.
+ *
+ */
+
+
+#ifndef MTS_IO_LE910SV1RADIO_H_
+#define MTS_IO_LE910SV1RADIO_H_
+
+#include "mts/MTS_IO_LE910Radio.h"
+
+namespace MTS {
+ namespace IO {
+
+ class LE910SV1Radio : public LE910Radio {
+
+ public:
+ static const std::string MODEL_NAME;
+
+ LE910SV1Radio(const std::string& sPort);
+ virtual ~LE910SV1Radio(){};
+
+ virtual CODE getCarrier(std::string& sCarrier);
+
+ protected:
+
+ private:
+
+ };
+ }
+}
+
+#endif /* MTS_IO_LE910SV1RADIO_H_ */
diff --git a/src/MTS_IO_CellularRadioFactory.cpp b/src/MTS_IO_CellularRadioFactory.cpp
index 4ee8756..b86f207 100644
--- a/src/MTS_IO_CellularRadioFactory.cpp
+++ b/src/MTS_IO_CellularRadioFactory.cpp
@@ -25,6 +25,7 @@
#include <mts/MTS_IO_LE910C4NFRadio.h>
#include <mts/MTS_IO_LE910NA1Radio.h>
#include <mts/MTS_IO_LE910SVGRadio.h>
+#include <mts/MTS_IO_LE910SV1Radio.h>
#include <mts/MTS_IO_LE910EUGRadio.h>
#include <mts/MTS_IO_LE910C4EURadio.h>
#include <mts/MTS_IO_LE910EU1Radio.h>
@@ -49,6 +50,7 @@ CellularRadioFactory::CellularRadioFactory() {
m_mCreationMap[LE910C4NFRadio::MODEL_NAME] = &CellularRadioFactory::createLE910C4NF;
m_mCreationMap[LE910NA1Radio::MODEL_NAME] = &CellularRadioFactory::createLE910NA1;
m_mCreationMap[LE910SVGRadio::MODEL_NAME] = &CellularRadioFactory::createLE910SVG;
+ m_mCreationMap[LE910SV1Radio::MODEL_NAME] = &CellularRadioFactory::createLE910SV1;
m_mCreationMap[LE910EUGRadio::MODEL_NAME] = &CellularRadioFactory::createLE910EUG;
m_mCreationMap[LE910C4EURadio::MODEL_NAME] = &CellularRadioFactory::createLE910C4EU;
m_mCreationMap[LE910EU1Radio::MODEL_NAME] = &CellularRadioFactory::createLE910EU1;
@@ -149,6 +151,10 @@ ICellularRadio* CellularRadioFactory::createLE910SVG(const std::string& sPort) c
return new LE910SVGRadio(sPort);
}
+ICellularRadio *CellularRadioFactory::createLE910SV1(const std::string& sPort) const {
+ return new LE910SV1Radio(sPort);
+}
+
ICellularRadio* CellularRadioFactory::createLE910EUG(const std::string& sPort) const {
return new LE910EUGRadio(sPort);
}
diff --git a/src/MTS_IO_ICellularRadio.cpp b/src/MTS_IO_ICellularRadio.cpp
index 4e7809e..89318ef 100644
--- a/src/MTS_IO_ICellularRadio.cpp
+++ b/src/MTS_IO_ICellularRadio.cpp
@@ -154,6 +154,9 @@ MTS::IO::ICellularRadio::CODE MTS::IO::ICellularRadio::convertModelToMtsShortCod
} else if (sModel.find("LE910-SVG") == 0) {
sCode = "LVW2";
eCode = SUCCESS;
+ } else if (sModel.find("LE910-SV1") == 0) {
+ sCode = "LVW3";
+ eCode = SUCCESS;
} else if (sModel.find("LE910C1-NS") == 0) {
sCode = "LSP3";
eCode = SUCCESS;
@@ -268,6 +271,9 @@ MTS::IO::ICellularRadio::CODE MTS::IO::ICellularRadio::convertModelToType(const
} else if (sModel.find("LE910-SVG") == 0) {
sType = VALUE_TYPE_LTE;
eCode = SUCCESS;
+ } else if (sModel.find("LE910-SV1") == 0) {
+ sType = VALUE_TYPE_LTE;
+ eCode = SUCCESS;
} else if (sModel.find("LE910-EUG") == 0) {
sType = VALUE_TYPE_LTE;
eCode = SUCCESS;
@@ -433,6 +439,8 @@ std::string MTS::IO::ICellularRadio::extractModelFromResult(const std::string& s
sModel = "ME910C1-WW";
} else if(sResult.find("LE910-SVG") != std::string::npos) {
sModel = "LE910-SVG";
+ } else if(sResult.find("LE910-SV1") != std::string::npos) {
+ sModel = "LE910-SV1";
} else if(sResult.find("LE910-EUG") != std::string::npos) {
sModel = "LE910-EUG";
} else if(sResult.find("LE910C4-EU") != std::string::npos) {
diff --git a/src/MTS_IO_LE910SV1Radio.cpp b/src/MTS_IO_LE910SV1Radio.cpp
new file mode 100644
index 0000000..8f0d116
--- /dev/null
+++ b/src/MTS_IO_LE910SV1Radio.cpp
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2019 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/>.
+ *
+ */
+
+#include <mts/MTS_IO_LE910SV1Radio.h>
+
+using namespace MTS::IO;
+
+const std::string LE910SV1Radio::MODEL_NAME("LE910-SV1");
+
+LE910SV1Radio::LE910SV1Radio(const std::string& sPort)
+: LE910Radio(MODEL_NAME, sPort)
+{
+
+}
+
+ICellularRadio::CODE LE910SV1Radio::getCarrier(std::string& sCarrier) {
+ sCarrier = "Verizon";
+ return SUCCESS;
+}