QCanBusDeviceInfo Class

QCanBusDeviceInfo는 CAN 버스 인터페이스에 대한 정보를 제공합니다. 더 보기...

Header: #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)

상세 설명

각 플러그인은 서로 다른 기능을 가진 하나 이상의 인터페이스를 지원할 수 있습니다. 이 클래스는 사용 가능한 함수에 대한 정보를 제공합니다.

멤버 함수 문서

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

0부터 시작하는 CAN 버스 인터페이스의 순차적 채널 번호를 반환합니다. 예를 들어, 2채널 CAN 인터페이스에는 채널 0과 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 버스 디바이스 정보에 대한 참조를 반환합니다.

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