diff options
Diffstat (limited to 'src/MTS_IO_CellularRadioFactory.cpp')
-rw-r--r-- | src/MTS_IO_CellularRadioFactory.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/MTS_IO_CellularRadioFactory.cpp b/src/MTS_IO_CellularRadioFactory.cpp index 1a2cee2..f545599 100644 --- a/src/MTS_IO_CellularRadioFactory.cpp +++ b/src/MTS_IO_CellularRadioFactory.cpp @@ -38,6 +38,7 @@ #include <mts/MTS_IO_DE910Radio.h> #include "mts/MTS_IO_EG95Radio.h" #include "mts/MTS_IO_EG25Radio.h" +#include "mts/MTS_IO_CB610LRadio.h" #include <mts/MTS_Logger.h> using namespace MTS::IO; @@ -62,6 +63,7 @@ CellularRadioFactory::CellularRadioFactory() { m_mCreationMap[LE866A1JSRadio::MODEL_NAME] = &CellularRadioFactory::createLE866A1JS; m_mCreationMap[EG95Radio::MODEL_NAME] = &CellularRadioFactory::createEG95Radio; m_mCreationMap[EG25Radio::MODEL_NAME] = &CellularRadioFactory::createEG25Radio; + m_mCreationMap[CB610LRadio::MODEL_NAME] = &CellularRadioFactory::createCB610LRadio; } ICellularRadio* CellularRadioFactory::create(const std::string& sModel, const std::string& sPort) { @@ -101,7 +103,7 @@ std::string CellularRadioFactory::identifyRadio(const std::string& sPort) { //Get model int count = 0; - std::string sCmd("AT+GMM"); + std::string sCmd("AT+CGMM"); std::string sResult; do { sResult = ICellularRadio::sendCommand(apIo, sCmd, ICellularRadio::DEFAULT_BAIL_STRINGS, 1000, ICellularRadio::CR); @@ -120,7 +122,7 @@ std::string CellularRadioFactory::identifyRadio(const std::string& sPort) { } std::string sModel = ICellularRadio::extractModelFromResult(sResult); - printDebug("RADIO| Extracted [%s] from AT+GMM query", sModel.c_str()); + printDebug("RADIO| Extracted [%s] from AT+CGMM query", sModel.c_str()); apIo->close(); return sModel; } @@ -200,3 +202,7 @@ ICellularRadio* CellularRadioFactory::createEG95Radio(const std::string& sPort) ICellularRadio* CellularRadioFactory::createEG25Radio(const std::string& sPort) const { return new EG25Radio(sPort); } + +ICellularRadio* CellularRadioFactory::createCB610LRadio(const std::string& sPort) const { + return new CB610LRadio(sPort); +}
\ No newline at end of file |