QCanBusDeviceInfo Class

QCanBusDeviceInfoは、CANバスインターフェイスに関する情報を提供します。詳細...

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

パブリック関数

QCanBusDeviceInfo(const 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)

詳しい説明

各プラグインは、異なる機能を持つ1つ以上のインターフェイスをサポートする可能性があります。このクラスは利用可能な関数に関する情報を提供します。

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

QCanBusDeviceInfo::QCanBusDeviceInfo(const QCanBusDeviceInfo &other)

other のコピーを作成する。

[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バス・インターフェースのインターフェース名を返す。

これはQCanBus::createDevice() のinterfaceName パラメーターに対応する。

[since 6.2] QString QCanBusDeviceInfo::plugin() const

このCANバスインターフェースのプラグイン名を返す。

これは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)

Move-other をこのQCanBusDeviceInfo インスタンスに割り当てる。

QCanBusDeviceInfo &QCanBusDeviceInfo::operator=(const QCanBusDeviceInfo &other)

このCANバスデバイス情報にother を割り当て、このCANバスデバイス情報への参照を返す。

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