INNER CODE UNIT · Python
j1939_status
Chanchaldhiman/CANviz · backend/canviz/cli.py:1022
def j1939_status(
host: Annotated[str, typer.Option("--host", help="CANviz server host")] = "127.0.0.1",
port: Annotated[int, typer.Option("--port", help="CANviz server port")] = 8080,
) -> None:
"""
Show J1939 decoder status from a running CANviz server.
Displays mode, PGN database size, active nodes, recent BAM messages,
and active DM1 fault codes. Requires `canviz serve` to be running.
Example:
canviz serve --interface slcan --channel COM3 --bitrate 250000 &
canviz j1939 status
"""
import urllib.request
import urllib.error
url = f"http://{host}:{port}/j1939/status"