QCanUniqueIdDescription Class
QCanUniqueIdDescriptionクラスは、QCanBusFrame 、一意な識別子にアクセスするためのルールを記述しています。
ヘッダー | #include <QCanUniqueIdDescription> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS SerialBus) target_link_libraries(mytarget PRIVATE Qt6::SerialBus) |
qmake: | QT += serialbus |
以来: | Qt 6.5 |
ステータス | 予備 |
このクラスは開発中であり、変更される可能性があります。
パブリック関数
QCanUniqueIdDescription() | |
QCanUniqueIdDescription(const QCanUniqueIdDescription &other) | |
QCanUniqueIdDescription(QCanUniqueIdDescription &&other) | |
~QCanUniqueIdDescription() | |
quint8 | bitLength() const |
QSysInfo::Endian | endian() const |
bool | isValid() const |
void | setBitLength(quint8 length) |
void | setEndian(QSysInfo::Endian endian) |
void | setSource(QtCanBus::DataSource source) |
void | setStartBit(quint16 bit) |
QtCanBus::DataSource | source() const |
quint16 | startBit() const |
QCanUniqueIdDescription & | operator=(QCanUniqueIdDescription &&other) |
QCanUniqueIdDescription & | operator=(const QCanUniqueIdDescription &other) |
詳細説明
一意な識別子は、異なる CAN バスフレームを区別し、QCanMessageDescriptionを適用してエンコードまたはデコードするために使用されます。異なる CAN プロトコルは、CAN フレームの異なる部分を一意識別子として使用できます(例えば、DBC プロトコルは FrameId 全体を一意識別子として使用します)。
このクラスには、CANフレーム内の一意識別子の位置を柔軟に指定するためのパラメータが含まれています:
- 一意識別子を抽出するために使用されるフレームの部分(FrameIdまたはペイロード)。
- 一意識別子を抽出するために使用されるフレームの部分(FrameIdまたはペイロード)。ビットは LSB からカウントされる。
- 一意識別子を表現するために使用されるビット数。
- 値の抽出に使用されるエンディアン。
開始ビットの値がデータのエンディアンにどのように依存するかについては、QCanSignalDescription ドキュメントのData Endianness Processing セクションを確認してください。そこで説明されているアプローチは、一意識別子の記述にも使用される。
一意識別子の実際の値は、QtCanBus::UniqueId 型で表される。
QCanMessageDescriptionも参照の こと。
メンバ関数ドキュメント
QCanUniqueIdDescription::QCanUniqueIdDescription()
空の一意識別子記述を作成します。
QCanUniqueIdDescription::QCanUniqueIdDescription(const QCanUniqueIdDescription &other)
other からコピーした値で一意の識別子記述を作成する。
[noexcept]
QCanUniqueIdDescription::QCanUniqueIdDescription(QCanUniqueIdDescription &&other)
other から移動して一意な識別子の説明を作成します。
注意: 移動元の QCanUniqueIdDescription オブジェクトは破棄または代入のみ可能です。デストラクタや代入演算子以外の関数を呼び出した場合の効果は未定義です。
[noexcept]
QCanUniqueIdDescription::~QCanUniqueIdDescription()
この一意識別子記述を破棄する。
quint8 QCanUniqueIdDescription::bitLength() const
一意な識別子のビット長を返す。
setBitLength()、startBit() およびsetStartBit()も参照 。
QSysInfo::Endian QCanUniqueIdDescription::endian() const
一意な識別子のデータエンディアンを返します。
デフォルトではLittleEndian が使用される。
setEndian() およびQSysInfo::Endianも参照のこと 。
bool QCanUniqueIdDescription::isValid() const
この一意識別子記述が有効な場合はtrue
を、そうでない場合はfalse
を返す。
有効な一意識別子の記述は、bitLength() が 0 より大きく、QtCanBus::UniqueId 型のビット数を超えてはならない。
bitLength()も参照 。
void QCanUniqueIdDescription::setBitLength(quint8 length)
一意識別子のビット長をlength に設定する。
bitLength()、startBit()、setStartBit()も参照のこと 。
void QCanUniqueIdDescription::setEndian(QSysInfo::Endian endian)
一意識別子のデータエンディアンをendian に設定する。
endian() およびQSysInfo::Endianも参照のこと 。
void QCanUniqueIdDescription::setSource(QtCanBus::DataSource source)
一意な識別子のデータソースをsource に設定する。
source() およびQtCanBus::DataSourceも参照 。
void QCanUniqueIdDescription::setStartBit(quint16 bit)
source() の一意識別子の開始ビットをbit に設定する。
startBit()、bitLength()、setBitLength()も参照のこと 。
QtCanBus::DataSource QCanUniqueIdDescription::source() const
一意な識別子のデータ・ソースを返します。
デフォルトではFrameId が使用される。
setSource() およびQtCanBus::DataSourceも参照のこと 。
quint16 QCanUniqueIdDescription::startBit() const
source() の一意識別子の開始ビットを返す。
setStartBit()、bitLength()、setBitLength()も参照 。
[noexcept]
QCanUniqueIdDescription &QCanUniqueIdDescription::operator=(QCanUniqueIdDescription &&other)
Move-other の値をこの一意識別子記述に割り当てる。
注意: 移動されたQCanUniqueIdDescription オブジェクトは、破棄するか代入することしかできない。デストラクタや代入演算子以外の関数を呼び出した場合の効果は未定義です。
QCanUniqueIdDescription &QCanUniqueIdDescription::operator=(const QCanUniqueIdDescription &other)
この一意識別子記述にother の値を割り当てる。
© 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.