PySide6.QtSerialBus.QCanUniqueIdDescription¶
- class QCanUniqueIdDescription¶
- The - QCanUniqueIdDescriptionclass describes the rules for accessing a unique identifier in a- QCanBusFrame. More…- Synopsis¶- Methods¶- def - __init__()
- def - bitLength()
- def - endian()
- def - isValid()
- def - setBitLength()
- def - setEndian()
- def - setSource()
- def - setStartBit()
- def - source()
- def - startBit()
- def - swap()
 - 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¶- A unique identifier is used to distinguish different CAN bus frames and apply proper - QCanMessageDescriptions to encode or decode them. Different CAN protocols can use different parts of the CAN frame as a unique identifier (e.g. the DBC protocol uses the whole FrameId as a unique identifier).- This class contains parameters to specify the unique identifier position within a CAN frame in a flexible way: - The part of the frame which will be used to extract the unique identifier (FrameId or payload). 
- The start bit of the unique identifier, relative to the selected part of the frame. The bits are counted starting from the LSB. 
- The number of bits used to represent the unique identifier. 
- The endian used to extract the value. 
 - Check the - Data Endianness Processingsection of the- QCanSignalDescriptiondocumentation to see how the start bit value depends on the data endianness. The approach that is described there is also used for unique id description.- The actual value of a unique identifier is represented by the - UniqueIdtype.- See also - __init__()¶
 - Creates an empty unique identifier description. - __init__(other)
- Parameters:
- other – - QCanUniqueIdDescription
 
 - Creates a unique identifier description with the values copied from - other.- bitLength()¶
- Return type:
- int 
 
 - Returns the bit length of the unique identifier. - See also - Returns the data endian of the unique identifier. - By default, LittleEndian is used. - See also - setEndian()- Endian- isValid()¶
- Return type:
- bool 
 
 - Returns - truewhen this unique identifier description is valid and- falseotherwise.- A valid unique identifier description must have a - bitLength()which is greater than zero and does not exceed the number of bits of the- UniqueIdtype.- See also - setBitLength(length)¶
- Parameters:
- length – int 
 
 - Sets the bit length of the unique identifier to - length.- See also - Sets the data endian of the unique identifier to - endian.- See also - endian()- Endian- setSource(source)¶
- Parameters:
- source – - DataSource
 
 - Sets the data source of the unique identifier to - source.- See also - setStartBit(bit)¶
- Parameters:
- bit – int 
 
 - Sets the start bit of the unique identifier in the - source()to- bit.- See also - source()¶
- Return type:
 
 - Returns the data source of the unique identifier. - By default, - FrameIdis used.- See also - startBit()¶
- Return type:
- int 
 
 - Returns the start bit of the unique identifier in the - source().- See also - swap(other)¶
- Parameters:
- other – - QCanUniqueIdDescription