QCanBusFactory 類是用作 CAN Bus 插件的插件接口的工廠類。 更多...
| 頭: | #include <QCanBusFactory> |
| qmake: | QT += serialbus |
| Since: | Qt 5.8 |
| 繼承者: |
該類已過時。 提供它是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它。
該類在 Qt 5.8 引入。
| virtual QCanBusDevice * | createDevice (const QString & interfaceName , QString * errorMessage ) const = 0 |
所有插件必須實現此工廠類提供的函數。
此類已棄用,應使用 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
.