Giter VIP home page Giter VIP logo

candevstudio's Introduction

CANdevStudio

CANdevStudio codecov Doxygen

Overview

Most of automotive projects need to have an access to the Controller Area Network (CAN) bus. There are plenty of commercial frameworks that provides CAN stacks and hardware/software tools necessary to develop proper CAN networks. They are very comprehensive and thus expensive. CANdevStudio aims to be cost-effective replacement for CAN simulation software. It can work with variety of CAN hardware interfaces (e.g. Microchip, Vector, PEAK-Systems) or even without it (vcan and cannelloni) . CANdevStudio enables to simulate CAN signals such as ignition status, doors status or reverse gear by every automotive developer. Thanks to modularity it is easy to implement new, custom features.

Checkout CANdevStudio on YouTube

Compatible CAN interfaces

Access to CAN bus is based on Qt framework. Current list of supported CAN interfaces can be found here.

Current list of devices compatible with SocketCAN (Linux only) can be found here.

Supported operating systems

  • Linux
  • Windows
  • macOS

Build instructions

CANdevStudio project uses GitHub Actions as continuous integration environment. You can check build.yml for details.

To lower maintenance effort and allow for usage of modern C++ features, since v1.2.0 CANdevStudio dropped "official" support for legacy compilers like gcc5.3, vs2015 or MinGW. Current CI configuration uses the latest compilers available for each GitHub Actions environment:

  • ubuntu-latest (clang and gcc)
  • macos-latest (clang)
  • windows-latest (vs2019 x64)

Linux

Dependencies (Ubuntu / Debian)

sudo apt install qtbase5-dev libqt5serialbus5-dev libqt5svg5-dev qtdeclarative5-dev

Build steps

git clone https://github.com/GENIVI/CANdevStudio.git
cd CANdevStudio
git submodule update --init --recursive
mkdir build
cd build
cmake ..
make

To choose compiler

cd CANdevStudio/build
rm -rf *
export CC=clang
export CXX=clang++
cmake ..
make

Qt in CMake

If CMake failed to find Qt in your system:

cd CANdevStudio/build
rm -rf *
cmake .. -DCMAKE_PREFIX_PATH=/home/genivi/Qt5.12.0/5.12.0/gcc_64
make

Windows

Visual Studio 2019 Win64

git clone https://github.com/GENIVI/CANdevStudio.git
cd CANdevStudio
git submodule update --init --recursive
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 16 2019" -A x64
cmake --build .

macOS / OS X

Dependencies

brew install qt5 cmake ninja

Build steps

git clone https://github.com/GENIVI/CANdevStudio.git
cd CANdevStudio
git submodule update --init --recursive
cmake -S. -Bbuild -GNinja -DCMAKE_PREFIX_PATH=$(brew --prefix qt5)/lib/cmake
cd build
ninja

Prebuilt packages

Each GitHub Actions job stores prebuilt packages for 90 days. Additionally official releases are stored on GitHub Releases page.

Package naming

CANdevStudio-X.Y.ZZZZZZZ-SYS[-standalone]

X - major version number of previous stable version
Y - minor version of previous stable version
Z - SHA commit ID
SYS - either win64, Linux or Darwin
standalone - bundle version that contains Qt libraries and all relevant plugins.

Linux

All packages are being built on ubuntu-latest environment. Refer to this page to determine the exact Ubuntu version. You may experience problems with missing or incompatible libraries when trying to run the package on other distros.

To run standalone version use CANdevStudio.sh script.

ARCH Linux

Install AUR package: candevstudio-git

Windows

Packages built with Visual Studio 2019.

Standalone version contains Qt. Installation of VS2019 redist packages may be still required.

macOS / OS X

Package is a DMG installer.

Quick Start

General instructions to start your first simulation:

  1. Build the latest master or release.
  2. Run the application and start a new project
  3. Drag and drop CanDevice and CanRawView components and connect them accordingly.
  4. Double click on CanDevice node to open configuration window.
    1. set one of supported backends (e.g. socketcan) link.
      NOTE: List of supported backends depends on Qt version.
    2. set name of your can interface (e.g. can0)
  5. Start the simulation
  6. Double click on CanRawView component to see CAN traffic

Steps required to use specific CAN hardware or virtual interfaces require some additional steps listed in following sections.

CAN Hardware

