summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMykyta Dorokhin <mykyta.dorokhin@globallogic.com>2017-10-04 10:49:00 +0300
committerJeff Hatch <Jeff.Hatch@multitech.com>2018-02-22 07:52:35 -0600
commite3c38ce54b17ef0fa3e251abadb2887c889257ad (patch)
tree673b6099745ef6342d24847914b94e34e48787b3
parentfd1092ec392500abf9a2a99f45988ec30764d9fe (diff)
downloadlibmts-io-e3c38ce54b17ef0fa3e251abadb2887c889257ad.tar.gz
libmts-io-e3c38ce54b17ef0fa3e251abadb2887c889257ad.tar.bz2
libmts-io-e3c38ce54b17ef0fa3e251abadb2887c889257ad.zip
add ME910C1 radio suport1.0.4
Signed-off-by: Jeff Hatch <Jeff.Hatch@multitech.com>
-rw-r--r--Makefile6
-rw-r--r--include/mts/MTS_IO_CellularRadioFactory.h2
-rw-r--r--include/mts/MTS_IO_ME910C1NARadio.h53
-rw-r--r--include/mts/MTS_IO_ME910C1NVRadio.h55
-rw-r--r--include/mts/MTS_IO_ME910Radio.h59
-rw-r--r--src/MTS_IO_CellularRadio.cpp16
-rw-r--r--src/MTS_IO_CellularRadioFactory.cpp12
-rw-r--r--src/MTS_IO_ME910C1NARadio.cpp39
-rw-r--r--src/MTS_IO_ME910C1NVRadio.cpp44
-rw-r--r--src/MTS_IO_ME910Radio.cpp40
10 files changed, 326 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 1a0381a..b89749c 100644
--- a/Makefile
+++ b/Makefile
@@ -20,6 +20,9 @@ MTS_IO_LE910NAGRadio.o \
MTS_IO_LE910NA1Radio.o \
MTS_IO_LE910SVGRadio.o \
MTS_IO_LE910EUGRadio.o \
+MTS_IO_ME910C1NARadio.o \
+MTS_IO_ME910C1NVRadio.o \
+MTS_IO_ME910Radio.o \
MTS_IO_LockFile.o \
MTS_IO_MccMncTable.o \
MTS_IO_SerialConnection.o
@@ -41,6 +44,9 @@ MTS_IO_LE910NAGRadio.d \
MTS_IO_LE910NA1Radio.d \
MTS_IO_LE910SVGRadio.d \
MTS_IO_LE910EUGRadio.d \
+MTS_IO_ME910C1NARadio.d \
+MTS_IO_ME910C1NVRadio.d \
+MTS_IO_ME910Radio.d \
MTS_IO_LockFile.d \
MTS_IO_MccMncTable.d \
MTS_IO_SerialConnection.d
diff --git a/include/mts/MTS_IO_CellularRadioFactory.h b/include/mts/MTS_IO_CellularRadioFactory.h
index bcdcac0..8a5aeb9 100644
--- a/include/mts/MTS_IO_CellularRadioFactory.h
+++ b/include/mts/MTS_IO_CellularRadioFactory.h
@@ -55,6 +55,8 @@ namespace MTS {
virtual CellularRadio* createLE910NA1(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT);
virtual CellularRadio* createLE910SVG(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT);
virtual CellularRadio* createLE910EUG(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT);
+ virtual CellularRadio* createME910C1NA(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT);
+ virtual CellularRadio* createME910C1NV(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT);
virtual CellularRadio* createGE910(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT);
virtual CellularRadio* createDE910(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT);
virtual CellularRadio* createCE910(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT);
diff --git a/include/mts/MTS_IO_ME910C1NARadio.h b/include/mts/MTS_IO_ME910C1NARadio.h
new file mode 100644
index 0000000..c3ceac3
--- /dev/null
+++ b/include/mts/MTS_IO_ME910C1NARadio.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2015 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/>.
+ *
+ */
+
+/*!
+ \file MTS_IO_ME910C1NARadio.h
+ \brief A brief description
+ \date Jan 19, 2015
+ \author sgodinez
+
+ A more elaborate description
+*/
+#ifndef MTS_IO_ME910C1NARADIO_H_
+#define MTS_IO_ME910C1NARADIO_H_
+
+#include <mts/MTS_IO_ME910Radio.h>
+
+namespace MTS {
+ namespace IO {
+
+ class ME910C1NARadio : public ME910Radio {
+
+ public:
+ static const std::string MODEL_NAME;
+
+ ME910C1NARadio(const std::string& sPort);
+ virtual ~ME910C1NARadio(){};
+
+ protected:
+
+ private:
+
+ };
+ }
+}
+
+#endif /* MTS_IO_ME910C1NARADIO_H_ */
diff --git a/include/mts/MTS_IO_ME910C1NVRadio.h b/include/mts/MTS_IO_ME910C1NVRadio.h
new file mode 100644
index 0000000..44dca6b
--- /dev/null
+++ b/include/mts/MTS_IO_ME910C1NVRadio.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2015 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/>.
+ *
+ */
+
+/*!
+ \file MTS_IO_ME910C1NVRadio.h
+ \brief A brief description
+ \date Jan 19, 2015
+ \author sgodinez
+
+ A more elaborate description
+*/
+#ifndef MTS_IO_ME910C1NVRadio_H_
+#define MTS_IO_ME910C1NVRadio_H_
+
+#include <mts/MTS_IO_ME910Radio.h>
+
+namespace MTS {
+ namespace IO {
+
+ class ME910C1NVRadio : public ME910Radio {
+
+ public:
+ static const std::string MODEL_NAME;
+
+ ME910C1NVRadio(const std::string& sPort);
+ virtual ~ME910C1NVRadio(){};
+
+ virtual CODE getCarrier(std::string& sCarrier);
+
+ protected:
+
+ private:
+
+ };
+ }
+}
+
+#endif /* MTS_IO_ME910C1NVRadio_H_ */
diff --git a/include/mts/MTS_IO_ME910Radio.h b/include/mts/MTS_IO_ME910Radio.h
new file mode 100644
index 0000000..b3eefcf
--- /dev/null
+++ b/include/mts/MTS_IO_ME910Radio.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2015 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/>.
+ *
+ */
+
+/*!
+ \file MTS_IO_ME910Radio.h
+ \brief A brief description
+ \date Nov 5, 2014
+ \author sgodinez
+
+ A more elaborate description
+*/
+#ifndef MTS_IO_ME910RADIO_H_
+#define MTS_IO_ME910RADIO_H_
+
+#include <mts/MTS_IO_CellularRadio.h>
+
+namespace MTS {
+ namespace IO {
+
+ class ME910Radio : public CellularRadio {
+
+ public:
+ static const std::string MODEL_NAME;
+
+ ME910Radio(const std::string& sME910Model, const std::string& sPort);
+ virtual ~ME910Radio(){};
+
+ virtual CODE setRxDiversity(const Json::Value& jArgs);
+
+ protected:
+
+ private:
+
+
+ };
+ }
+}
+
+
+
+
+#endif /* MTS_IO_ME910RADIO_H_ */
diff --git a/src/MTS_IO_CellularRadio.cpp b/src/MTS_IO_CellularRadio.cpp
index 02ce253..9b4502d 100644
--- a/src/MTS_IO_CellularRadio.cpp
+++ b/src/MTS_IO_CellularRadio.cpp
@@ -299,6 +299,12 @@ CellularRadio::CODE CellularRadio::convertModelToMtsShortCode(const std::string&
} else if (sModel.find("LE910-SVG") == 0) {
sCode = "LVW2";
eCode = SUCCESS;
+ } else if (sModel.find("ME910C1-NA") == 0) {
+ sCode = "MAT1";
+ eCode = SUCCESS;
+ } else if (sModel.find("ME910C1-NV") == 0) {
+ sCode = "MVW1";
+ eCode = SUCCESS;
} else if (sModel.find("LE910-EUG") == 0) {
sCode = "LEU1";
eCode = SUCCESS;
@@ -368,6 +374,12 @@ CellularRadio::CODE CellularRadio::convertModelToType(const std::string& sModel,
} else if (sModel.find("LE910-EUG") == 0) {
sType = VALUE_TYPE_LTE;
eCode = SUCCESS;
+ } else if (sModel.find("ME910C1-NA") == 0) {
+ sType = VALUE_TYPE_LTE;
+ eCode = SUCCESS;
+ } else if (sModel.find("ME910C1-NV") == 0) {
+ sType = VALUE_TYPE_LTE;
+ eCode = SUCCESS;
} else if (sModel.find("GE910") == 0) {
sType = VALUE_TYPE_GSM;
eCode = SUCCESS;
@@ -1528,6 +1540,10 @@ std::string CellularRadio::extractModelFromResult(const std::string& sResult) {
sModel = "LE910-NAG";
} else if(sResult.find("LE910-NA1") != std::string::npos) {
sModel = "LE910-NA1";
+ } else if(sResult.find("ME910C1-NA") != std::string::npos) {
+ sModel = "ME910C1-NA";
+ } else if(sResult.find("ME910C1-NV") != std::string::npos) {
+ sModel = "ME910C1-NV";
} else if(sResult.find("LE910-SVG") != std::string::npos) {
sModel = "LE910-SVG";
} else if(sResult.find("LE910-EUG") != std::string::npos) {
diff --git a/src/MTS_IO_CellularRadioFactory.cpp b/src/MTS_IO_CellularRadioFactory.cpp
index 13f7335..df70d90 100644
--- a/src/MTS_IO_CellularRadioFactory.cpp
+++ b/src/MTS_IO_CellularRadioFactory.cpp
@@ -34,6 +34,8 @@
#include <mts/MTS_IO_LE910NA1Radio.h>
#include <mts/MTS_IO_LE910SVGRadio.h>
#include <mts/MTS_IO_LE910EUGRadio.h>
+#include <mts/MTS_IO_ME910C1NARadio.h>
+#include <mts/MTS_IO_ME910C1NVRadio.h>
#include <mts/MTS_IO_GE910Radio.h>
#include <mts/MTS_IO_CE910Radio.h>
#include <mts/MTS_IO_DE910Radio.h>
@@ -48,6 +50,8 @@ CellularRadioFactory::CellularRadioFactory() {
m_mCreationMap[LE910NA1Radio::MODEL_NAME] = &CellularRadioFactory::createLE910NA1;
m_mCreationMap[LE910SVGRadio::MODEL_NAME] = &CellularRadioFactory::createLE910SVG;
m_mCreationMap[LE910EUGRadio::MODEL_NAME] = &CellularRadioFactory::createLE910EUG;
+ m_mCreationMap[ME910C1NARadio::MODEL_NAME] = &CellularRadioFactory::createME910C1NA;
+ m_mCreationMap[ME910C1NVRadio::MODEL_NAME] = &CellularRadioFactory::createME910C1NV;
m_mCreationMap[GE910Radio::MODEL_NAME] = &CellularRadioFactory::createGE910;
m_mCreationMap[DE910Radio::MODEL_NAME] = &CellularRadioFactory::createDE910;
m_mCreationMap[CE910Radio::MODEL_NAME] = &CellularRadioFactory::createCE910;
@@ -138,6 +142,14 @@ CellularRadio* CellularRadioFactory::createLE910EUG(const std::string& sPort) {
return new LE910EUGRadio(sPort);
}
+CellularRadio* CellularRadioFactory::createME910C1NA(const std::string& sPort) {
+ return new ME910C1NARadio(sPort);
+}
+
+CellularRadio* CellularRadioFactory::createME910C1NV(const std::string& sPort) {
+ return new ME910C1NVRadio(sPort);
+}
+
CellularRadio* CellularRadioFactory::createGE910(const std::string& sPort) {
return new GE910Radio(sPort);
}
diff --git a/src/MTS_IO_ME910C1NARadio.cpp b/src/MTS_IO_ME910C1NARadio.cpp
new file mode 100644
index 0000000..698bbf7
--- /dev/null
+++ b/src/MTS_IO_ME910C1NARadio.cpp
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2017 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/>.
+ *
+ */
+
+/*!
+ \file MTS_IO_ME910C1NARadio.cpp
+ \brief A brief description
+
+ A more elaborate description
+*/
+#include <mts/MTS_Text.h>
+#include <mts/MTS_Logger.h>
+#include <mts/MTS_IO_ME910C1NARadio.h>
+
+using namespace MTS::IO;
+
+const std::string ME910C1NARadio::MODEL_NAME("ME910C1-NA");
+
+ME910C1NARadio::ME910C1NARadio(const std::string& sPort)
+: ME910Radio(MODEL_NAME, sPort)
+{
+
+}
diff --git a/src/MTS_IO_ME910C1NVRadio.cpp b/src/MTS_IO_ME910C1NVRadio.cpp
new file mode 100644
index 0000000..bc2282f
--- /dev/null
+++ b/src/MTS_IO_ME910C1NVRadio.cpp
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2017 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/>.
+ *
+ */
+
+/*!
+ \file MTS_IO_ME910C1NVRadio.cpp
+ \brief A brief description
+
+ A more elaborate description
+*/
+#include <mts/MTS_Text.h>
+#include <mts/MTS_Logger.h>
+#include <mts/MTS_IO_ME910C1NVRadio.h>
+
+using namespace MTS::IO;
+
+const std::string ME910C1NVRadio::MODEL_NAME("ME910C1-NV");
+
+ME910C1NVRadio::ME910C1NVRadio(const std::string& sPort)
+: ME910Radio(MODEL_NAME, sPort)
+{
+
+}
+
+CellularRadio::CODE ME910C1NVRadio::getCarrier(std::string& sCarrier) {
+ sCarrier = "Verizon";
+ return SUCCESS;
+}
diff --git a/src/MTS_IO_ME910Radio.cpp b/src/MTS_IO_ME910Radio.cpp
new file mode 100644
index 0000000..5ffb191
--- /dev/null
+++ b/src/MTS_IO_ME910Radio.cpp
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2017 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/>.
+ *
+ */
+
+/*!
+ \file MTS_IO_ME910Radio.cpp
+ \brief A brief description
+
+ A more elaborate description
+*/
+
+#include <mts/MTS_IO_ME910Radio.h>
+
+using namespace MTS::IO;
+
+ME910Radio::ME910Radio(const std::string& sME910Model, const std::string& sPort)
+: CellularRadio(sME910Model, sPort)
+{
+
+}
+
+CellularRadio::CODE ME910Radio::setRxDiversity(const Json::Value& jArgs) {
+ return FAILURE;
+}