diff options
author | Serhii Kostiuk <serhii.o.kostiuk@globallogic.com> | 2019-11-22 12:49:11 +0200 |
---|---|---|
committer | Serhii Kostiuk <serhii.o.kostiuk@globallogic.com> | 2019-11-22 15:16:30 +0200 |
commit | 8dfb7d7bdcd06cd50e501d3e84d86de7cba2f2a5 (patch) | |
tree | d08672713f41ac9538e4b1085b9aa17f9d16a28b /src | |
parent | 7e44d14074eef23a8532f3e1070cdd51779428b1 (diff) | |
download | libmts-io-8dfb7d7bdcd06cd50e501d3e84d86de7cba2f2a5.tar.gz libmts-io-8dfb7d7bdcd06cd50e501d3e84d86de7cba2f2a5.tar.bz2 libmts-io-8dfb7d7bdcd06cd50e501d3e84d86de7cba2f2a5.zip |
[GP-359][MTX-3072] mPower Edge: LVW3 radio support
Added LVW3 radio support to the libmts-io.
Diffstat (limited to 'src')
-rw-r--r-- | src/MTS_IO_CellularRadioFactory.cpp | 6 | ||||
-rw-r--r-- | src/MTS_IO_ICellularRadio.cpp | 8 | ||||
-rw-r--r-- | src/MTS_IO_LE910SV1Radio.cpp | 36 |
3 files changed, 50 insertions, 0 deletions
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; +} |