IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QCanBusDeviceInfo Class

The QCanBusDeviceInfo provides information about CAN bus interfaces.

This class was introduced in Qt 5.9.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QCanBusDeviceInfo Class

  • Header: QCanBusDeviceInfo

  • Since: Qt 5.9

  • qmake: QT += serialbus

Detailed Description

Each plugin may support one or more interfaces with different capabilities. This class provides information about available functions.

Member Function Documentation

 

QCanBusDeviceInfo::QCanBusDeviceInfo(const QCanBusDeviceInfo &other)

Constructs a copy of other.

QCanBusDeviceInfo::~QCanBusDeviceInfo()

Destroys the CAN bus device info.

[since 5.11] int QCanBusDeviceInfo::channel() const

Returns the sequential channel number of the CAN bus interface, starting with zero. For example, a two channel CAN interface may have the channels 0 and 1. If the interface has only one channel or if no information about the channel is available, zero is returned.

This function was introduced in Qt 5.11.

[since 5.11] QString QCanBusDeviceInfo::description() const

Returns a textual description of the CAN bus interface, if available. Example output: "PCAN USB Pro FD". If no description is available, an empty string is returned.

This function was introduced in Qt 5.11.

bool QCanBusDeviceInfo::hasFlexibleDataRate() const

Returns true, if the CAN bus interface is CAN FD (flexible data rate) capable.

If this information is not available, false is returned.

bool QCanBusDeviceInfo::isVirtual() const

Returns true, if the CAN bus interface is virtual (i.e. not connected to real CAN hardware).

If this information is not available, false is returned.

QString QCanBusDeviceInfo::name() const

Returns the interface name of this CAN bus interface, e.g. can0.

[since 5.11] QString QCanBusDeviceInfo::serialNumber() const

Returns the serial number of the CAN bus interface as string, if available. Otherwise, an empty string is returned.

This function was introduced in Qt 5.11.

void QCanBusDeviceInfo::swap(QCanBusDeviceInfo &other)

Swaps this CAN bus device info with other. This operation is very fast and never fails.

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

Assigns other to this CAN bus device info and returns a reference to this CAN bus device info.

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

Move-assigns other to this QCanBusDeviceInfo instance.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+