diff options
author | Andre Hartmann <aha_1980@gmx.de> | 2016-07-31 20:43:13 +0200 |
---|---|---|
committer | André Hartmann <aha_1980@gmx.de> | 2017-01-10 15:18:02 +0000 |
commit | 55d405697c79c4ca23535140e60915e89b4054e3 (patch) | |
tree | 8144ae742df62f6d362a71d160a2e3e93484fd96 /src/plugins/canbus/systeccan/systeccanbackend.h | |
parent | 66fd2b9655d5f34f880b8daf8b2f422a27789517 (diff) |
CAN: Add QCanBusDeviceInfo
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>
Diffstat (limited to 'src/plugins/canbus/systeccan/systeccanbackend.h')
-rw-r--r-- | src/plugins/canbus/systeccan/systeccanbackend.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/canbus/systeccan/systeccanbackend.h b/src/plugins/canbus/systeccan/systeccanbackend.h index 11df787..7bf20f8 100644 --- a/src/plugins/canbus/systeccan/systeccanbackend.h +++ b/src/plugins/canbus/systeccan/systeccanbackend.h @@ -39,6 +39,7 @@ #include <QtSerialBus/qcanbusframe.h> #include <QtSerialBus/qcanbusdevice.h> +#include <QtSerialBus/qcanbusdeviceinfo.h> #include <QtCore/qvariant.h> #include <QtCore/qlist.h> @@ -65,6 +66,7 @@ public: QString interpretErrorFrame(const QCanBusFrame &errorFrame) override; + static QList<QCanBusDeviceInfo> interfaces(); static bool canCreate(QString *errorReason); private: |