The list below shows hardware that has been successfully used with CANdevStudio.

Microchip CAN BUS Analyzer

  • Tested on Linux
  • Requires socketcan driver.
  • Officially supported in Linux Kernel v4.12+ Configuration:
  1. Find your interface name (e.g. can0)
    ip link
  2. Configure bitrate
    sudo ip link set can0 type can bitrate 1000000
  3. Bring the device up
    sudo ip link set can0 up
  4. Optionally configure CAN termination
    1. In GitHUB based driver
      sudo ip link set can0 type can termination 1
    2. In Linux 4.12+ driver
      sudo ip link set can0 type can termination 120

CanDevice backend: socketcan

Lawicel CANUSB

  • Tested on Linux
  • Based on FTDI Serial driver
  • Requires slcand to "convert" serial device to SocketCAN.
  • Officially supported in Linux Kernel v2.6.38

Configuration:

  1. Create SocketCAN device from serial interface
    sudo slcand -o -c -s8 -S1000000 /dev/ttyUSB0 can0
  2. Bring the device up
    sudo ip link set can0 up

CanDevice backend: socketcan

PeakCAN PCAN-USB

  • Tested on Windows

CanDevice settings example:

backend: peakcan
interface: usb0
configuration: BitRateKey = 250000

PassThruCAN Plugin

  • Tested on Windows

CanDevice settings example for PEAK-PCAN:

backend: passthrucan
configuration: BitRateKey = 250000
interface: PCANPT32

CanDevice settings example for SIE_CANUSB:

backend: passthrucan
configuration: BitRateKey = 250000
interface: CANUSB

CanDevice settings example for Kvaser USBcan:

backend: passthrucan
configuration: BitRateKey = 250000
interface: J2534 (kline) for Kvaser Hardware

CANdevStudio without CAN hardware

CANdevStudio can be used without actual CAN hardware thanks to Linux's built-in emulation.

VCAN

Configuration:

sudo modprobe vcan
sudo ip link add dev can0 type vcan
sudo ip link set can0 up

CanDevice backend: socketcan

Cannelloni

A SocketCAN over Ethernet tunnel. Available for Linux only.

Let's consider setup as before:

Configuration with qtCannelloniCanBusPlugin

Target configuration:

sudo modprobe vcan
sudo ip link add dev can0 type vcan
sudo ip link set can0 up
cannelloni -I can0 -R 192.168.0.1 -r 30000 -l 20000

PC configuration:

  1. Install libqtCannelloniCanBusPlugin.so that is built along with CANdevStudio. You can either copy it manually to Qt plugins directory (e.g. /usr/lib/qt/plugins/canbus) or use "make install" to do it automatically.
  2. Create new project in CANdevStudio and add CanDevice node
  3. Configure CanDevice:
    1. backend: cannelloni
    2. interface: 30000,192.168.0.2,20000 (local_port,remote_ip,remote_port)
  4. Start simulation
Configuration without qtCannelloniCanBusPlugin

Target configuration:

sudo modprobe vcan
sudo ip link add dev can0 type vcan
sudo ip link set can0 up
cannelloni -I can0 -R 192.168.0.1 -r 30000 -l 20000

PC configuration:

  1. Execute following lines in a shell
sudo modprobe vcan
sudo ip link add dev can0 type vcan
sudo ip link set can0 up
cannelloni -I can0 -R 192.168.0.2 -r 20000 -l 30000
  1. Create new project in CANdevStudio and add CanDevice node
  2. Configure CanDevice:
    1. backend: socketcan
    2. interface: can0
  3. Start simulation

Help

Scripting

As of v1.1 CANdevStudio supports creation of QML based scripts. Scripts can be developed and loaded dynamically without a need to restart the main applications. Scripting adds a lot of different possibilities to CANdevStudio that includes:

  • Creation of custom GUIs
  • Raw frames and signals handling
  • Time triggered actions
  • Message triggered actions
  • ... and many more, as all QML functionalities are supported.

Try it yourself by loading one of the examples into QMLExecutor component. You are welcome to share your scripts via Pull Requests!

CAN Signals

CANdevStudio provides support for CAN signals handling. DBC database description format is supported. Reverse engineered DBC files can be found in opendbc project.

Support for others CAN database formats can be added via extension of CANdb.

