QCanBusDeviceInfo Class
QCanBusDeviceInfo は、CAN バスインターフェースに関する情報を提供します。詳細...
| ヘッダー: | #include <QCanBusDeviceInfo> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS SerialBus) target_link_libraries(mytarget PRIVATE Qt6::SerialBus) |
| qmake: | QT += serialbus |
パブリック関数
| QCanBusDeviceInfo() | |
| QCanBusDeviceInfo(const QCanBusDeviceInfo &other) | |
(since 6.10) | QCanBusDeviceInfo(QCanBusDeviceInfo &&other) |
| ~QCanBusDeviceInfo() | |
(since 6.0) QString | alias() const |
| int | channel() const |
| QString | description() const |
| bool | hasFlexibleDataRate() const |
| bool | isVirtual() const |
| QString | name() const |
(since 6.2) QString | plugin() const |
| QString | serialNumber() const |
| void | swap(QCanBusDeviceInfo &other) |
| QCanBusDeviceInfo & | operator=(QCanBusDeviceInfo &&other) |
| QCanBusDeviceInfo & | operator=(const QCanBusDeviceInfo &other) |
メンバ関数のドキュメント
[delete] QCanBusDeviceInfo::QCanBusDeviceInfo()
QCanBusDeviceInfo のインスタンスをデフォルトコンストラクタで生成します。この関数は削除されました。
QCanBusDeviceInfo::QCanBusDeviceInfo(const QCanBusDeviceInfo &other)
other のコピーを作成します。
[constexpr noexcept default, since 6.10] QCanBusDeviceInfo::QCanBusDeviceInfo(QCanBusDeviceInfo &&other)
other から CAN バスデバイスの情報を move-construct します。
この関数は Qt 6.10 で導入されました。
[noexcept] QCanBusDeviceInfo::~QCanBusDeviceInfo()
CANバスデバイスの情報を破棄します。
[since 6.0] QString QCanBusDeviceInfo::alias() const
このCANバスインターフェースに関連付けられた、ユーザー定義可能なエイリアスを返します。
一部のCANバスインターフェースには、ユーザー定義のエイリアスを関連付けることができます。これは主に、CANハードウェアベンダーのツールを使用して行われます。エイリアスを使用することで、特に複数のインターフェースが接続されている場合に、後でこのハードウェアを識別できるようになります。
注: serialNumber() とは異なり 、エイリアスの一意性は保証されません。
この関数が CAN プラグインでサポートされていない場合、空の文字列が返されます。
この関数は Qt 6.0 で導入されました。
serialNumber()も参照してください 。
int QCanBusDeviceInfo::channel() const
CANバスインターフェースの連番チャンネル番号を、0から始めて返します。たとえば、2チャンネルのCANインターフェースの場合、チャンネル0と1が存在します。インターフェースのチャンネルが1つしかない場合、またはチャンネルに関する情報が利用できない場合は、0が返されます。
QString QCanBusDeviceInfo::description() const
利用可能な場合、CANバスインターフェースに関する説明文を返します。出力例:「PCAN USB Pro FD」。説明文が利用できない場合は、空の文字列が返されます。
bool QCanBusDeviceInfo::hasFlexibleDataRate() const
CANバスインターフェースがCAN FD(フレキシブルデータレート)に対応している場合、trueを返します。
この情報が利用できない場合は、falseが返されます。
bool QCanBusDeviceInfo::isVirtual() const
CANバスインターフェースが仮想である場合(つまり、実際のCANハードウェアに接続されていない場合)、trueを返します。
この情報が利用できない場合は、falseが返されます。
QString QCanBusDeviceInfo::name() const
このCANバスインターフェースのインターフェース名(例:「can0」)を返します。
これは、QCanBus::createDevice() のinterfaceName パラメータに対応します。
[since 6.2] QString QCanBusDeviceInfo::plugin() const
このCANバスインターフェースのプラグイン名(例:「peakcan」)を返します。
これは、QCanBus::createDevice() のplugin パラメータに対応します。
この関数は Qt 6.2 で導入されました。
QString QCanBusDeviceInfo::serialNumber() const
利用可能な場合、CANバスインターフェースのシリアル番号を文字列として返します。利用できない場合は、空の文字列が返されます。
alias()も参照してください 。
[noexcept] void QCanBusDeviceInfo::swap(QCanBusDeviceInfo &other)
このCANバスデバイスの情報をother と入れ替えます。この操作は非常に高速で、失敗することはありません。
[noexcept] QCanBusDeviceInfo &QCanBusDeviceInfo::operator=(QCanBusDeviceInfo &&other)
other をこのQCanBusDeviceInfo インスタンスに割り当てます。
QCanBusDeviceInfo &QCanBusDeviceInfo::operator=(const QCanBusDeviceInfo &other)
このCANバスデバイス情報にother を割り当て、このCANバスデバイス情報への参照を返します。
© 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.