QCanBusFactory Class

QCanBusFactoryクラスは、CANバスプラグインのプラグインインターフェースとして使用されるファクトリークラスです。詳細...

ヘッダー #include <QCanBusFactory>
CMake: find_package(Qt6 REQUIRED COMPONENTS SerialBus)
target_link_libraries(mytarget PRIVATE Qt6::SerialBus)
qmake: QT += serialbus

パブリック関数

virtual QList<QCanBusDeviceInfo> availableDevices(QString *errorMessage) const = 0
virtual QCanBusDevice *createDevice(const QString &interfaceName, QString *errorMessage) const = 0

詳細説明

すべてのプラグインは、このファクトリークラスが提供する関数を実装する必要があります。

メンバ関数のドキュメント

[pure virtual] QList<QCanBusDeviceInfo> QCanBusFactory::availableDevices(QString *errorMessage) const

QCanBusDevice で利用可能なデバイスとその機能のリストを返す。

errorMessage 失敗した場合はエラー説明が含まれます。

[pure virtual] QCanBusDevice *QCanBusFactory::createDevice(const QString &interfaceName, QString *errorMessage) const

新しいQCanBusDevice を作成する。呼び出し元は、返されたポインタの所有権を持たなければならない。

interfaceName はCANインターフェース名で、 は失敗した場合のエラー説明を含む。errorMessage

ファクトリーがプラグインを作成できない場合、nullptr を返します。

© 2025 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.