Sending signals

  1. Start new project and setup CanDevice as described in quick start section
  2. Add CanSignalData component that serves as CAN signals database for other components. You may have multiple CanSignalData components per projecthttps://github.com/commaai/opendbc
  3. Open CanSignalData properties and configure path to DBC file
  4. List of messages and signals shall be now loaded and visible in CanSignalData window
  5. You may configure cycle and initial value per each message
  6. Add CanSignalEncoder component and connect it with CanDevice. CanSignalEncoder act as a translator between signals and CAN frames. It is also responsible for sending cyclical messages.
  7. CanSignalSender has been automatically configured to use previously added CAN database. CAN database can be manually selected in component properties (this applies to all components from "Signals" group)
  8. Add CanSignalSender component and connect it with CanSignalEncoder
  9. Add signals in CanSignalSender window
  10. Start simulation
  11. CanSignalEncoder will start sending cyclical messages
  12. You can send previously configured signals from CanSignalSender:
    • if signal is a part of periodic message its value will be updated in a next cycle
    • if signal is not a part of periodic message it will be sent out immediately

Receiving signals

  1. Start new project and setup CanDevice as described in quick start section
  2. Add CanSignalData component that serves as CAN signals database for other components. You may have multiple CanSignalData components per project
  3. Open CanSignalData properties and configure path to DBC file
  4. List of messages and signals shall be now loaded and visible in CanSignalData window
  5. Add CanSignalDecoder component and connect it with CanDevice. CanSignalDecoder act as a translator between signals and CAN frames.
  6. CanSignalDecoder has been automatically configured to use previously added CAN database. CAN database can be manually selected in component properties (this applies to all components from "Signals" group)
  7. Add CanSignalViewer component and connect it with CanSignalDecoder
  8. Start simulation
  9. Signals shall now appear in CanSignalViewer. Note that CanSignalDecoder is sending over only signals which values has changed.

CanDevice configuration

CanDevice component can be configured using "configuration" property:

  • Format - "key1=value1;key2=value2;keyX=valueX"
  • Keys names are case sensitive, values are case insensitive
  • Configuration keys are taken from ConfigurationKey enum.
  • RawFilterKey and ErrorFilterKey are currently not supported
  • Whitespaces are ignored

E.g.

BitRateKey=100000;ReceiveOwnKey=false;LoopbackKey=true

CanRawFilter

CanRawFilter component enables to filter (i.e. accept or drop) incoming and outgoing frames:

  • Qt regular expressions are used to match filter rules.
  • Rules are matched from top to bottom
  • Default policy is applied to frames unmatched by any filter

Examples:

  • match 0x222 and 0x333 frames only [id field]
222|333
  • match 0x200 - 0x300 frames only [id field]
^[23]..$
  • match empty payload (DLC 0) [payload field]
^$
  • match 2 byte payload (DLC 2) [payload field]
^.{4}$

Adding new components

  1. Configure build to include templategen tool
