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 또는 페이로드).
  • 프레임의 선택된 부분을 기준으로 고유 식별자의 시작 비트입니다. 비트는 LSB부터 카운트됩니다.
  • 고유 식별자를 나타내는 데 사용되는 비트 수입니다.
  • 값을 추출하는 데 사용된 엔디안입니다.

시작 비트 값이 데이터 엔디안에 따라 어떻게 달라지는지 확인하려면 QCanSignalDescription 문서의 Data Endianness Processing 섹션을 참조하세요. 여기에 설명된 접근 방식은 고유 ID 설명에도 사용됩니다.

고유 식별자의 실제 값은 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 을 반환합니다.

유효한 고유 식별자 설명에는 0보다 크고 QtCanBus::UniqueId 유형의 비트 수를 초과하지 않는 bitLength()가 있어야 합니다.

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)

이동 - 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.