Expand description
AT response line parsing and solicited vs URC classification.
Structs§
- AtCommand
Result - 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 eachpushthe answer is the one the one-shot check gives for all bytes pushed so far. - Exchange
Demux - Routes bytes during an exchange: URC lines are emitted live, the rest is the reply.
- Exchange
Response - Structured exchange result returned to the frontend.
- Parsed
AtResponse - Parsed outcome of an AT exchange response.
Enums§
- AtParse
Status - AtResult
Format - AT result line format (V.250 verbose vs numeric
ATV0). - Exchange
Match - How the read loop decided the exchange finished.
- Exchange
Phase - Exchange demux phase, see
ExchangeDemux::phase.
Constants§
- MAX_
DEMUX_ LINE - Longest unterminated line
ExchangeDemuxkeeps; longer runs without a line feed (data afterCONNECT, 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 FAILare 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) whenATV0is active. - classify_
numeric_ final_ line - V.250 numeric final result codes (
ATV0):0OK,3NO CARRIER,4ERROR,6NO DIALTONE,7BUSY,8NO ANSWER.1(CONNECT) is intermediate,2(RING) unsolicited,5is 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,\nand a lone\r: V.250 §5.7.1 ends a numericATV0result code, and the echo, withS3only). - 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.