이 페이지에서

QCanBusDeviceInfo Class

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

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

공개 함수

QCanBusDeviceInfo()
QCanBusDeviceInfo(const QCanBusDeviceInfo &other)
(since 6.10) QCanBusDeviceInfo(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)

상세 설명

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

멤버 함수 문서

[delete] QCanBusDeviceInfo::QCanBusDeviceInfo()

QCanBusDeviceInfo 의 인스턴스를 기본 생성합니다. 이 함수는 삭제되었습니다.

QCanBusDeviceInfo::QCanBusDeviceInfo(const QCanBusDeviceInfo &other)

other 의 복사본을 생성합니다.

[constexpr noexcept default, since 6.10] QCanBusDeviceInfo::QCanBusDeviceInfo(QCanBusDeviceInfo &&other)

other 에서 CAN 버스 장치 정보를 생성합니다.

이 함수는 Qt 6.10에서 도입되었습니다.

[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이 있을 수 있습니다. 인터페이스에 채널이 하나뿐이거나 채널에 대한 정보를 확인할 수 없는 경우에는 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)

other 와 이 CAN 버스 장치 정보를 교환합니다. 이 작업은 매우 빠르며 실패하는 일이 없습니다.

[noexcept] QCanBusDeviceInfo &QCanBusDeviceInfo::operator=(QCanBusDeviceInfo &&other)

other 를 이 QCanBusDeviceInfo 인스턴스에 할당합니다.

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

other 를 이 CAN 버스 장치 정보에 할당하고, 이 CAN 버스 장치 정보에 대한 참조를 반환합니다.

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