AT Commands builder and parser for Rust #![no_std]
This crate can be used to build and parse at command style messages efficiently.
Help would be appreciated! Interested in new features, efficiency improvements and API improvements.
Usage
Builder:
use CommandBuilder;
let mut buffer = ;
// Make a query command
let result = create_query
.named
.finish
.unwrap;
// Buffer now contains "AT+MYQUERY?"
// Copy or DMA the resulting slice to the device.
// Make a set command
let result = create_set
.named
.with_int_parameter
.finish
.unwrap;
// Buffer now contains "+MYSET=42"
// Copy or DMA the resulting slice to the device.
Parser:
use CommandParser;
let = parse
.expect_identifier
.expect_int_parameter
.expect_string_parameter
.expect_int_parameter
.expect_identifier
.finish
.unwrap;
// x = 654
// y = "true"
// z = -65154
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.