INNER CODE UNIT · Python

inst_rate

Chanchaldhiman/CANviz · backend/canviz/cli.py:412

                inst_rate = 1.0 / elapsed
                row["rate"] = 0.2 * inst_rate + 0.8 * row["rate"]

        if not is_tty:
            line: dict = {
                "ts":   round(now, 6),
                "id":   f"{arb_id:08X}",
                "dlc":  msg.dlc,
                "data": data.hex(" ").upper(),
                "name": rows[arb_id]["name"],
            }
            if j1939_info:
                line["pgn"]     = j1939_info.get("pgn_hex", "")
                line["pgn_name"]= j1939_info.get("pgn_name", "")
                line["sa"]      = j1939_info.get("sa_hex", "")
                line["sa_name"] = j1939_info.get("sa_name", "")
            sys.stdout.write(json.dumps(line) + "\n")
            sys.stdout.flush()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…