diff options
author | Mykyta Dorokhin <mykyta.dorokhin@globallogic.com> | 2017-10-04 10:49:00 +0300 |
---|---|---|
committer | Jeff Hatch <Jeff.Hatch@multitech.com> | 2018-02-22 07:52:35 -0600 |
commit | e3c38ce54b17ef0fa3e251abadb2887c889257ad (patch) | |
tree | 673b6099745ef6342d24847914b94e34e48787b3 /src | |
parent | fd1092ec392500abf9a2a99f45988ec30764d9fe (diff) | |
download | libmts-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>
Diffstat (limited to 'src')
-rw-r--r-- | src/MTS_IO_CellularRadio.cpp | 16 | ||||
-rw-r--r-- | src/MTS_IO_CellularRadioFactory.cpp | 12 | ||||
-rw-r--r-- | src/MTS_IO_ME910C1NARadio.cpp | 39 | ||||
-rw-r--r-- | src/MTS_IO_ME910C1NVRadio.cpp | 44 | ||||
-rw-r--r-- | src/MTS_IO_ME910Radio.cpp | 40 |
5 files changed, 151 insertions, 0 deletions
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; +} |