이 페이지에서

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 버스 프레임을 구별하고, 이를 인코딩하거나 디코딩하는 데 적절한 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 에서 복사한 값을 사용하여 고유 식별자 설명을 생성합니다.

[constexpr noexcept default] QCanUniqueIdDescription::QCanUniqueIdDescription(QCanUniqueIdDescription &&other)

other 에서 이동하여 고유 식별자 설명을 생성합니다.

참고: 이동된 QCanUniqueIdDescription객체는 소멸되거나 할당될 수만 있습니다. 소멸자나 할당 연산자 중 하나를 제외한 다른 함수를 호출할 경우의 결과는 정의되지 않습니다.

[constexpr noexcept default] 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)

other 의 값을 이 고유 식별자 설명에 이동 할당합니다.

참고: 이동된원본 ` QCanUniqueIdDescription `객체는 소멸되거나 값이 할당될 수만 있습니다. 소멸자나 할당 연산자 중 하나를 제외한 다른 함수를 호출할 경우의 결과는 정의되지 않습니다.

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

other 의 값을 이 고유 식별자 설명에 할당합니다.

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