diff options
author | Andre Hartmann <aha_1980@gmx.de> | 2016-07-25 20:42:17 +0200 |
---|---|---|
committer | André Hartmann <aha_1980@gmx.de> | 2016-08-30 12:39:12 +0000 |
commit | 45bcf9e8f0249a984a90e021e69e93b96733ddd4 (patch) | |
tree | daacfdc3b90cd51afa6368181025d6a9785d9618 /src/plugins/canbus/tinycan | |
parent | 5291efbac552b55d1343040f61908fbf71c29243 (diff) |
CAN: Unify interface names
Mostly, the interfaces now simply start with can0 and the number
increases for every next interface.
Some vendors distinguish between e.g. PCI and USB interfaces. In this
case, the interfaces are named usb0 and pci0, with increasing numbers,
respectively.
Multiple channels per device are accessed by adding the channel number
after a dot: can0.0 for the first channel in the first device (TinyCAN).
SocketCAN is still a bit different, as it allows arbitrary interface
names to be mapped to the hardware or virtual CAN busses.
[ChangeLog][QtSerialBus][Unify interface names] The interface names
of the different backends were unified to follow a common rule: The
prefixes were unified, the numbering now always starts with zero.
Change-Id: Ia2ca76a9be01b9123aed1ede90debf69871bb82c
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/plugins/canbus/tinycan')
-rw-r--r-- | src/plugins/canbus/tinycan/tinycanbackend.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/canbus/tinycan/tinycanbackend.cpp b/src/plugins/canbus/tinycan/tinycanbackend.cpp index 2f9c191..ee2b347 100644 --- a/src/plugins/canbus/tinycan/tinycanbackend.cpp +++ b/src/plugins/canbus/tinycan/tinycanbackend.cpp @@ -305,9 +305,9 @@ QString TinyCanBackendPrivate::systemErrorString(int errorCode) static int channelIndexFromName(const QString &interfaceName) { - if (interfaceName == QStringLiteral("channela")) + if (interfaceName == QStringLiteral("can0.0")) return INDEX_CAN_KANAL_A; - else if (interfaceName == QStringLiteral("channelb")) + else if (interfaceName == QStringLiteral("can0.1")) return INDEX_CAN_KANAL_B; else return INDEX_INVALID; |