diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | include/mts/MTS_IO_CellularRadioFactory.h | 1 | ||||
-rw-r--r-- | include/mts/MTS_IO_LE910C1NSRadio.h | 47 | ||||
-rw-r--r-- | src/MTS_IO_CellularRadio.cpp | 8 | ||||
-rw-r--r-- | src/MTS_IO_CellularRadioFactory.cpp | 6 | ||||
-rw-r--r-- | src/MTS_IO_LE910C1NSRadio.cpp | 45 |
6 files changed, 109 insertions, 0 deletions
@@ -23,6 +23,7 @@ MTS_IO_LE910NA1Radio.o \ MTS_IO_LE910SVGRadio.o \ MTS_IO_LE910EUGRadio.o \ MTS_IO_LE910EU1Radio.o \ +MTS_IO_LE910C1NSRadio.o \ MTS_IO_ME910C1NARadio.o \ MTS_IO_ME910C1NVRadio.o \ MTS_IO_ME910Radio.o \ @@ -50,6 +51,7 @@ MTS_IO_LE910NA1Radio.d \ MTS_IO_LE910SVGRadio.d \ MTS_IO_LE910EUGRadio.d \ MTS_IO_LE910EU1Radio.d \ +MTS_IO_LE910C1NSRadio.d \ MTS_IO_ME910C1NARadio.d \ MTS_IO_ME910C1NVRadio.d \ MTS_IO_ME910Radio.d \ diff --git a/include/mts/MTS_IO_CellularRadioFactory.h b/include/mts/MTS_IO_CellularRadioFactory.h index f42cc91..6beec43 100644 --- a/include/mts/MTS_IO_CellularRadioFactory.h +++ b/include/mts/MTS_IO_CellularRadioFactory.h @@ -56,6 +56,7 @@ namespace MTS { virtual CellularRadio* createLE910SVG(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT); virtual CellularRadio* createLE910EUG(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT); virtual CellularRadio* createLE910EU1(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT); + virtual CellularRadio* createLE910C1NS(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); diff --git a/include/mts/MTS_IO_LE910C1NSRadio.h b/include/mts/MTS_IO_LE910C1NSRadio.h new file mode 100644 index 0000000..840a36c --- /dev/null +++ b/include/mts/MTS_IO_LE910C1NSRadio.h @@ -0,0 +1,47 @@ +/* + * 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/>. + * + */ + +#ifndef MTS_IO_LE910C1NSRADIO_H_ +#define MTS_IO_LE910C1NSRADIO_H_ + +#include <mts/MTS_IO_LE910Radio.h> + +namespace MTS { + namespace IO { + + class LE910C1NSRadio : public LE910Radio { + + public: + static const std::string MODEL_NAME; + + LE910C1NSRadio(const std::string& sPort); + virtual ~LE910C1NSRadio(){}; + + virtual CODE getCarrier(std::string& sCarrier); + + protected: + + private: + + }; + } +} + +#endif /* MTS_IO_LE910SVGRADIO_H_ */ diff --git a/src/MTS_IO_CellularRadio.cpp b/src/MTS_IO_CellularRadio.cpp index f84cb6e..f2b4826 100644 --- a/src/MTS_IO_CellularRadio.cpp +++ b/src/MTS_IO_CellularRadio.cpp @@ -318,6 +318,9 @@ CellularRadio::CODE CellularRadio::convertModelToMtsShortCode(const std::string& } else if (sModel.find("LE910-SVG") == 0) { sCode = "LVW2"; eCode = SUCCESS; + } else if (sModel.find("LE910C1-NS") == 0) { + sCode = "LSP3"; + eCode = SUCCESS; } else if (sModel.find("ME910C1-NA") == 0) { sCode = "MAT1"; eCode = SUCCESS; @@ -402,6 +405,9 @@ CellularRadio::CODE CellularRadio::convertModelToType(const std::string& sModel, } else if (sModel.find("LE910-EU1") == 0) { sType = VALUE_TYPE_LTE; eCode = SUCCESS; + } else if (sModel.find("LE910C1-NS") == 0) { + sType = VALUE_TYPE_LTE; + eCode = SUCCESS; } else if (sModel.find("ME910C1-NA") == 0) { sType = VALUE_TYPE_LTE; eCode = SUCCESS; @@ -1597,6 +1603,8 @@ std::string CellularRadio::extractModelFromResult(const std::string& sResult) { sModel = "LE910-EUG"; } else if(sResult.find("LE910-EU1") != std::string::npos) { sModel = "LE910-EU1"; + } else if(sResult.find("LE910C1-NS") != std::string::npos) { + sModel = "LE910C1-NS"; } else if(sResult.find("GE910") != std::string::npos) { sModel = "GE910"; } else if(sResult.find("DE910-DUAL") != std::string::npos) { diff --git a/src/MTS_IO_CellularRadioFactory.cpp b/src/MTS_IO_CellularRadioFactory.cpp index 5a490cc..ea93f28 100644 --- a/src/MTS_IO_CellularRadioFactory.cpp +++ b/src/MTS_IO_CellularRadioFactory.cpp @@ -35,6 +35,7 @@ #include <mts/MTS_IO_LE910SVGRadio.h> #include <mts/MTS_IO_LE910EUGRadio.h> #include <mts/MTS_IO_LE910EU1Radio.h> +#include <mts/MTS_IO_LE910C1NSRadio.h> #include <mts/MTS_IO_ME910C1NARadio.h> #include <mts/MTS_IO_ME910C1NVRadio.h> #include <mts/MTS_IO_LE866A1JSRadio.h> @@ -53,6 +54,7 @@ CellularRadioFactory::CellularRadioFactory() { m_mCreationMap[LE910SVGRadio::MODEL_NAME] = &CellularRadioFactory::createLE910SVG; m_mCreationMap[LE910EUGRadio::MODEL_NAME] = &CellularRadioFactory::createLE910EUG; m_mCreationMap[LE910EU1Radio::MODEL_NAME] = &CellularRadioFactory::createLE910EU1; + m_mCreationMap[LE910C1NSRadio::MODEL_NAME] = &CellularRadioFactory::createLE910C1NS; m_mCreationMap[ME910C1NARadio::MODEL_NAME] = &CellularRadioFactory::createME910C1NA; m_mCreationMap[ME910C1NVRadio::MODEL_NAME] = &CellularRadioFactory::createME910C1NV; m_mCreationMap[GE910Radio::MODEL_NAME] = &CellularRadioFactory::createGE910; @@ -150,6 +152,10 @@ CellularRadio* CellularRadioFactory::createLE910EU1(const std::string& sPort) { return new LE910EU1Radio(sPort); } +CellularRadio* CellularRadioFactory::createLE910C1NS(const std::string& sPort) { + return new LE910C1NSRadio(sPort); +} + CellularRadio* CellularRadioFactory::createME910C1NA(const std::string& sPort) { return new ME910C1NARadio(sPort); } diff --git a/src/MTS_IO_LE910C1NSRadio.cpp b/src/MTS_IO_LE910C1NSRadio.cpp new file mode 100644 index 0000000..6c403a0 --- /dev/null +++ b/src/MTS_IO_LE910C1NSRadio.cpp @@ -0,0 +1,45 @@ +/* + * 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_LE910SVGRadio.cpp + \brief A brief description + \date Jan 19, 2015 + \author sgodinez + + A more elaborate description +*/ + +#include <mts/MTS_IO_LE910C1NSRadio.h> + +using namespace MTS::IO; + +const std::string LE910C1NSRadio::MODEL_NAME("LE910C1-NS"); + +LE910C1NSRadio::LE910C1NSRadio(const std::string& sPort) +: LE910Radio(MODEL_NAME, sPort) +{ + +} + +CellularRadio::CODE LE910C1NSRadio::getCarrier(std::string& sCarrier) { + sCarrier = "Sprint"; + return SUCCESS; +} |