QCanBus Class
The QCanBus class handles registration and creation of bus backends. More...
Header: | #include <QCanBus> |
qmake: | QT += serialbus |
Since: | Qt 5.6 |
Inherits: | QObject |
Public Functions
QCanBusDevice * | createDevice(const QByteArray &plugin, const QString &interfaceName) const |
QList<QByteArray> | plugins() const |
- 31 public functions inherited from QObject
Static Public Members
QCanBus * | instance() |
- 11 static public members inherited from QObject
Additional Inherited Members
- 1 property inherited from QObject
- 1 public slot inherited from QObject
- 2 signals inherited from QObject
- 9 protected functions inherited from QObject
Detailed Description
The QCanBus class handles registration and creation of bus backends.
QCanBus loads Qt CAN Bus plugins at runtime. The ownership of serial bus backends is transferred to the loader.
Member Function Documentation
QCanBusDevice *QCanBus::createDevice(const QByteArray &plugin, const QString &interfaceName) const
Creates a CAN bus device. plugin is the name of the plugin as returned by the plugins() method. interfaceName is the CAN bus interface name.
Ownership of the returned backend is transferred to the caller. Returns nullptr
if no suitable device can be found.
[static]
QCanBus *QCanBus::instance()
Returns a pointer to the QCanBus class. The object is loaded if necessary. QCanBus uses the singleton design pattern.
QList<QByteArray> QCanBus::plugins() const
Returns a list of identifiers for all loaded plugins.
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.