From fe1c1e2e87da96fbbc432a35a903fff40f52713a Mon Sep 17 00:00:00 2001 From: Maksym Telychko Date: Tue, 11 Jun 2019 16:47:11 +0300 Subject: [MTS-MTQ] refactoring: cellular factory namespaces --- src/MTS_IO_CellularRadioFactory.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/MTS_IO_CellularRadioFactory.cpp') diff --git a/src/MTS_IO_CellularRadioFactory.cpp b/src/MTS_IO_CellularRadioFactory.cpp index 0c64221..146b112 100644 --- a/src/MTS_IO_CellularRadioFactory.cpp +++ b/src/MTS_IO_CellularRadioFactory.cpp @@ -87,14 +87,14 @@ std::string CellularRadioFactory::identifyRadio(const std::string& sPort) { apIo.reset(new SerialConnection(SerialConnection::Builder(sPort).baudRate(115200).useLockFile().build())); while(!apIo->open(30000)) { printError("CellularRadioFactory| Failed to open radio port [%s]", sPort.c_str()); - return TelitRadio::VALUE_UNKNOWN; + return ICellularRadio::VALUE_UNKNOWN; } //Attempt basic radio communication - if(TelitRadio::test(apIo) != TelitRadio::SUCCESS) { + if(ICellularRadio::test(apIo) != ICellularRadio::SUCCESS) { printError("CellularRadioFactory| Failed to communicate with radio on port [%s]", sPort.c_str()); apIo->close(); - return TelitRadio::VALUE_UNKNOWN; + return ICellularRadio::VALUE_UNKNOWN; } //Get model @@ -102,7 +102,7 @@ std::string CellularRadioFactory::identifyRadio(const std::string& sPort) { std::string sCmd("ATI4"); std::string sResult; do { - sResult = ICellularRadio::sendCommand(apIo, sCmd, TelitRadio::DEFAULT_BAIL_STRINGS, 1000, TelitRadio::CR); + sResult = ICellularRadio::sendCommand(apIo, sCmd, ICellularRadio::DEFAULT_BAIL_STRINGS, 1000, ICellularRadio::CR); if (sResult.find("OK") == std::string::npos) { printDebug("RADIO| Attempting to get radio model [%s] ...", sResult.c_str()); } else { @@ -114,10 +114,10 @@ std::string CellularRadioFactory::identifyRadio(const std::string& sPort) { if(count == 30) { printDebug("RADIO| Unable to get radio model"); apIo->close(); - return TelitRadio::VALUE_UNKNOWN; + return ICellularRadio::VALUE_UNKNOWN; } - std::string sModel = TelitRadio::extractModelFromResult(sResult); + std::string sModel = ICellularRadio::extractModelFromResult(sResult); printDebug("RADIO| Extracted [%s] from ATI4 query", sModel.c_str()); apIo->close(); return sModel; -- cgit v1.2.3