diff --git a/src/j1939_decoder.py b/src/j1939_decoder.py new file mode 100644 index 0000000..e49788c --- /dev/null +++ b/src/j1939_decoder.py @@ -0,0 +1,14 @@ +import argparse +import polars as pl + +def get_j1939_mask() -> pl.Expr: + id_int = pl.col("ID").str.to_integer(base=16).cast(pl.UInt32) + return ( + (id_int > 0x7FF) & + ((id_int & 0x02000000) == 0) & + (pl.col("DLC") <= 8) + ) + + + +if __name__ == "__main__":