Skip to content

GUI and CLI Support

Kurtis Fafard edited this page Dec 8, 2025 · 1 revision

GUI and CLI Support

win_can_tool supports both:

  • ✅ Graphical User Interface (GUI) for interactive simulation
  • ✅ Command Line Interface (CLI) for automation and headless testing

Both modes share the same CAN engine, profiles, and message generation logic.


GUI Mode

The GUI is the primary interface used for interactive testing and simulation.

Features include:

  • Live GNSS control (Latitude, Longitude, COG, SOG)
  • Engine simulation (fuel, load, coolant temperature)
  • Profile selection
  • Raw message creation and editing
  • Per-message enable/disable
  • Period tuning for each CAN message
  • Save/Load profiles using JSON
  • CAN interface and channel selection
  • Start/Stop simulation controls
  • Real-time event logging

Launching the GUI

From the Windows EXE: win_can_tool-vX.Y.Z.exe

From source: python can_gui_launcher.py


CLI Mode

The CLI is designed for automation, scripting, and headless operation.

Common CLI use cases:

  • Automated testing
  • CI pipeline integration
  • Headless simulation systems
  • Hardware-in-the-loop validation
  • CAN replay scenarios

Example CLI usage: python can_sim.py --interface neovi --channel 1 --bitrate 250000

The CLI uses the same message engine and profile system as the GUI.


When to Use Each Mode

GUI is best for:

  • Interactive testing
  • Message tuning
  • Profile creation
  • Hardware debugging

CLI is best for:

  • Automated testing
  • Continuous integration
  • Long-running simulations
  • Remote or headless systems

Shared Architecture

Both GUI and CLI use:

  • The same CAN simulation engine
  • The same profile definitions
  • The same CAN hardware backends
  • The same payload generation logic

This ensures:

  • No simulation differences between GUI and CLI
  • No duplicated logic
  • Identical CAN frame output in both modes

Recommended Workflow

  1. Use the GUI to:

    • Build and tune profiles
    • Validate message behavior
    • Create and test raw messages
  2. Use the CLI to:

    • Run automated testing
    • Perform integration testing
    • Execute long-running simulation jobs

Summary

The GUI is optimized for human-in-the-loop testing.
The CLI is optimized for automation and reliability.
Both are first-class workflows and are fully supported.

Clone this wiki locally