INNER CODE UNIT · Python

root

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

def root(
    ctx: typer.Context,
    interface: InterfaceOpt = "gs_usb",
    channel: ChannelOpt = "",
    index: IndexOpt = 0,
    bitrate: BitrateOpt = 500_000,
    baudrate: BaudrateOpt = 115_200,
    host: Annotated[str, typer.Option("--host", help="Host to bind")] = "127.0.0.1",
    port: Annotated[int, typer.Option("--port", help="Port to listen on")] = 8080,
    no_browser: Annotated[bool, typer.Option("--no-browser", help="Do not auto-open the browser")] = False,
    log_level: Annotated[str, typer.Option("--log-level", help="Logging level")] = "info",
) -> None:
    """
    Start the CANviz web server (default behaviour - runs when no subcommand is given).
    Backward-compatible with all previous canviz flags.
    """
    if ctx.invoked_subcommand is not None:
        # A subcommand was given - let it handle everything

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…