An open source solution to integrate Intrepid Control Systems vehicle networking hardware with your Qt application based on slightly modified libicsneo libary
This is very initial stage of the plugin - not all funtctions or checks are supported it was implemented on other plugin example. Whole libicsneo is "staticaly" complied into plugin. Using dynamic version of libicsneo was impractical and C++ interface is not recommended for such use by its authors. QMake is used as build system.
- Gcc 10.2.0
- MinGw32 8.1
- Microsoft Visual Studio 2017 64Bit
git clone https://github.com/3electrons/qticsneo.git --recursive
cd qticsneo
qmake
make
Build plugin will be genterated into plugins/canbus directory. The simples way to test it, is use it against serialbus/can example from Qt/Examples directory in Qt SDK.
On Linux to be able to dectect ethernet devices, you may need to use setcap (based on: https://askubuntu.com/questions/530920/tcpdump-permissions-problem)
sudo setcap cap_net_raw,cap_net_admin=eip <your program name>
The dependencies are as follows:
- Qt SDK
- Some C++ complier supporting above Qt version (MinGW, MSVC)
The dependencies are as follows:
- GCC
- Qt SDK
libusb-1.0-0-dev
libpcap0.8-dev
build-essential
is recommended
- Bitrate settings under windows sets it to 20000 - reagardles of value. Do not know why - at the moment.
- Removed config key ParameterOmitKey as (QCanBusDevice::UserKey +1) - now any key set to QVariant() will be omitted in device settings update.
- Added config key ParameterIsoKey (QCanBusDevice::UserKey+1) - to support ISO for CAN-FD
- Added config key ParameterTerminationKey (QCanBusDevice::UserKey+2) - to add support for Termination.
- Added info to description what kind of driver is used to distinguish USB vs ETH
- Ignoring getLastError() in busStatus() that are not related to current device. icsneo::FindAllDevices() - left single error on list of errors for device that does not exist anymore because of autoprobe for each type of supported devices. Getting full info about this error causes libicsneo to crash.
- Added channels listed as CANx.y where X is Interpids device and Y is Network/Channel number on device such as HSCAN1, HSCANFD2
- Added CANFD support
- Shadow buildng works
- Verification of bitrate is done by libicsneo - returning nice error messages
- Added License file
- Proof of concept - basic functionality.
- Not shure if QCanBusDevice::LoopbackKey is properly implemented - using CAN_SETTINGS->Mode = LOOPBACK. Possibly should be done cor CANFD_SETTINGS as well.
- Implemented resetDevice as closing underlying Device and recreating based on SerialNumber - might not work stable with multichannel approach. Rahter need additional attention for implementing it better.
- Verbose logging (No logging at all on Windows)
- Consider implementation of IncomingEvenHandler (mockup already exists) with setConfigurationParameter(QCanBusDevice::UserKey + PollingQueue ) to possibly process heavy loads.
- Verify if device status could be better implemnted - Possibly by events?
- Consider adding AutoBaudKey as own Key to support CAN_SETTINGS::auto_baud. More info form libicsneo needed.
- Implement configuration parameters QCanBusDevice::RecieveOwnKey, QCanBusDevice::RawFilterKey, QCanBusDevice::ErrorFilterKey,