ESPHome 2026.11.0
Loading...
Searching...
No Matches
at_reply.h File Reference

Go to the source code of this file.

Namespaces

namespace  esphome
 
namespace  esphome::modem
 

Enumerations

enum class  esphome::modem::ReplyEnd : uint8_t { esphome::modem::REPLY_END_NONE , esphome::modem::REPLY_END_OK , esphome::modem::REPLY_END_ERROR }
 

Functions

bool esphome::modem::is_registered (int registration)
 Registered on a network, so the data attach can be requested.
 
bool esphome::modem::collect_reply (char *buf, size_t size, size_t &len, const char *data, size_t data_len, bool whole)
 Add data to the reply in buf (size includes the terminator, len is the current length).
 
ReplyEnd esphome::modem::reply_end (const char *data, size_t len, bool skip_first)
 How the reply ends.
 
size_t esphome::modem::flatten_reply (char *reply, size_t len)
 Puts a raw reply on one line for the log and drops the final OK; returns the new length.
 
int esphome::modem::registration_from_reply (const char *reply, const char *prefix)
 The <stat> after the first comma of the "<n>,<stat>" line starting with prefix (+CREG: and friends), or REGISTRATION_UNKNOWN; a one-field line is an unsolicited notification and is skipped.
 
int esphome::modem::merge_registration (int lte, int legacy)
 The state that tells most from the AT+CEREG? (LTE) and AT+CREG? (2G and 3G) results.
 
bool esphome::modem::reply_names_unsupported (const char *reply)
 Whether an error reply says the command is not supported (+CME ERROR: 4 or its verbose text)
 
const char * esphome::modem::sim_status (char *reply)
 The SIM status in a flattened AT+CPIN? reply, cut before any following line, or nullptr.