Files
MuditaOS/module-cellular/at/src/UrcCmti.cpp
T
Hubert Chrzaniuk 6a92a7261e [EGD-2962] Refactor / improve URC handling (#947)
- QIND URC has been extended to support FOTA reply
 - added support for CLIP, CMTI and POWERED DOWN URCs
 - added support for URC responses codes handling
 - created URCHandler abstraction and moved out URC handling from
   cellular service code
 - URC objects are now created by factory on a basis of URC head, rather
   than previous approach where they were created a priori
 - Renamed classes to be consistent with rest of the project
2020-11-05 11:52:39 +01:00

28 lines
559 B
C++

// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "UrcCmti.hpp"
using namespace at::urc;
auto Cmti::isValid() const noexcept -> bool
{
return tokens.size() == magic_enum::enum_count<Tokens>();
}
std::string Cmti::getMemory() const
{
if (!isValid()) {
return std::string();
}
return tokens[Tokens::Mem];
}
std::string Cmti::getIndex() const
{
if (!isValid()) {
return std::string();
}
return tokens[Tokens::Index];
}