Files
MuditaOS/module-cellular/at/Result.hpp
Adam Dobrowolski 4a851263e8 [EGD-2656] All at commands gathered in one place
* at commands in one place, with timeouts set
* commands used with stream->cmd(...) have last execution time and result stored
2020-02-20 08:13:55 +00:00

26 lines
584 B
C++

#pragma once
#include <string>
#include <vector>
namespace at
{
struct Result
{
/// result class for AT send -> receive command, could return promise :p
enum class Code
{
OK, // at OK
ERROR, // at ERROR
TIMEOUT, // at Timeout
TOKENS, // at numbers of tokens needed met
NONE, // no code
} code = Code::NONE;
std::vector<std::string> response;
explicit operator bool() const
{
return code == Code::OK;
}
};
} // namespace at