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

QtCanBus Namespace

The QtCanBus namespace provides some commons enums that are used in the CAN bus handling part of the QtSerialPort module.

This namespace was introduced in Qt 6.5.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QtCanBus Namespace

  • Header: QtCanBus

  • Since: Qt 6.5

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS SerialBus)

    target_link_libraries(mytarget PRIVATE Qt6::SerialBus)

  • qmake: QT += serialbus

Detailed Description

 

Type Documentation

 

enum QtCanBus::DataFormat

This enum represents the possible data formats. The format defines how the value will be extracted from its source.

Constant

Value

Description

QtCanBus::DataFormat::SignedInteger

0

The signal value is a signed integer.

QtCanBus::DataFormat::UnsignedInteger

1

The signal value is an unsigned integer.

QtCanBus::DataFormat::Float

2

The signal value is float.

QtCanBus::DataFormat::Double

3

The signal value is double.

QtCanBus::DataFormat::AsciiString

4

The signal value is an ASCII string.

enum QtCanBus::DataSource

This enum represents the placement of the data within the CAN frame.

Constant

Value

Description

QtCanBus::DataSource::Payload

0

The data will be extracted from the payload.

QtCanBus::DataSource::FrameId

1

The data will be extracted from the frame ID.

enum QtCanBus::MultiplexState

This enum represents the possible multiplex states of a signal.

Constant

Value

Description

QtCanBus::MultiplexState::None

0x00

The signal is not used in multiplexing.

QtCanBus::MultiplexState::MultiplexorSwitch

0x01

The signal is used as a multiplexor switch, which means that other signals depend on the values of this signal.

QtCanBus::MultiplexState::MultiplexedSignal

0x02

The signal is multiplexed by some switch, and therefore its value can only be extracted when the switch has a specific value.

QtCanBus::MultiplexState::SwitchAndSignal

MultiplexorSwitch | MultiplexedSignal

The multiplexor switch of the signal must have the value that enables us to use this signal. When used, the signal also acts as a multiplexor switch for other multiplexed signals.

enum QtCanBus::UniqueId

Represents a CAN unique identifier. The underlying type is quint32.

An enum is used to avoid implicit conversions to or from unsigned int.

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