The QCanBusFactory class is a factory class used as the plugin interface for CAN bus plugins. 更多...
| 頭: | #include <QCanBusFactory> |
| qmake: | QT += serialbus |
| Since: | Qt 5.8 |
| 繼承者: | QCanBusFactoryV2 |
該類已過時。 提供它是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它。
| virtual QCanBusDevice * | createDevice (const QString & interfaceName , QString * errorMessage ) const = 0 |
The QCanBusFactory class is a factory class used as the plugin interface for CAN bus plugins.
所有插件必須實現此工廠類提供的函數。
此類已棄用,應使用 QCanBusFactoryV2 代替。
另請參閱 QCanBusFactoryV2 .
[pure virtual]
QCanBusDevice
*QCanBusFactory::
createDevice
(const
QString
&
interfaceName
,
QString
*
errorMessage
) const
創建新的 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.
若工廠無法創建插件,返迴
nullptr
.