cd build
cmake .. -DWITH_TOOLS=ON
make
  1. Generate component (use -g option if you don't need component to have GUI)
./tools/templategen/templategen -n MyNewComponent -o ../src/components -g
  1. CMake script automatically detects new components. It has to be invoked manually.
cmake ..
  1. Build project
make
  1. Your component is now integrated with CANdevStudio
  2. You may want to modify src/components/mynewcomponent/mynewcomponentplugin.h to configure section name, color and spacing
  3. Define component inputs and outputs in src/components/mynewcomponent/mynewcomponentmodel.cpp. Look for examples in other components.
  4. Modify automatically generated unit tests src/components/mynewcomponent/tests

candevstudio's People

Contributors

adam886 avatar btaczala avatar byunghyuk avatar dasa-mobica avatar dkozaratmobica avatar erikboto avatar grzegorzszczurekmobica avatar gunnarx avatar ijliao avatar insooth avatar jeremiah avatar jgressmann avatar jogo- avatar karolgrzadziel avatar mcko avatar mguentner avatar miekush avatar pm-1-1 avatar przemyslawdraszkiewicz avatar rkollataj avatar rthrh avatar sebastian-wieczorek avatar sebd71 avatar sygl avatar tamamcglinn avatar tuvok avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

candevstudio's Issues

Cannot launch qml script

Hello,
Thanks for this awesome software. I can not run any qml script. For example using the examples I get :

simple_timer.qml:13:5: Timer is not a type 
         Timer { 
        

Any idea where I went wrong ?
BTW :using official 1.2.2 release on ubuntu 20.04
Thanks
Jacques

[Feature Request] Add support for latest Qt 5.12 Serial Bus Module

Would you mind please adding support for the latest Qt 5.12 Serial Bus Module ?
I would like to try and use my J2534 Pass-Thru VCI(s).

http://doc.qt.io/qt-5/whatsnew511.html#qt-serial-bus-module

Qt Serial Bus Module

  • Added J2534 Pass-Thru CAN plugin for communication between a computer and a vehicle.
  • Added description, serial number and channel to QCanBusDeviceInfo, as far as supported by the various plugins.
  • Introduced categorized logging to the CAN bus module which can be enabled by the "qt.canbus" and "qt.canbus.plugins." filters.
  • QCanBusFrame::isValid() now checks for invalid CAN FD payload lengths. E.g. 24 is a valid CAN FD payload length, but 28 is not.

CANSignalEncoder appears to drop extended id.

If I understand correctly. I believe that in this scenario CANSignalEncoder is dropping extended ID when converting signal to raw packet. I've also attached the DBC I'm working with in this example.

[CANSignalEncoder-issue-dbc.zip]
CANSignalEncoder-issue

Cannot parse dbc files with special symbols, e.g., "°C" as Unit

Hi,

Thank you for the great work on this tool!

Maybe it is a minor one, but I thought is good to let you know. As the title says, when I load a dbc file that has special symbols like "°C", the tool is not able to load the dbc file.

It took me quite some time to pin point where the issue was. I had special symbols only in the Unit column, so I am not sure about other places like Comment filelds. Once I replaced with "degC" it worked. Maybe, you guys can check why it does that.
I did create a dbc parser/reader myself in .NET you can find it here and I didn't have this issue. But this tool could be different.

DBUS/Python support?

Hi!
Is there any plan to roll-out support for D-bus interface to be able to more easily communicate with CANdevStudio instance, in a similar way that's made between CANoe and Python, using COM objects on Windows? It would help with automation of some tests using CANdevStudio

CanRawView - save log

Add possibility to save log in CanRawVIew. Resulting file should match filtering and order of frames currently visible in a component.

DBC parsing error

Hi,
I have CDS 1.0.0. installed on W10, I have problem parsing some .DBC files - I downloaded "ford_cgea1_2_bodycan_2011.dbc" and "ford_cgea1_2_ptcan_2011.dbc" from opendbc https://github.com/commaai/opendbc/ . I can open first file without problem, second one is not parsed and no messages are shown in CanSignalData

Segmentation fault, Gtk-CRITICAL

Hello everyone.

OS: Manjaro, 5.14.10-arch1
Shell: GNOME Shell 40.5

When trying to open any existing project I'm always getting following error:

(process:124920): Gtk-CRITICAL **: 23:40:09.187: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed

(process:124920): Gtk-CRITICAL **: 23:40:09.187: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed

(process:124920): Gtk-CRITICAL **: 23:40:09.187: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed
zsh: segmentation fault (core dumped)  CANdevStudio

App crashes, creating new project and working on it is fine

[Feature Request] support CAN-FD

On a test with using Peak-CAN & SocketCAN driver on linux, the CANRawView shows nothing when CAN-FD messages received.

CAN-FD messages need to be supprted

Can't run application after build on Debian bullseye/sid

After successfull compilation using custom Qt SDK path:
cmake .. -DCMAKE_PREFIX_PATH=/opt/Qt/5.x/5.15.2/gcc_64

Application fails to run with message:
/usr/local/bin/CANdevStudio: symbol lookup error: /usr/local/bin/CANdevStudio: undefined symbol: _ZdlPvm, version Qt_5

Different compiler used during build?
gcc --version
gcc (Debian 10.2.0-19) 10.2.0

Also exported CC and CXX vars before build without luck..

ldd /usr/local/bin/CANdevStudio
linux-vdso.so.1 (0x00007ffe1ebcd000)
libQt5SerialBus.so.5 => /usr/lib/x86_64-linux-gnu/libQt5SerialBus.so.5 (0x00007f2be511e000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2be50fc000)
libQt5Svg.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Svg.so.5 (0x00007f2be50a5000)
libQt5Widgets.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 (0x00007f2be4a1c000)
libQt5Gui.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 (0x00007f2be435a000)
libQt5Core.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007f2be3e13000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f2be3c44000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f2be3b00000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f2be3ae6000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2be3921000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2be587a000)
libQt5Network.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Network.so.5 (0x00007f2be3799000)
libQt5SerialPort.so.5 => /usr/lib/x86_64-linux-gnu/libQt5SerialPort.so.5 (0x00007f2be3782000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f2be3763000)
libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007f2be36dc000)
libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f2be36a2000)
libharfbuzz.so.0 => /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007f2be359d000)
libmd4c.so.0 => /usr/lib/x86_64-linux-gnu/libmd4c.so.0 (0x00007f2be358b000)
libdouble-conversion.so.3 => /usr/lib/x86_64-linux-gnu/libdouble-conversion.so.3 (0x00007f2be3572000)
libicui18n.so.67 => /usr/lib/x86_64-linux-gnu/libicui18n.so.67 (0x00007f2be326d000)
libicuuc.so.67 => /usr/lib/x86_64-linux-gnu/libicuuc.so.67 (0x00007f2be3085000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2be307f000)
libpcre2-16.so.0 => /usr/lib/x86_64-linux-gnu/libpcre2-16.so.0 (0x00007f2be2ff5000)
libzstd.so.1 => /usr/lib/x86_64-linux-gnu/libzstd.so.1 (0x00007f2be2f25000)
libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f2be2df6000)
libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007f2be2da1000)
libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007f2be2d79000)
libGLdispatch.so.0 => /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f2be2cc1000)
libGLX.so.0 => /usr/lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f2be2c8d000)
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f2be2bca000)
libgraphite2.so.3 => /usr/lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007f2be2b9c000)
libicudata.so.67 => /usr/lib/x86_64-linux-gnu/libicudata.so.67 (0x00007f2be1083000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f2be1010000)
libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007f2be0f36000)
libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007f2be0f06000)
libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007f2be0efe000)
libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007f2be0eef000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f2be0dac000)
libbrotlidec.so.1 => /usr/lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x00007f2be0d9e000)
libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007f2be0d97000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f2be0d7b000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f2be0d51000)
libbrotlicommon.so.1 => /usr/lib/x86_64-linux-gnu/libbrotlicommon.so.1 (0x00007f2be0d2e000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f2be0b2a000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f2be0924000)
libbsd.so.0 => /usr/lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f2be0908000)

