mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-07-03 20:57:19 -04:00
* at commands in one place, with timeouts set * commands used with stream->cmd(...) have last execution time and result stored
26 lines
584 B
C++
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
|