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
I. Detailed Description▲
II. Type Documentation▲
II-1. 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. |
II-2. enum QtCanBus::DataSource▲
This enum represents the placement of the data within the CAN frame.
II-3. 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. |
II-4. 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.