summaryrefslogtreecommitdiff
path: root/src/MTS_IO_CellularRadioFactory.cpp
diff options
context:
space:
mode:
authorMaksym Telychko <maksym.telychko@globallogic.com>2019-06-06 16:03:44 +0300
committerMaksym Telychko <maksym.telychko@globallogic.com>2019-06-06 16:03:44 +0300
commitda563a985ccb0b5f316b44e35aabd511687ff4bf (patch)
tree8c4261bff4b66b16018541004db1cd04258b3ca1 /src/MTS_IO_CellularRadioFactory.cpp
parent53efcef2e2f521135b323e194c45f1d9fa7b5d5d (diff)
downloadlibmts-io-da563a985ccb0b5f316b44e35aabd511687ff4bf.tar.gz
libmts-io-da563a985ccb0b5f316b44e35aabd511687ff4bf.tar.bz2
libmts-io-da563a985ccb0b5f316b44e35aabd511687ff4bf.zip
[MTS-MTQ] refactoring: added quectel empty classes, CellularRadio moved to TelitRadio
Diffstat (limited to 'src/MTS_IO_CellularRadioFactory.cpp')
-rw-r--r--src/MTS_IO_CellularRadioFactory.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/MTS_IO_CellularRadioFactory.cpp b/src/MTS_IO_CellularRadioFactory.cpp
index ef87f0e..17cbd05 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 CellularRadio::VALUE_UNKNOWN;
+ return TelitRadio::VALUE_UNKNOWN;
}
//Attempt basic radio communication
- if(CellularRadio::test(apIo) != CellularRadio::SUCCESS) {
+ if(TelitRadio::test(apIo) != TelitRadio::SUCCESS) {
printError("CellularRadioFactory| Failed to communicate with radio on port [%s]", sPort.c_str());
apIo->close();
- return CellularRadio::VALUE_UNKNOWN;
+ return TelitRadio::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 = CellularRadio::sendCommand(apIo, sCmd, CellularRadio::DEFAULT_BAIL_STRINGS, 1000, CellularRadio::CR);
+ sResult = TelitRadio::sendCommand(apIo, sCmd, TelitRadio::DEFAULT_BAIL_STRINGS, 1000, TelitRadio::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 CellularRadio::VALUE_UNKNOWN;
+ return TelitRadio::VALUE_UNKNOWN;
}
- std::string sModel = CellularRadio::extractModelFromResult(sResult);
+ std::string sModel = TelitRadio::extractModelFromResult(sResult);
printDebug("RADIO| Extracted [%s] from ATI4 query", sModel.c_str());
apIo->close();
return sModel;