QCanBusFactory Class
La clase QCanBusFactory es una clase de fábrica utilizada como interfaz para plugins de bus CAN. Más...
| Cabecera: | #include <QCanBusFactory> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS SerialBus)target_link_libraries(mytarget PRIVATE Qt6::SerialBus) |
| qmake: | QT += serialbus |
Funciones públicas
| virtual QList<QCanBusDeviceInfo> | availableDevices(QString *errorMessage) const = 0 |
| virtual QCanBusDevice * | createDevice(const QString &interfaceName, QString *errorMessage) const = 0 |
Descripción detallada
Todos los plugins deben implementar las funciones proporcionadas por esta clase de fábrica.
Documentación de las funciones
[pure virtual] QList<QCanBusDeviceInfo> QCanBusFactory::availableDevices(QString *errorMessage) const
Devuelve la lista de dispositivos disponibles y sus capacidades para QCanBusDevice.
errorMessage contiene una descripción de error en caso de fallo.
[pure virtual] QCanBusDevice *QCanBusFactory::createDevice(const QString &interfaceName, QString *errorMessage) const
Crea un nuevo QCanBusDevice. El llamante debe tomar posesión del puntero devuelto.
interfaceName es el nombre de la interfaz CAN y errorMessage contiene una descripción del error en caso de fallo.
Si la fábrica no puede crear un complemento, devuelve nullptr.
© 2026 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.