Skip to main content

Module at

Module at 

Source
Expand description

AT response line parsing and solicited vs URC classification.

Structs§

AtCommandResult
AT command result returned by native at / at_phases / send_sms_pdu.
AtCompletion
Incremental form of at_final_line_complete / at_intermediate_line_complete: feed the reply chunk by chunk; each line is judged once, so a long reply costs time linear in its size. After each push the answer is the one the one-shot check gives for all bytes pushed so far.
ExchangeDemux
Routes bytes during an exchange: URC lines are emitted live, the rest is the reply.
ExchangeResponse
Structured exchange result returned to the frontend.
ParsedAtResponse
Parsed outcome of an AT exchange response.

Enums§

AtParseStatus
AtResultFormat
AT result line format (V.250 verbose vs numeric ATV0).
ExchangeMatch
How the read loop decided the exchange finished.
ExchangePhase
Exchange demux phase, see ExchangeDemux::phase.

Constants§

MAX_DEMUX_LINE
Longest unterminated line ExchangeDemux keeps; longer runs without a line feed (data after CONNECT, binary noise) cannot be a URC and are dropped.

Functions§

at_final_line_complete
Returns Some(match) when the buffer holds a complete AT final line.
at_intermediate_line_complete
Completion for prompt-style commands (AT+CMGS=… → > , ATD → CONNECT).
classify_final_line
Final result line, case-insensitive (OK, ok, …): the V.250 verbose codes, +CME ERROR: (27.007) and +CMS ERROR: (27.005). SEND OK / SEND FAIL are not V.250: they are the finals of the TCP/IP stacks of many modules (AT+CIPSEND) and stay for compatibility.
classify_intermediate_line
Intermediate result codes that must not complete an exchange (V.250 verbose).
classify_intermediate_line_with_format
Intermediate lines including numeric 1 (CONNECT) when ATV0 is active.
classify_numeric_final_line
V.250 numeric final result codes (ATV0): 0 OK, 3 NO CARRIER, 4 ERROR, 6 NO DIALTONE, 7 BUSY, 8 NO ANSWER. 1 (CONNECT) is intermediate, 2 (RING) unsolicited, 5 is unassigned.
derive_solicited_prefixes
Derive expected solicited response headers from an AT command (e.g. AT+CSQ → +CSQ:); a composite command gets one per part (AT+CSQ;+CREG? → +CSQ:, +CREG:). V.250 basic commands in front of an extended one are skipped (ATE0V1+CSQ, AT&F+CSQ → +CSQ:).
is_ext_info_line
Vendor extended information line (+CSQ:, ^SYSCFG:, #SGACT:, …).
is_likely_urc
is_numeric_result_line
True when the line is a strict V.250 numeric code (0…99).
merge_solicited_prefixes
Merge user-provided prefixes with auto-derived ones from the command string.
parse_at_response
Classify lines into solicited body vs URC using echo / solicited prefixes.
split_lines
Split buffer into non-empty trimmed lines (handles \r\n, \n and a lone \r: V.250 §5.7.1 ends a numeric ATV0 result code, and the echo, with S3 only).
urc_lines_from_drain
Extract URC lines from drained bytes (for drainRx forwarding). The data line of a two-line URC (+CMT: ,23 + PDU) comes right after its header.