diff options
author | Maksym Telychko <maksym.telychko@globallogic.com> | 2019-06-11 16:49:09 +0300 |
---|---|---|
committer | Maksym Telychko <maksym.telychko@globallogic.com> | 2019-06-11 16:49:09 +0300 |
commit | 2fe0784ab57aa5571e5cd70c1776eecda635b3c0 (patch) | |
tree | 96063311a1677c011e3352c50a4dad69e06613f1 /src | |
parent | fe1c1e2e87da96fbbc432a35a903fff40f52713a (diff) | |
download | libmts-io-2fe0784ab57aa5571e5cd70c1776eecda635b3c0.tar.gz libmts-io-2fe0784ab57aa5571e5cd70c1776eecda635b3c0.tar.bz2 libmts-io-2fe0784ab57aa5571e5cd70c1776eecda635b3c0.zip |
[MTS-MTQ] cellular factory: quectel eg95 instance creation
Diffstat (limited to 'src')
-rw-r--r-- | src/MTS_IO_CellularRadioFactory.cpp | 9 | ||||
-rw-r--r-- | src/MTS_IO_EG95Radio.cpp | 4 | ||||
-rw-r--r-- | src/MTS_IO_ICellularRadio.cpp | 2 |
3 files changed, 15 insertions, 0 deletions
diff --git a/src/MTS_IO_CellularRadioFactory.cpp b/src/MTS_IO_CellularRadioFactory.cpp index 146b112..8b2353a 100644 --- a/src/MTS_IO_CellularRadioFactory.cpp +++ b/src/MTS_IO_CellularRadioFactory.cpp @@ -37,6 +37,7 @@ #include <mts/MTS_IO_GE910Radio.h> #include <mts/MTS_IO_CE910Radio.h> #include <mts/MTS_IO_DE910Radio.h> +#include "mts/MTS_IO_EG95Radio.h" #include <mts/MTS_Logger.h> using namespace MTS::IO; @@ -60,6 +61,7 @@ CellularRadioFactory::CellularRadioFactory() { m_mCreationMap[DE910Radio::MODEL_NAME] = &CellularRadioFactory::createDE910; m_mCreationMap[CE910Radio::MODEL_NAME] = &CellularRadioFactory::createCE910; m_mCreationMap[LE866A1JSRadio::MODEL_NAME] = &CellularRadioFactory::createLE866A1JS; + m_mCreationMap[EG95Radio::MODEL_NAME] = &CellularRadioFactory::createEG95Radio; } ICellularRadio* CellularRadioFactory::create(const std::string& sModel, const std::string& sPort) { @@ -194,3 +196,10 @@ ICellularRadio* CellularRadioFactory::createCE910(const std::string& sPort) { ICellularRadio* CellularRadioFactory::createLE866A1JS(const std::string &sPort) { return new LE866A1JSRadio(sPort); } + +ICellularRadio* CellularRadioFactory::createEG95Radio(const std::string& sPort) +{ + // TODO: return new EG95Radio(sPort); + printError("TODO: EG95Radio"); + return new HE910DRadio(sPort); +} diff --git a/src/MTS_IO_EG95Radio.cpp b/src/MTS_IO_EG95Radio.cpp index 2fca48f..6feee41 100644 --- a/src/MTS_IO_EG95Radio.cpp +++ b/src/MTS_IO_EG95Radio.cpp @@ -1 +1,5 @@ #include "mts/MTS_IO_EG95Radio.h" + +using namespace MTS::IO; + +const std::string EG95Radio::MODEL_NAME("EG95"); diff --git a/src/MTS_IO_ICellularRadio.cpp b/src/MTS_IO_ICellularRadio.cpp index 58ccb2b..2f19f3a 100644 --- a/src/MTS_IO_ICellularRadio.cpp +++ b/src/MTS_IO_ICellularRadio.cpp @@ -419,6 +419,8 @@ std::string MTS::IO::ICellularRadio::extractModelFromResult(const std::string& s sModel = "DE910-DUAL"; } else if(sResult.find("CE910") != std::string::npos) { sModel = "CE910"; + } else if(sResult.find("EG95") != std::string::npos) { + sModel = "EG95"; } return sModel; } |