Skip to content

bruinformula/plotato

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plotato

Plotato is a Qt Quick application for visualizing CAN (Controller Area Network) logs, with planned support for live CAN data streams. The project is designed to have the bare minimum number of dependencies and aims to support as many types of devices and platforms as possible. It leverages Qt6 for its modern UI and ggml for efficient linear algebra operations on data streams.


Features

  • Visualize CAN log data with interactive charts (QtCharts)
  • Parse and interpret DBC (Database CAN) files for CAN message definitions
  • Modular QML-based UI for extensibility
  • Uses ggml for high-performance matrix operations
  • Cross-platform: macOS, Windows, and Linux

Project Structure

.
├── CMakeLists.txt
├── cmake/                # CMake modules for fetching dependencies (GGML, SQLite, Boost Spirit)
├── include/              # Header files for libraries
│   ├── can_land/         # CAN and DBC parsing headers
│   └── motec_parser/     # MoTeC data format parser headers (work in progress)
├── src/                  # Application source code (C++ and QML)
│   ├── app/              # Main Qt Quick application and QML UI
│   ├── can_land/         # CAN and DBC parsing implementation
│   └── motec_parser/     # MoTeC data format parser (currently non-functional)
├── test/                 # Unit tests and test data
│   ├── can_land/         # CAN parsing tests
│   ├── GGMLTest.cpp      # GGML library tests
│   └── test.ld           # Sample data file
├── build/                # CMake build directory (generated)
└── README.md

Building the Project

Prerequisites

  • Qt 6.9.0 or newer (Charts, Core, Gui, Qml, Quick modules)
  • CMake 3.26+
  • C++20 compiler (GCC, Clang, or MSVC)

The project manages three main dependencies with different installation approaches:

  • ggml - High-performance linear algebra library (automatically built by the project)
  • SQLite - Lightweight database engine (can use local installation or be automatically built)
  • Boost Spirit - Parser framework for DBC file parsing (can use local installation or be automatically built)

Building with VSCode

  1. Open the project folder in VSCode.
  2. Install the CMake Tools and C/C++ extensions.
  3. Ensure your Qt installation is discoverable by CMake (see below).
  4. Use the VSCode build tasks (CMake: Configure and CMake: Build) or the status bar buttons.

Building with CMake (Command Line)

  1. Create a build directory:
    mkdir build
    cd build
  2. Configure the project with CMake, specifying the Qt path if needed:
    cmake ..
    Or, if you need to specify the Qt path:
    cmake -DQT_PREFIX_PATH="/path/to/Qt/lib/cmake" ..
  3. Build the project:
    cmake --build .

Setting the Qt Path

macOS

  • Global Environment Variable:
    export QT_PREFIX_PATH="$HOME/Qt/<version>/macos"
  • CMake Command Line Argument:
    cmake -DQT_PREFIX_PATH="/Users/<user>/Qt/<version>/macos" ..

Ubuntu Linux

  • Global Environment Variable:
    export QT_PREFIX_PATH="$HOME/Qt/<version>/gcc_64"
  • CMake Command Line Argument:
    cmake -DQT_PREFIX_PATH="/home/<user>/Qt/<version>/gcc_64" ..

Windows

  • Global Environment Variable (PowerShell):
    $env:QT_PREFIX_PATH="C:/Qt/<version>/msvc2019_64"
  • Global Environment Variable (cmd.exe):
    set QT_PREFIX_PATH=C:\Qt\6.9.0\msvc2019_64
  • CMake Command Line Argument:
    cmake -DQT_PREFIX_PATH="C:/Qt/<version>/msvc2019_64" ..

Running Plotato

After building, you can run the application as follows:

macOS

cd build
open src/app/Plotato.app

Alternatively, you can run the binary directly from within the .app bundle:

./src/app/Plotato.app/Contents/MacOS/Plotato

If you see missing Qt libraries, ensure your PATH and DYLD_LIBRARY_PATH include your Qt installation's bin and lib directories. If you encounter issues, you may need to use the macdeployqt tool to bundle the required Qt libraries into the .app bundle:

/Users/<user>/Qt/<version>/macos/bin/macdeployqt src/app/Plotato.app

Linux

cd build
./src/app/Plotato

Windows

From the build directory, run:

.\src\app\Plotato.exe

Testing

The project includes unit tests for working components:

cd build
ctest

Or run individual test executables:

  • ./test/ggml_test - Tests GGML integration
  • ./test/can_land/ - Tests CAN and DBC parsing

Note: MoTeC parsing tests are currently disabled due to implementation issues.


Notes

  • The project uses ggml for linear algebra operations, which is automatically fetched and built by the project
  • Two additional dependencies (SQLite, Boost Spirit) are managed via CMake and can either use system installations or be automatically fetched and built as shared libraries
  • The QML UI is located in src/app/qml/
  • DBC file parsing enables interpretation of CAN bus message definitions

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published