diff options
Diffstat (limited to 'src/serialbus/doc/src/peakcan.qdoc')
-rw-r--r-- | src/serialbus/doc/src/peakcan.qdoc | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/serialbus/doc/src/peakcan.qdoc b/src/serialbus/doc/src/peakcan.qdoc index 8b64c0a..68d52fd 100644 --- a/src/serialbus/doc/src/peakcan.qdoc +++ b/src/serialbus/doc/src/peakcan.qdoc @@ -33,8 +33,8 @@ The PeakCAN plugin encapsulates the low-level API to work with the \l{http://www.peak-system.com/}{PEAK-System} CAN adapters. - This plugin requires the PCAN device drivers and the pcanbasic library - (pcanbasic.dll under Windows). + This plugin requires the PCAN device drivers and the PCAN-Basic library + (pcanbasic.dll under Windows, libpcanbasic.so under Linux). \section1 Creating CAN Bus Devices @@ -51,14 +51,21 @@ Next, a connection to a specific interface can be established: \code + QString errorString; QCanBusDevice *device = QCanBus::instance()->createDevice( - QStringLiteral("peakcan"), QStringLiteral("usb0")); - device->connectDevice(); + QStringLiteral("peakcan"), QStringLiteral("usb0"), &errorString); + if (!device) { + // Error handling goes here + qDebug << errorString; + } else { + device->connectDevice(); + } \endcode Where \e usb0 is the active CAN interface name. The PeakCAN plugin supports 16 USB interfaces from \e usb0 to \e usb15 and 16 PCI interfaces from - \e pci0 to \e pci15. + \e pci0 to \e pci15. The \l {QCanBus::}{availableDevices()} method returns a + list of currently available devices. \note Only the USB and PCI adapters are currently supported by this plugin. |