PySide6.QtSerialBus.QtCanBus

class QtCanBus

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

Synopsis

Static functions

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description

class DataSource

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

Constant

Description

QtCanBus.DataSource.Payload

The data will be extracted from the payload.

QtCanBus.DataSource.FrameId

The data will be extracted from the frame ID.

class DataFormat

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

Constant

Description

QtCanBus.DataFormat.SignedInteger

The signal value is a signed integer.

QtCanBus.DataFormat.UnsignedInteger

The signal value is an unsigned integer.

QtCanBus.DataFormat.Float

The signal value is float.

QtCanBus.DataFormat.Double

The signal value is double.

QtCanBus.DataFormat.AsciiString

The signal value is an ASCII string.

class MultiplexState

This enum represents the possible multiplex states of a signal.

Constant

Description

QtCanBus.MultiplexState.None

The signal is not used in multiplexing.

QtCanBus.MultiplexState.MultiplexorSwitch

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

QtCanBus.MultiplexState.MultiplexedSignal

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

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.

class UniqueId

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

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

static qbswap(src)
Parameters:

srcUniqueId

Return type:

UniqueId