QCanBusFactory#

The QCanBusFactory class is a factory class used as the plugin interface for CAN bus plugins. More

Inheritance diagram of PySide6.QtSerialBus.QCanBusFactory

Synopsis#

Virtual functions#

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description#

All plugins must implement the functions provided by this factory class.

class PySide6.QtSerialBus.QCanBusFactory#
abstract PySide6.QtSerialBus.QCanBusFactory.availableDevices(errorMessage)#
Parameters:

errorMessage – str

Returns the list of available devices and their capabilities for the QCanBusDevice .

errorMessage contains an error description in case of failure.

abstract PySide6.QtSerialBus.QCanBusFactory.createDevice(interfaceName, errorMessage)#
Parameters:
  • interfaceName – str

  • errorMessage – str

Return type:

PySide6.QtSerialBus.QCanBusDevice

Creates a new QCanBusDevice . The caller must take ownership of the returned pointer.

interfaceName is the CAN interface name and errorMessage contains an error description in case of failure.

If the factory cannot create a plugin, it returns nullptr.