Mostly working now, except for log parsing and random checksum failures

This commit is contained in:
Will Greenberg
2023-12-04 15:38:01 -08:00
parent 7d55716104
commit db18abae6f
4 changed files with 316 additions and 220 deletions

View File

@@ -1,19 +1,16 @@
mod hdlc;
mod diag;
mod diag_device;
use crate::hdlc::{hdlc_encapsulate, hdlc_decapsulate};
use crate::diag::{DiagDevice};
use crate::diag_device::DiagDevice;
fn main() -> std::io::Result<()> {
let mut dev = DiagDevice::new().unwrap();
dev.config_logs().unwrap();
loop {
let msgs = dev.read_response().unwrap();
if let Some(msgs) = msgs {
for msg in msgs {
println!("msg: {:?}", msg);
}
for msg in dev.read_response().unwrap() {
println!("msg: {:?}", msg);
}
}
}