summaryrefslogtreecommitdiffstats
path: root/examples/serialbus/can/connectdialog.ui
Commit message (Collapse)AuthorAgeFilesLines
* CAN example: fix memory leakIvan Solovev2022-09-071-1/+0
| | | | | | | | | | | For some reason the connectiondialog.ui form created a layout for a custom CanBusDeviceInfoBox dialog. However this dialog already has its own layout, so the layout created by ConnectionDialog was just hanging around without being added to any class hierarchy, which resulted in a memleak, as reported by ASAN. Change-Id: Id77b06069a0c77799e6a856932eadee2d7312b39 Reviewed-by: André Hartmann <aha_1980@gmx.de>
* CAN Example: Add CanBusDeviceInfo dialogAndre Hartmann2021-07-271-139/+102
| | | | | | | | | | | As example for the new function QCanBusDevice::deviceInfo(). Therefore, extract the group box containing the information from the connect dialog and re-use it for the new CAN device information dialog. Change-Id: I1fd5f9b630a24c819c1fd77a4e2c05542dc15378 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* CAN example: Replace received frames edit with proper table and modelEvgeny Shtanov2021-03-191-210/+276
| | | | | | | | | | | Add a class based on QAbstractTableModel to show the received frames. Also add a configurable queue to buffer the frames before displaying them. This should avoid frames loss in flood traffic mode. Task-number: QTBUG-85611 Change-Id: Iac4671096c1cbfdc8297acf3c99be960b7eaf010 Reviewed-by: André Hartmann <aha_1980@gmx.de>
* QCanBusDeviceInfo: Add function alias()Andre Hartmann2020-02-181-1/+8
| | | | | | | | | | | | | | | | [ChangeLog][QCanBusDeviceInfo] Added the function alias() to query user-defineable identifiers associated with a CAN bus interface. Currently implemented for Peak CAN hardware on Windows with PCAN-Basic >= 4.4.0: It returns the PCAN_DEVICE_ID here, which can be set with PCAN-View. Fixes: QTBUG-65195 Change-Id: I70480df956498015c3f876da7c12406be045aba6 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add more info to QCanBusDeviceInfoAndre Hartmann2018-01-121-2/+23
| | | | | | | | | | | | | | | | | | | Added description, serial number and channel for SocketCAN, PeakCAN, SystecCAN, and VectorCAN plugins. For now, not all plugins do support all kind of information: SocketCAN: description and channel PeakCAN: description and channel (Windows PCANBasic >= 4.2.0) SystecCAN: description, serial number, and channel VectorCAN: description, serial number, and channel [ChangeLog][QCanBusDeviceInfo] Added description, serial number and channel to QCanBusDeviceInfo, as far as supported by the various plugins. Change-Id: Ib2292e06065eb91848f682ebf69a4cc968f4d4ba Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* CAN-Example: Rename all occurrences of "backend" to "plugin"Andre Hartmann2017-07-101-3/+3
| | | | | | | | | | The first parameter of QCanBus::createDevice() is called "plugin", so use this term in our examples to avoid confusion. Change-Id: I2fc28731d3763e037c18a7030205dad5d54183cd Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* CAN: Introduce CAN FD Bitrate Switch (BRS)Andre Hartmann2017-01-171-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QCanBusFrame: Added hasBitrateSwitch and setBitrateSwitch to QCanBusFrame and therefore, increased the QCanBusFrame version number. * Setting QCanBusFrame::setBitrateSwitch(true) also sets QCanBusFrame::setFlexibleDataRateFormat(true) * Setting QCanBusFrame::setFlexibleDataRateFormat(false) also sets QCanBusFrame::setBitrateSwitch(false) QCanBusDevice: Reference implementation and documentation are done for the SocketCAN plugin. The CAN Example allows to send frames with Bitrate Switch enabled and visualize received frames with Bitrate Switch set. Unfortunately, the SocketCAN plugin does not allow to change any bitrate yet, so the newly added data bitrate selection box in ConnectDialog seems a bit useless. This box is however needed once other plugins become CAN FD capable and implement bitrate switching. [ChangeLog][QCanBusFrame] Introduced flag to allow data bitrate switching for CAN FD frames. Reference implementation is done for the SocketCAN plugin. Task-number: QTBUG-56720 Change-Id: Ieab04020f4750c8b0085624d2250ad7cd982cd96 Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* CAN-Example: Introduce bitrate selection combox boxAndre Hartmann2017-01-161-3/+10
| | | | | | | | Factor the bitrate selection logic out of connect dialog to allow re-using the logic for CAN FD data bitrate selection later. Change-Id: I0a509c6200dddbd6b254a5e7f0702e6b0c99d1a3 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* CAN: Add QCanBusDeviceInfoAndre Hartmann2017-01-101-5/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | Returns: * a list of available devices for the chosen plugin * if the device is virtual * if the device is CAN FD capable Use this list in the CAN Example for interface selection. If information about virtual channels or CAN FD capabability is not available, false is returned. For SocketCAN, PeakCAN, VectorCAN and SystecCAN, the implementation is completed. TinyCAN only return the list of possible interfaces for now. This is can be changed later, but needs quite some refactoring of the TinyCAN plugin. [ChangeLog][QtCanBus] Added the new class QCanBusDeviceInfo for enumeration of available CAN interfaces and more information about them. Task-number: QTBUG-54298 Change-Id: I851bcc3b9ee41aaaf1164c6b4a5aaf6503cd8746 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* CAN-Example: Change SettingsDialog to ConnectDialogAndre Hartmann2016-05-031-0/+175
This simplifies the handling and makes it more like how other CAN monitors behave. * After startup, the connect dialog is shown * If the dialog is accepted, the selected device is connected instantly * To interrupt a connection, the disconnect action can be used * To connect again, the action connect can be used Change-Id: I47db596658e90cc0393981fba135cd6d89191f1a Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>