QCanBusFactory Class
A classe QCanBusFactory é uma classe de fábrica utilizada como interface para plug-ins de barramento CAN. Mais...
| Cabeçalho: | #include <QCanBusFactory> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS SerialBus) target_link_libraries(mytarget PRIVATE Qt6::SerialBus) |
| qmake: | QT += serialbus |
Funções públicas
| virtual QList<QCanBusDeviceInfo> | availableDevices(QString *errorMessage) const = 0 |
| virtual QCanBusDevice * | createDevice(const QString &interfaceName, QString *errorMessage) const = 0 |
Descrição detalhada
Todos os plug-ins devem implementar as funções fornecidas por esta classe de fábrica.
Documentação das funções de membro
[pure virtual] QList<QCanBusDeviceInfo> QCanBusFactory::availableDevices(QString *errorMessage) const
Retorna a lista de dispositivos disponíveis e suas funcionalidades para o ` QCanBusDevice`.
errorMessage Contém uma descrição do erro em caso de falha.
[pure virtual] QCanBusDevice *QCanBusFactory::createDevice(const QString &interfaceName, QString *errorMessage) const
Cria um novo objeto ` QCanBusDevice`. O chamador deve assumir a responsabilidade pelo ponteiro retornado.
interfaceName é o nome da interface CAN e errorMessage contém uma descrição do erro em caso de falha.
Se a fábrica não conseguir criar um plugin, ela retorna ` 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.