# apgdt002-log-parser

A parser for CAN log files as produced by the Microchip CAN Bus Analyzer Tool used with the APGDT002.

This is not an official library by Microchip Technology Inc. All trademarks belong to them, yada yada, please don't sue
me.

Example:

```rust
fn main() {
    let input =
        r#"//---------------------------------
Microchip Technology Inc.
CAN BUS Analyzer
Released August 22nd 2014 - BETA

PC Software Information:
    GUI Version: 2.2
Firmware Information:
    USB Version: 2.0
    CAN Version: 2.2

Logging Started: 16/02/2026 18:32:20
//---------------------------------
1075.5273;RX;0x777;2;0x00;0x00;;;;;;;
1075.5282;RX;0x679;8;0x00;0x00;0x00;0x00;0x08;0x79;0x00;0x00;"#;

    let parsed = apgdt002_log_parser::parse(input).expect("valid can log file");

    assert_eq!(parsed.len(), 2);

    assert_eq!(parsed[0].can_id, 0x777);
    assert_eq!(parsed[0].data.len(), 2);
    assert_eq!(parsed[0].data[0], 0);

    assert_eq!(parsed[1].data.len(), 8);
    assert_eq!(parsed[1].data[4], 0x08);
}
```
