pub enum AtCommand {
Equals {
param: String,
value: AtValue,
},
Execute {
command: String,
},
Read {
param: String,
},
Test {
param: String,
},
Basic {
command: String,
number: Option<usize>,
},
Text {
text: String,
expected: Vec<String>,
},
}Expand description
An AT command.
Variants§
Equals
Either execute a non-basic command named param with value as
argument, or set the current value of param to value.
Corresponds to AT<param>=<value>.
Execute
Execute a non-basic command, with the name of command.
Corresponds to AT<command>.
Read
Read the current value of param.
Corresponds to AT<param>?.
Test
Return the available value range of param.
Corresponds to `AT=?’.
Basic
Execute a basic command, where command indicates a single letter (A-Z)
or the & symbol and a single letter, with an optional number parameter.
Corresponds to AT<command>[<number>].
Text
Just send some raw text.
Implementations§
Source§impl AtCommand
impl AtCommand
Sourcepub fn expected(&self) -> Vec<String>
pub fn expected(&self) -> Vec<String>
Get the set of ‘expected’ InformationResponses for this command.
This is used by the library to filter out URCs (Unsolicited Response Codes) - basically,
commands only get InformationResponses that match their expected() array, so we can
filter all of the other responses out and assume that they’re URCs.
- For
Equals,Read, andTest, this is the value ofvec![param]. - For
ExecuteandBasic, this is the value ofvec![command]. - For
Text, this is the value ofexpected.