I can not import dbc files

When I import a dbc file from a proprietary dB or opendbc I get two messages.

TAG BS Not implemented

Parser log 103:1 syntax error
Failed to load CAN DB from "path"

I tried with three differentsdbc files

CanSignalEncoder

Port CanSignalEncoder from signals to master branch.

CanSignalEncoder enables to encode signals into resulting CAN frame

litter endian and big endian error

`

switch (sig.byteOrder) {

  | case 0:
  | // Little endian
  | littleEndian = true;
  | break;
  |  
  | case 1:
  | // Big endian
  | littleEndian = false;
  | break;
  |  
  | default:
  | cds_error("byte order {} not suppoerted", sig.byteOrder);
  | continue;
  | }

`

here, Intel is Little endian, and byteOrder is 1, Motorola is Big endian and byteOrder is 0

Build error on latest git

trying to build from the AUR:

[ 63%] Linking CXX static library libcansignalviewer.a
[ 63%] Built target cansignalviewer
[ 64%] Building CXX object src/components/cansignaldecoder/CMakeFiles/cansignaldecoder_test.dir/cansignaldecoder_test_autogen/mocs_compilation.cpp.o
[ 64%] Building CXX object src/components/cansignaldecoder/CMakeFiles/cansignaldecoder_test.dir/tests/cansignaldecoder_test.cpp.o
c++: fatal error: Terminated signal terminated program cc1plus
compilation terminated.
make[2]: *** [src/components/canrawsender/CMakeFiles/canrawsender_test.dir/build.make:90: src/components/canrawsender/CMakeFiles/canrawsender_test.dir/tests/canrawsender_test.cpp.o] Error 1
make[2]: *** Deleting file 'src/components/canrawsender/CMakeFiles/canrawsender_test.dir/tests/canrawsender_test.cpp.o'
make[2]: *** Waiting for unfinished jobs....
{standard input}: Assembler messages:
{standard input}:240597: Warning: end of file not at end of a line; newline inserted
[ 64%] Building CXX object src/components/cansignalencoder/CMakeFiles/cansignalencodermodel_test.dir/cansignalencodermodel_test_autogen/mocs_compilation.cpp.o
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
[ 64%] Building CXX object src/components/cansignalencoder/CMakeFiles/cansignalencodermodel_test.dir/tests/cansignalencodermodel_test.cpp.o
c++: fatal error: Terminated signal terminated program cc1plus
compilation terminated.
make[2]: *** [src/components/canload/CMakeFiles/canloadmodel_test.dir/build.make:90: src/components/canload/CMakeFiles/canloadmodel_test.dir/tests/canloadmodel_test.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1463: src/components/canload/CMakeFiles/canloadmodel_test.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
{standard input}: Assembler messages:
{standard input}:642426: Warning: end of file not at end of a line; newline inserted
{standard input}:643900: Error: unknown pseudo-op: `.lbi'
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
{standard input}: Assembler messages:
{standard input}:634114: Warning: end of file not at end of a line; newline inserted
c++: fatal error: Terminated signal terminated program cc1plus
compilation terminated.
make[2]: *** [src/components/canrawlogger/CMakeFiles/canrawlogger_test.dir/build.make:90: src/components/canrawlogger/CMakeFiles/canrawlogger_test.dir/tests/canrawlogger_test.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1797: src/components/canrawlogger/CMakeFiles/canrawlogger_test.dir/all] Error 2
c++: fatal error: Terminated signal terminated program cc1plus
compilation terminated.
make[2]: *** [src/components/canload/CMakeFiles/canload_test.dir/build.make:90: src/components/canload/CMakeFiles/canload_test.dir/tests/canload_test.cpp.o] Error 1
make[2]: *** Deleting file 'src/components/canload/CMakeFiles/canload_test.dir/tests/canload_test.cpp.o'
make[1]: *** [CMakeFiles/Makefile2:1493: src/components/canload/CMakeFiles/canload_test.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:2131: src/components/canrawsender/CMakeFiles/canrawsender_test.dir/all] Error 2
[ 65%] Linking CXX executable canrawloggermodel_test
[ 65%] Built target canrawloggermodel_test
[ 65%] Linking CXX executable canrawsendermodel_test
[ 65%] Built target canrawsendermodel_test
[ 66%] Linking CXX executable cansignaldatamodel_test
[ 67%] Linking CXX executable cansignaldecodermodel_test
[ 67%] Built target cansignaldatamodel_test
[ 67%] Built target cansignaldecodermodel_test
[ 67%] Linking CXX executable cansignaldecoder_test
[ 67%] Linking CXX executable cansignaldata_test
[ 67%] Built target cansignaldata_test
[ 67%] Built target cansignaldecoder_test
[ 68%] Linking CXX executable cansignalencodermodel_test
[ 68%] Built target cansignalencodermodel_test
make: *** [Makefile:166: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'candevstudio-git-r269.fe417bd3-1': 
error: packages failed to buid: candevstudio-git-r269.fe417bd3-1

Not able to use QML-Executor block

Hi ,

Step 1] I am able to load .dbc file under CanSignaldata and using CanSignalSender sending messages and same observed on virtual bus till it is working fine. (Using standalone version)

Step 2] ]Next step is I need to use QML executor block. I just take QML executor block and triying to load .qml file but its not working .

I don't know how to use it pls share any suggestion/guidance/ or any helpful design document dam stuck here

Pls find below Image that I did sample project..
https://user-images.githubusercontent.com/122876509/212884486-71a91aac-64f5-4c80-b520-f62f8e1ebcaa.png

Note -: This is not an issue this is query I have raised under this tab.

CanRawSender doesn't update frame data unless "Send" is toggled

Steps to reproduce:

  1. Set up a CanRawSender with a repeating frame, "Id: 111, Data: 00000000, Loop: checked, Interval: 100".
  2. Enable it by clicking "Send"
  3. Change the Id to 112.
  4. Start simulation

The CanRawSender will now send frames with Id 111 and not Id 112, until "Send" is set to off and then on again.

I had a quick look at the code, and it looks like only NewLineManager::SetSendButtonState() is called on changes to Id, Data etc, but the actual set up of the frame is only done in NewLineManager::SendButtonPressed().

Visual block

Add a block for visualization. This should be like a QML component that is associated with a block and the user can define the visual appearance in a qml file and create the bindings with CAN information.
This should be like the panels in CANoe - useful to create dasboards and control panels.

can't drag+drop elements onto canvas

On 0.3 @ 4cf77f6 : I can't drag and drop elements onto canvas; I need to right-click on the canvas and select the elements. See screenshot of attempt at dragging elements.

Qt-5.12 on Arch linux. Let me know if you need more information.

install/build hanging: "Visual Studio 16 2019 - could not find any instance of Visual Studio."

Installation on system: Windows 10 Prof

I cannot find a redistributable vs2019 or similar that matches this requirement at microsoft. All I find is something that is labeled 2015-2022 with a version 14.34.31931. MS describes that this should now be some "fit for all" package (https://learn.microsoft.com/de-DE/cpp/windows/latest-supported-vc-redist?view=msvc-170)
At cmake there is a similar issue from 2021 but left without solution.

In the file CMakeOutput.log it is written:
"The system is: Windows - 10.0.19044 - AMD64"

True, but doesn't help to come any step further.

Any idea how this can be built on windows 10?

Application is hanged after running for more than 1 hour

I am using a VM with ubuntu 18 image. I've cloned and rebuilt the latest commit in master branch. I tested with CANraws and CANsignals module. The issue happens when I left the application running through for more than 1 hour, and other apps which are running are hanged as well. The issue only disappears when I close all the apps and restart them.

CanSignalDecoder

Port CanSignalDecoder from signals to master branch.

CanSignalDecoder enables to decode CAN frames to CAN signals.

CanSignalViewer

Port CanSignalViewer from signals to master branch.

CanSignalViewer enables to view CAN signals.

[Feature Request] Add support for slcan protocol

Add support for slcan protocol with serial device without slcand for Windows.

I reprogrammed the open hardware device CanDybug to support the slcan protocol and I would like to use it on Windows.
Maybe I will find the time in the next few weeks, then I can implement it if the request is accepted.

[Archlinux packaging] - disable tests

Hi,
I'm updating the PKGBUILD for Arch, and I noticed that since a231e8e , "make install" copies a lot of gmock and gtest files which I think are really not necessary for the typical user.

So I tried to invoke cmake with "-DWITH_TESTS=OFF", but it looks like that option isn't forwarded to 3rdParty/CANdb (I think that is the submodule responsible for those gtest files).

Any ideas / did I forget an option ?

Thanks!

Pi Compatibility

Building this on a Pi (Stretch with Qt 5.12.3) seems to complete fine, but executing files/./CANdevStudio.sh it reports:

./CANdevStudio.sh: 15: ./CANdevStudio.sh: /home/pi/CANdevStudio/files/./CANdevStudio: not found

Is there a known compatibility issue between CanDevStudio and the Pi Zero (using a CAN hat)?

Can't edit "CanRawFilter" from GUI

I'm running 0.3 @ 4cf77f6 on Arch Linux. After adding a CanRawFilter element, I can't edit it : I can add, delete lines; change between "Accept" and "Drop", but impossible to change the ID and Payload fields. Tried clicking, pressing enter, space, backspace, numbers, arrows, no effect.

Qt-5.12 on Arch linux. Let me know if you need more information.

Hints ?

Signal decoder do not parse signals correctly* when they are big-endian.

Signal decoder does not parse signals when they are big-endian. There are two problems I observed.

  • CanSignalDecoderPrivate::decodeFrame() calls CanSignalDecoderPrivate::rawToSignal with littleEndian parameter being true (even if signal is bigendian) It might be due to parsing (did not inspected further) but hotfixed by hardcoding litteEndian parameter to be false (since all my signals were big endian)
  • CanSignalDecoderPrivate::rawToSignal() handles bitordering uniformly for both, solved it by following hotfix.
//bit++;
if(littleEndian) bit++;
if(!littleEndian) bit--;

DBC I used is this one: toyota_rav4h_2017_mod.dbc

[Support Request] How to configure PCAN-USB bitrate on CANdevStudio Win32

I'm trying to use the latest Win32 Prebuilt package from Bintray :
CANdevStudio-0.3.875ac1f-win32-standalone (https://bintray.com/rkollataj/CANdevStudio/download_file?file_path=CANdevStudio-0.3.875ac1f-win32-standalone.7z)

OS : Windows 10 x64 Version 1703 (15063.1563)
CAN Hardware : PeakCAN PCAN-USB (Drivers: 4.1.4.16279 KMDF 1.9, x64, Desktop)

How can I configure the actual PCAN-USB bitrate in CANdevStudio ? Using a 'plugin.json' file or somewhere in the GUI ?

Thank you for your support

CanSignalData

Port CanSignalData from signals to master branch.

CanSignalData enables to load CAN database. Work started here

PyScripter

Create component that will enable to manipulate data using Python scripts. Required features:

  • Component in/outs to be defined in Python script
  • Possibility to define multiple inputs and outputs
  • Python script to react on incoming inputs
  • Python script to react on timing events (i.e. periodic events)

Any updates with DBC support ?

I got to understand from the documentation that the signals branch has DBC support .

I managed to compile it and run it .

I am able to see CAN messages , but not able to decode it with .dbc file , can someone please tell me the steps to set it up .

Also , the list down menu while selecting CAN interface , can interface type etc is not appearing .
(I had to manually type in!)

Any pointers as to where to start would be much appreciated .

I am very happy with the tool , i hope this could be a good opensource alternative to expensive closed source softwares such as vector db++ .(Used widely in the automotive industry )

Though some fixing and additional tools would be necessary .

I see the lack of a good GUI CAN tool kind of hindering progress in the Automotive sector , especially since ROS came into picture .

CanSignalSender

Port CanSignalSender from signals to master branch.

CanSignalSender enables to send CAN signals.

Scripting block

Add block for scripting (maybe javascript as it is integrated whit QT, evntl. QML would be very interesting). This should offer timers and advanced features like CAPL in CANoe.

Segmentation fault after frequently starting/stopping VirtualCanBus simulation

Precondition:
CanDeviceModel::hasSeparateThread() true

Steps to reproduce:

  1. Create CanDevice node component
  2. Open contex menu
  3. Set backend to VirtualCanBus and click OK
  4. Turn on simulation
  5. Turn off simulation
  6. repeat steps 2:5

Result:

[2019-10-25 08:30:27.993] [cds-qt] [warning] [@0] QSocketNotifier: Socket notifiers cannot be enabled or disabled from another thread
[2019-10-25 08:30:48.407] [cds-qt] [warning] [@0] QSocketNotifier: Invalid socket 26 and type 'Read', disabling...
[2019-10-25 08:30:48.407] [cds-qt] [info] [@0] Server [0x7fffcd8fd380] client disconnected.
[2019-10-25 08:30:48.407] [cds-qt] [warning] [@0] QSocketNotifier: Invalid socket 26 and type 'Read', disabling...

Quick fixes:

  1. Disable "threading" by setting: CanDeviceModel::hasSeparateThread() return false
  2. inside CanDeviceQt::init(const QString& backend, const QString& iface) repleace:
    delete _device;
    with
    _device.deleteLater();

I will prepare pull request when I finish testing.

[Feature Request] Add support for automatic PassThruCAN device discovery on Windows

Only on Windows (32/64bits), when selecting the backend: passthrucan, it should be easier to select the proper CAN adapter by providing the list (as a drop-down list) of all available CAN adapters accessible as documented here:
https://github.com/qt/qtserialbus/blob/670f912fbc08002ac063504755fc7705931e0d6e/src/serialbus/doc/src/passthrucan.qdoc#L66-L76
For my previous tests, I had no other choice than to look for the actual CAN adapter name in the Windows registry myself.

[Feature Request] Add a CanStatistic component

Add a CanStatistic component or extend the current CanLoad component to display CAN Statistics:

  • number of received Errors frames
  • number of received CAN frames
  • number of received Remote CAN frames
  • number of received Extended CAN frames
  • number of received Data bytes
  • number of sent CAN frames
  • number of sent Remote CAN frames
  • number of sent Extended CAN frames
  • number of sent Data bytes
  • Errors frames per second
  • Errors frames per minute
  • CAN frames per second
  • CAN frames per minute
  • CAN Busload (%)
  • CAN Peak Busload (%)

Extended IDs LSB Truncated.

I'm having an issue with the LSB being truncated. As you can see all the IDs have LSB 0x00 when in fact many of them should not be zero. Is there something I need to be aware of?

CANdevStudio-ExtendedIDsTruncated

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.