3 releases
new 0.1.2-alpha | Nov 21, 2024 |
---|---|
0.1.1-alpha | Nov 21, 2024 |
0.1.0-alpha | Nov 21, 2024 |
#535 in Network programming
1.5MB
37K
SLoC
canboat-rs
Check the generated doc page for how to use this package. Still under early development and barely tested.
lib.rs
:
canboat-rs
Parsing nmea data
use chrono::Datelike;
use canboat_rs::pgns::pgn::Pgn;
use canboat_rs::NmeaParser;
// Check the `can-analyzer` project to figure out how to grab
// a can id and data.
pub fn main() {
let id = 233836644;
let data: &[u8] = &[255, 255, 79, 78, 144, 3, 32, 46];
let mut parser = NmeaParser::new();
let parsed_message = parser.parse(id, data);
match parsed_message.unwrap() {
Pgn::SystemTime(time) => {
println!("{:?}", time);
}
_ => {},
};
}
Dependencies
~1.5MB
~28K SLoC