diff options
author | Jeff Hatch <jhatch@multitech.com> | 2019-02-18 13:35:44 -0600 |
---|---|---|
committer | Jeff Hatch <jhatch@multitech.com> | 2019-02-18 13:35:44 -0600 |
commit | 4df85d1a64ded69f1ddd6c4c26e4f52773605c4a (patch) | |
tree | 86f6c8e25045514697429d0f2ceb2a2c2f8c29c9 | |
parent | c6b2972d1102e7986c9d188119b06aef11caa41c (diff) | |
download | libmts-io-4df85d1a64ded69f1ddd6c4c26e4f52773605c4a.tar.gz libmts-io-4df85d1a64ded69f1ddd6c4c26e4f52773605c4a.tar.bz2 libmts-io-4df85d1a64ded69f1ddd6c4c26e4f52773605c4a.zip |
Add support for LE910C1-AP radio1.0.14
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | include/mts/MTS_IO_CellularRadioFactory.h | 11 | ||||
-rw-r--r-- | include/mts/MTS_IO_LE910C1APRadio.h | 47 | ||||
-rw-r--r-- | src/MTS_IO_CellularRadio.cpp | 28 | ||||
-rw-r--r-- | src/MTS_IO_CellularRadioFactory.cpp | 19 | ||||
-rw-r--r-- | src/MTS_IO_LE910C1APRadio.cpp | 36 |
6 files changed, 104 insertions, 39 deletions
@@ -24,6 +24,7 @@ MTS_IO_LE910SVGRadio.o \ MTS_IO_LE910EUGRadio.o \ MTS_IO_LE910EU1Radio.o \ MTS_IO_LE910C1NSRadio.o \ +MTS_IO_LE910C1APRadio.o \ MTS_IO_ME910C1NARadio.o \ MTS_IO_ME910C1NVRadio.o \ MTS_IO_ME910Radio.o \ @@ -52,6 +53,7 @@ MTS_IO_LE910SVGRadio.d \ MTS_IO_LE910EUGRadio.d \ MTS_IO_LE910EU1Radio.d \ MTS_IO_LE910C1NSRadio.d \ +MTS_IO_LE910C1APRadio.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 6beec43..b2db5aa 100644 --- a/include/mts/MTS_IO_CellularRadioFactory.h +++ b/include/mts/MTS_IO_CellularRadioFactory.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015 by Multi-Tech Systems + * Copyright (C) 2019 by Multi-Tech Systems * * This file is part of libmts-io. * @@ -18,14 +18,6 @@ * */ -/*! - \file MTS_IO_CellularRadioFactory.h - \brief A brief description - \date Nov 5, 2014 - \author sgodinez - - A more elaborate description -*/ #ifndef MTS_IO_CELLULARRADIOFACTORY_H_ #define MTS_IO_CELLULARRADIOFACTORY_H_ @@ -57,6 +49,7 @@ namespace MTS { 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* createLE910C1AP(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_LE910C1APRadio.h b/include/mts/MTS_IO_LE910C1APRadio.h new file mode 100644 index 0000000..56ee916 --- /dev/null +++ b/include/mts/MTS_IO_LE910C1APRadio.h @@ -0,0 +1,47 @@ +/* + * 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_LE910C1APRADIO_H_ +#define MTS_IO_LE910C1APRADIO_H_ + +#include <mts/MTS_IO_LE910Radio.h> + +namespace MTS { + namespace IO { + + class LE910C1APRadio : public LE910Radio { + + public: + static const std::string MODEL_NAME; + + LE910C1APRadio(const std::string& sPort); + virtual ~LE910C1APRadio(){}; + + virtual CODE getCarrier(std::string& sCarrier); + + protected: + + private: + + }; + } +} + +#endif /* MTS_IO_LE910C1APRADIO_H_ */ diff --git a/src/MTS_IO_CellularRadio.cpp b/src/MTS_IO_CellularRadio.cpp index 786510d..4db91cb 100644 --- a/src/MTS_IO_CellularRadio.cpp +++ b/src/MTS_IO_CellularRadio.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015 by Multi-Tech Systems + * Copyright (C) 2019 by Multi-Tech Systems * * This file is part of libmts-io. * @@ -18,24 +18,6 @@ * */ -/*! - \file MTS_IO_CellularRadio.cpp - \brief A brief description - \date Nov 5, 2014 - \author sgodinez - - A more elaborate description -*/ - -/*! - \file MTS_CELL_CellularRadio.cpp - \brief A brief description - \date Nov 4, 2014 - \author sgodinez - - A more elaborate description -*/ - #include <mts/MTS_IO_CellularRadio.h> #include <mts/MTS_IO_MccMncTable.h> #include <mts/MTS_Thread.h> @@ -321,6 +303,9 @@ CellularRadio::CODE CellularRadio::convertModelToMtsShortCode(const std::string& } else if (sModel.find("LE910C1-NS") == 0) { sCode = "LSP3"; eCode = SUCCESS; + } else if (sModel.find("LE910C1-AP") == 0) { + sCode = "LAP3"; + eCode = SUCCESS; } else if (sModel.find("ME910C1-NA") == 0) { sCode = "MAT1"; eCode = SUCCESS; @@ -408,6 +393,9 @@ CellularRadio::CODE CellularRadio::convertModelToType(const std::string& sModel, } else if (sModel.find("LE910C1-NS") == 0) { sType = VALUE_TYPE_LTE; eCode = SUCCESS; + } else if (sModel.find("LE910C1-AP") == 0) { + sType = VALUE_TYPE_LTE; + eCode = SUCCESS; } else if (sModel.find("ME910C1-NA") == 0) { sType = VALUE_TYPE_LTE; eCode = SUCCESS; @@ -1607,6 +1595,8 @@ std::string CellularRadio::extractModelFromResult(const std::string& sResult) { sModel = "LE910-EU1"; } else if(sResult.find("LE910C1-NS") != std::string::npos) { sModel = "LE910C1-NS"; + } else if(sResult.find("LE910C1-AP") != std::string::npos) { + sModel = "LE910C1-AP"; } 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 ea93f28..bbc2d3f 100644 --- a/src/MTS_IO_CellularRadioFactory.cpp +++ b/src/MTS_IO_CellularRadioFactory.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015 by Multi-Tech Systems + * Copyright (C) 2019 by Multi-Tech Systems * * This file is part of libmts-io. * @@ -18,15 +18,6 @@ * */ -/*! - \file MTS_IO_CellularRadioFactory.cpp - \brief A brief description - \date Nov 5, 2014 - \author sgodinez - - A more elaborate description -*/ - #include <mts/MTS_IO_CellularRadioFactory.h> #include <mts/MTS_IO_HE910DRadio.h> #include <mts/MTS_IO_HE910EUDRadio.h> @@ -36,6 +27,7 @@ #include <mts/MTS_IO_LE910EUGRadio.h> #include <mts/MTS_IO_LE910EU1Radio.h> #include <mts/MTS_IO_LE910C1NSRadio.h> +#include <mts/MTS_IO_LE910C1APRadio.h> #include <mts/MTS_IO_ME910C1NARadio.h> #include <mts/MTS_IO_ME910C1NVRadio.h> #include <mts/MTS_IO_LE866A1JSRadio.h> @@ -54,7 +46,8 @@ 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[LE910C1NSRadio::MODEL_NAME] = &CellularRadioFactory::createLE910C1NS; + m_mCreationMap[LE910C1APRadio::MODEL_NAME] = &CellularRadioFactory::createLE910C1AP; m_mCreationMap[ME910C1NARadio::MODEL_NAME] = &CellularRadioFactory::createME910C1NA; m_mCreationMap[ME910C1NVRadio::MODEL_NAME] = &CellularRadioFactory::createME910C1NV; m_mCreationMap[GE910Radio::MODEL_NAME] = &CellularRadioFactory::createGE910; @@ -156,6 +149,10 @@ CellularRadio* CellularRadioFactory::createLE910C1NS(const std::string& sPort) { return new LE910C1NSRadio(sPort); } +CellularRadio* CellularRadioFactory::createLE910C1AP(const std::string& sPort) { + return new LE910C1APRadio(sPort); +} + CellularRadio* CellularRadioFactory::createME910C1NA(const std::string& sPort) { return new ME910C1NARadio(sPort); } diff --git a/src/MTS_IO_LE910C1APRadio.cpp b/src/MTS_IO_LE910C1APRadio.cpp new file mode 100644 index 0000000..3a560fa --- /dev/null +++ b/src/MTS_IO_LE910C1APRadio.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_LE910C1APRadio.h> + +using namespace MTS::IO; + +const std::string LE910C1APRadio::MODEL_NAME("LE910C1-AP"); + +LE910C1APRadio::LE910C1APRadio(const std::string& sPort) +: LE910Radio(MODEL_NAME, sPort) +{ + +} + +CellularRadio::CODE LE910C1APRadio::getCarrier(std::string& sCarrier) { + sCarrier = "Sprint"; + return SUCCESS; +} |