The QtCanBus namespace provides some commons enums that are used in the CAN bus handling part of the QtSerialPort module. More...
| Header: | #include <QtCanBus> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS SerialBus)target_link_libraries(mytarget PRIVATE Qt6::SerialBus) |
| qmake: | QT += serialbus |
| Since: | Qt 6.5 |
| enum class | DataFormat { SignedInteger, UnsignedInteger, Float, Double, AsciiString } |
| enum class | DataSource { Payload, FrameId } |
| enum class | MultiplexState { None, MultiplexorSwitch, MultiplexedSignal, SwitchAndSignal } |
| enum class | UniqueId { } |
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. |
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. |
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. |
Represents a CAN unique identifier. The underlying type is quint32.
An enum is used to avoid implicit conversions to or from unsigned int.
As part of the free Business evaluation, we offer a free welcome call for companies, to talk about your requirements, and how the Felgo SDK & Services can help you. Just sign up and schedule your call.
Sign up now to start your free Business evaluation: