QCanBusFactory Class
La classe QCanBusFactory è una classe factory utilizzata come interfaccia per i plugin relativi al bus CAN. Per saperne di più...
| Intestazione: | #include <QCanBusFactory> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS SerialBus) target_link_libraries(mytarget PRIVATE Qt6::SerialBus) |
| qmake: | QT += serialbus |
Funzioni pubbliche
| virtual QList<QCanBusDeviceInfo> | availableDevices(QString *errorMessage) const = 0 |
| virtual QCanBusDevice * | createDevice(const QString &interfaceName, QString *errorMessage) const = 0 |
Descrizione dettagliata
Tutti i plugin devono implementare le funzioni fornite da questa classe factory.
Documentazione delle funzioni membro
[pure virtual] QList<QCanBusDeviceInfo> QCanBusFactory::availableDevices(QString *errorMessage) const
Restituisce l'elenco dei dispositivi disponibili e delle relative funzionalità per l'QCanBusDevice.
errorMessage Contiene una descrizione dell'errore in caso di errore.
[pure virtual] QCanBusDevice *QCanBusFactory::createDevice(const QString &interfaceName, QString *errorMessage) const
Crea un nuovo oggetto ` QCanBusDevice`. Il chiamante deve assumere la proprietà del puntatore restituito.
interfaceName è il nome dell'interfaccia CAN e ` errorMessage ` contiene una descrizione dell'errore in caso di fallimento.
Se la factory non riesce a creare un plugin, restituisce ` 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.