PySide6.QtSerialBus.QCanBusFactory

class QCanBusFactory

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

Details

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

Synopsis

Virtual methods

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

abstract availableDevices(errorMessage)
Parameters:

errorMessage – str

Return type:

.list of QCanBusDeviceInfo

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

errorMessage contains an error description in case of failure.

abstract createDevice(interfaceName, errorMessage)
Parameters:
  • interfaceName – str

  • errorMessage – str

Return type:

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.