Bus related objects of trace analysis

The following bus objects are supported for ASC recordings.

CAN

class CanMessageEvent

Class for multiple types of bus events:

  • CAN Message Event

  • CAN Extended Message Event

  • CAN Error Frame

  • CAN Remote Frame Event

  • CAN FD Message Event

  • CAN FD Extended Message Event

  • CAN FD Error Frame

id

Alias for CanMessageEvent.canID. The slot ID of the frame.

Type:

int

payload

The frame’s payload.

Type:

ByteStream

payloadArray

The frame’s payload as numpy array (especially useful in trace step templates).

Type:

numpy.ndarray

length

The frame’s length in bytes.

Type:

int

timestamp

The frame’s timestamp in ms.

Type:

float

flags

Any of the frame’s flags defined in the corresponding flags class can be accessed directly on the frame object, i.e. theFrame.aFlag instead of theFrame.flags.aFlag.

Some of the flags can take the value False if the driver does not support the respective attribute.

Type:

CanFlags

canID

The CAN ID of the frame.

Type:

int

channelID

The ID of the bus channel on which this frame was received.

Type:

int

ecc

The ECC of the frame.

Type:

int

dlc

The DLC of the frame.

Type:

int

class CanBusStatisticsEvent
dataFrames

The number of data frames.

Type:

int

remoteFrames

The number of remote frames.

Type:

int

extendedDataFrames

The number of extended data frames.

Type:

int

extendedRemoteFrames

The number of extended remote frames.

Type:

int

errorFrames

The number of error frames.

Type:

int

overloadFrames

The number of overload frames.

Type:

int

busload

The busload.

Type:

float

timestamp

The frame’s raw timestamp. The determined offset of trace synchronization is not considered.

Type:

float

channelID

The ID of the bus channel on which this frame was received.

Type:

int

class CanErrorEvent
error

The error.

Type:

str

timestamp

The frame’s raw timestamp. The determined offset of trace synchronization is not considered.

Type:

float

channelID

The ID of the bus channel on which this frame was received.

Type:

int

class CanOverloadFrameEvent
timestamp

The frame’s raw timestamp. The determined offset of trace synchronization is not considered.

Type:

float

channelID

The ID of the bus channel on which this frame was received.

Type:

int

FlexRay

class FlexRayMessageEvent
timestamp

The frame’s raw timestamp. The determined offset of trace synchronization is not considered.

Type:

float

id

Alias for slotID(). The FlexRay Slot-ID of the frame.

Type:

int

payload

The frame’s payload.

Type:

ByteStream

payloadArray

The frame’s payload as numpy array (especially useful in trace step templates).

Type:

numpy.ndarray

frameCRC

The CRC of the frame. Will be 0 if the CRC is not available.

Type:

int

slotID

The slot ID of the frame.

Type:

int

cycleNumber

The cycle number of the frame.

Type:

int

headerCRC

The header CRC of the frame.

Type:

int

channelID

The ID of the FlexRay channel on which this frame was received.

Type:

int

channelMask

The FlexRay channel mask, e.g. “A”, “B”, or “AB”.

Type:

str

flags

Any of the frame’s flags defined in the corresponding flags class can be accessed directly on the frame object, i.e. theFrame.aFlag instead of theFrame.flags.aFlag.

Some of the flags can take the value False if the driver does not support the respective attribute.

Type:

FlexRayFlags

ccType

Type of the communication controller.

Type:

int

ccData

Communication controller specific data.

Type:

int

class FlexRayStartCycleEvent
isSelfReceived

Was this frame sent by the controller that received it?

Type:

bool

cycleNumber

The cycle number of the frame.

Type:

int

nmVect

The network management vector.

Type:

list

nmVectArray

The frame’s network management vector as numpy array (especially useful in trace step templates).

Type:

numpy.ndarray

timestamp

The frame’s raw timestamp. The determined offset of trace synchronization is not considered.

Type:

float

channelID

The ID of the bus channel on which this frame was received.

Type:

int

channelMask

The FlexRay channel mask, e.g. “A”, “B”, or “AB”.

Type:

str

ccType

Type of the communication controller.

Type:

int

ccData

Communication controller specific data.

Type:

list

ccDataArray

The frame’s communication controller specific data as numpy array (especially useful in trace step templates).

Type:

numpy.ndarray

class FlexRayStatusEvent
cycleNumber

The cycle number of the frame.

Type:

int

syncState

The sync state.

Type:

int

symbol

The symbol of the event.

Type:

int

wakeUpState

The wake up state.

Type:

int

timestamp

The frame’s raw timestamp. The determined offset of trace synchronization is not considered.

Type:

float

channelID

The ID of the bus channel on which this frame was received.

Type:

int

channelMask

The FlexRay channel mask, e.g. “A”, “B”, or “AB”.

Type:

str

ccType

Type of the communication controller.

Type:

int

ccData

Communication controller specific data.

Type:

list

ccDataArray

The frame’s communication controller specific data as numpy array (especially useful in trace step templates).

Type:

numpy.ndarray

class FlexRayErrorEvent
timestamp

The frame’s raw timestamp. The determined offset of trace synchronization is not considered.

Type:

float

channelID

The ID of the bus channel on which this frame was received.

Type:

int

channelMask

The FlexRay channel mask, e.g. “A”, “B”, or “AB”.

Type:

str

ccType

Type of the communication controller.

Type:

int

ccData

Communication controller specific data.

Type:

list

ccDataArray

The frame’s communication controller specific data as numpy array (especially useful in trace step templates).

Type:

numpy.ndarray

LIN

class LinMessageEvent
timestamp

The frame’s raw timestamp. The determined offset of trace synchronization is not considered.

Type:

float

id

Alias for linID(). The slot ID of the frame.

Type:

int

payload

The frame’s payload.

Type:

ByteStream

payloadArray

The frame’s payload as numpy array (especially useful in trace step templates).

Type:

numpy.ndarray

messageInfo

Additional message information, for instance related to timings.

Type:

LinMessageInfo

length

The frame’s length in bytes.

Type:

int

flags

Any of the frame’s flags defined in the corresponding flags class can be accessed directly on the frame object, i.e. theFrame.aFlag instead of theFrame.flags.aFlag.

Some of the flags can take the value False if the driver does not support the respective attribute.

Type:

LinFlags

linID

The LIN ID of the frame.

Type:

int

channelID

The ID of the bus channel on which this frame was received.

Type:

int

crc

The CRC of the frame.

Type:

int

class LinMessageInfo
slaveId

FSM Identifier (Available with FSMs only).

Type:

int or numpy.ma.masked if not present

state

Current state of the FSM (Available with FSMs only).

Type:

int or numpy.ma.masked if not present

checksum

Checksum byte value

Type:

int or numpy.ma.masked if not present.

headerTime

Duration of the frame header (in bit times).

Obsolete: Used up to CANoe/CANalyzer version 6.0.

Type:

int or numpy.ma.masked if not present

fullTime

Duration of the entire frame (in bit times).

Obsolete: Used up to CANoe/CANalyzer version 6.0.

Type:

int or numpy.ma.masked if not present

startOfFrame

Absolute timestamp indicating start of event (in seconds).

Type:

float or numpy.ma.masked if not present

baudrate

Event’s baudrate (in bits/sec).

Type:

int or numpy.ma.masked if not present

syncBreak

Break length (in ns).

Type:

int or numpy.ma.masked if not present

syncDel

Break delimiter length (in ns).

Type:

int or numpy.ma.masked if not present

nodeAddress

Node address (available for dynamic frames only).

Type:

int or numpy.ma.masked if not present

messageId

16 bit message identifier (available for dynamic frames only).

Type:

int or numpy.ma.masked if not present

supplierId

Supplier identifier (available for dynamic frames only).

Type:

int or numpy.ma.masked if not present

endOfHeader

Absolute timestamp indicating end of LIN frame (in seconds).

Type:

float or numpy.ma.masked if not present

endOfBytes

Absolute timestamps indicating end of data byte (in seconds).

Type:

numpy.ndarray(float) or numpy.ma.masked if not present

simulated

Flag indicating whether event has been simulated by CANoe/CANalyzer.

Type:

int or numpy.ma.masked if not present

endOfFrame

Absolute timestamp indicating end of LIN frame (in seconds).

Type:

float or numpy.ma.masked if not present

responseBaudrate

Event’s baudrate measured in response (in bits/sec).

Type:

int or numpy.ma.masked if not present

headerBaudrate

Event’s baudrate measured in header (in bits/sec as float value).

Type:

float or numpy.ma.masked if not present

stopBitOffsetInHeader

Early stop bit offset in frame header for UART timestamps (in ns).

Type:

int or numpy.ma.masked if not present

stopBitOffsetInResponse

Early stop bit offset in frame response for UART timestamps (in ns).

Type:

int or numpy.ma.masked if not present

checksumModel

Expected checksum model for checksum value. Possible values: ‘unknown’, ‘classic’, ‘enhanced’, ‘error’.

Type:

str or numpy.ma.masked if not present

class LinSleepModeEvent
reason

The reason of a sleep mode event as integer.

  • 0: Start state

Transition to sleep mode

  • 1: Go-to-Sleep frame

  • 2: Bus Idle Timeout

  • 3: Silent SleepMode command (for shortening the BusIdle Timeout)

Leaving sleep mode

  • 9: External Wakeup signal

  • 10: Internal Wakeup signal

  • 11: Bus traffic (can only occur if the LIN hardware does not have a Master function)

LIN hardware does not go into sleep mode inspite of request to do so

  • 18: Bus traffic (can only occur if the LIN hardware does not have a Master function)

Type:

int

timestamp

The frame’s raw timestamp. The determined offset of trace synchronization is not considered.

Type:

float

channelID

The ID of the bus channel on which this frame was received.

Type:

int

description

The description of a sleep mode event.

Type:

str

flags

Any of the frame’s flags defined in the corresponding flags class can be accessed directly on the frame object, i.e. theFrame.aFlag instead of theFrame.flags.aFlag.

Some of the flags can take the value False if the driver does not support the respective attribute.

Type:

LinSleepModeFlags

class LinSleepModeFlags
isAwakeBefore

The awake state before this event. True if awake, False if asleep.

Type:

bool

isAwake

The current awake state. True if awake, False if asleep.

Type:

bool

isExternalEvent

Flag whether the this event is caused by an external (True) or internal (False) event.

Type:

bool

class LinWakeupFrame
isSelfReceived

Was this frame sent by the controller that received it?

Type:

bool

wakeupByte

The wakeup byte. This value will be 0 for LIN 2.0.

Type:

int

messageInfo

Additional message information, for instance related to timings.

Type:

LinWakeupFrameInfo

timestamp

The frame’s raw timestamp. The determined offset of trace synchronization is not considered.

Type:

float

channelID

The ID of the bus channel on which this frame was received.

Type:

int

class LinUnexpectedWakeup
timestamp

The frame’s raw timestamp. The determined offset of trace synchronization is not considered.

Type:

float

channelID

The ID of the bus channel on which this frame was received.

Type:

int

wakeupByte

The wakeup byte. This value will be 0 for LIN 2.0.

Type:

int

messageInfo

Additional message information, for instance related to timings.

Type:

LinWakeupFrameInfo

class LinWakeupFrameInfo
startOfFrame

Absolute timestamp indicating start of event (in seconds).

Type:

float or np.ma.masked if not present

baudrate

Event’s baudrate (in bits/sec).

Type:

int or np.ma.masked if not present

lengthcode

This value is only valid for instances of LinWakeupFrame.

Wake-up length validity indicator:

  • 0: Wake-up length is OK

  • 1: Wake-up is too short

  • 2: Wake-up is too long

Type:

int or np.ma.masked if not present

width

The width of a wakeup signal in us. This value is only valid for instances of LinUnexpectedWakeup with LIN 2.0.

Type:

int or np.ma.masked if not present

Ethernet

The following classes are created through calls of .parent, .FindParent(protocolName) or direct attribute access on a pseudo signal during trace analysis. protocolName is a string enum value from OsiProtocol.

Examples:

  • PacketSomeIp.udp.srcPort

  • PacketUdp.FindParent(“eth”)

  • PacketIp.parent

Info

Access to EthernetProtocolBase.parent can return None, while the other variants to protocols will return a NoProtocol instance if the given protocol is not present.

class OsiProtocol

String Enumeration class representing the supported protocol layers.

ETH = 'eth'
IP4 = 'ip4'
IP6 = 'ip6'
TCP = 'tcp'
UDP = 'udp'
PTP = 'ptp'
SOMEIP = 'someip'

EthernetProtocolBase

class EthernetProtocolBase

Base class for all protocol classes.

<protocol>

Equivalent to method FindParent(protocol). Direct access to parent protocols. protocol is one of OsiProtocol.

Example: Signal.eth.src provides the source MAC address of the Ethernet protocol layer.

Type:

EthernetProtocolBase

timestamp : float

current timestamp

parent

Returns the parent protocol object if there is one present, otherwise None.

Return type:

EthernetProtocolBase | None

AssertExists()

Raises an AssertionError if the accessed protocol does not exist at some time stamp. Example: Signal.tcp.AssertExists()

Returns:

The protocol itself, to support attribut chaining.

Raises:

AssertionError

Return type:

Self

FindParent(protocol)

Returns a specific given protocol object if present, otherwise a NoProtocol object.

Parameters:
protocol : OsiProtocol

The required protocol name.

Returns:

The required parent protocol object.

Return type:

EthernetProtocolBase

NoProtocol

class NoProtocol

Represents a non-present protocol. Accessing any other parent of a non-present protocol will also yield a NoProtocol object. Accessing any protocol specific attributes will lead to an AttributeError since the specific protocol is not available. The boolean value of a NoProtocol object is always False, such that it can be used to check for the precense/absence of a protocol layer.

Examples:

  • SigPacketSomeIp.tcp yields True for packets that were transmitted via TCP and False otherwise. This can be used in trigger blocks that trigger only when the TCP protcol layer is present.

  • SigPacketSomeIp.tcp.srcPort will raise an AttributeError for packets that were not transmitted via TCP.

  • SigPacketSomeIp.tcp.AssertExists() can be used to provoke an AssertionError for packets that were not transmitted via TCP.

<protocol>

Equivalent to method FindParent(protocol). Direct access to parent protocols. protocol is one of OsiProtocol.

Example: Signal.eth.src provides the source MAC address of the Ethernet protocol layer.

Type:

EthernetProtocolBase

AssertExists()

Raises an AssertionError if the accessed protocol does not exist at some time stamp. Example: Signal.tcp.AssertExists()

Returns:

The protocol itself, to support attribut chaining.

Raises:

AssertionError

Return type:

Self

FindParent(protocol)

Returns another NoProtocol instance.

Return type:

NoProtocol

parent

Returns another NoProtocol instance.

Return type:

NoProtocol

timestamp : float

current timestamp

EthernetProtocol

class EthernetProtocol
<protocol>

Equivalent to method FindParent(protocol). Direct access to parent protocols. protocol is one of OsiProtocol.

Example: Signal.eth.src provides the source MAC address of the Ethernet protocol layer.

Type:

EthernetProtocolBase

dst : str

target MAC address e.g. DE:AD:BE:EF:FF:00

src : str

source MAC address e.g. DE:AD:BE:EF:FF:00

AssertExists()

Raises an AssertionError if the accessed protocol does not exist at some time stamp. Example: Signal.tcp.AssertExists()

Returns:

The protocol itself, to support attribut chaining.

Raises:

AssertionError

Return type:

Self

FindParent(protocol)

Returns a specific given protocol object if present, otherwise a NoProtocol object.

Parameters:
protocol : OsiProtocol

The required protocol name.

Returns:

The required parent protocol object.

Return type:

EthernetProtocolBase

parent

Returns the parent protocol object if there is one present, otherwise None.

Return type:

EthernetProtocolBase | None

type : int

ethernet protocol type

timestamp : float

current timestamp

vlanTags : None | list[VlanTag] = None

list of VLAN tags, use vlanTags[-1] to get the inner vlan tag

Ipv4Protocol

class Ipv4Protocol
<protocol>

Equivalent to method FindParent(protocol). Direct access to parent protocols. protocol is one of OsiProtocol.

Example: Signal.eth.src provides the source MAC address of the Ethernet protocol layer.

Type:

EthernetProtocolBase

version : int

protocol version

headerLength : int

header length

tos : int

type of service

packetLength : int

packet length

id : int

identifier

ttl : int

TTL

protocol : int

protocol type / next header field

checksum : int

checksum

src : str

source IP address e.g. 127.0.0.1

dst : str

destination IP address e.g. 127.0.0.1

ahSpi : int | None = None

Security parameters index of IP authentication header (see RFC 4302)

ahSeq : int | None = None

Sequence number field of IP authentication header (see RFC 4302)

ahIcv : bytes | None = None

Integrity check value of IP authentication header (see RFC 4302)

ahNxt : int | None = None

Next header value of IP authentication header (see RFC 4302)

ahLen : int | None = None

Length value of IP authentication header (see RFC 4302) => len(ICV)/4+1’

ahRsvd : int | None = None

Reserved value of IP authentication header (see RFC 4302

AssertExists()

Raises an AssertionError if the accessed protocol does not exist at some time stamp. Example: Signal.tcp.AssertExists()

Returns:

The protocol itself, to support attribut chaining.

Raises:

AssertionError

Return type:

Self

FindParent(protocol)

Returns a specific given protocol object if present, otherwise a NoProtocol object.

Parameters:
protocol : OsiProtocol

The required protocol name.

Returns:

The required parent protocol object.

Return type:

EthernetProtocolBase

parent

Returns the parent protocol object if there is one present, otherwise None.

Return type:

EthernetProtocolBase | None

timestamp : float

current timestamp

Ipv6Protocol

class Ipv6Protocol
<protocol>

Equivalent to method FindParent(protocol). Direct access to parent protocols. protocol is one of OsiProtocol.

Example: Signal.eth.src provides the source MAC address of the Ethernet protocol layer.

Type:

EthernetProtocolBase

src : str

source IP address e.g. 2001:db8::1428:57ab

dst : str

destination IP address e.g. 2001:db8::1428:57ab

protocol : int

protocol type / next header field

hopLimit : int

hop limit field

payloadLength : int

payload length from IPv6 header

trafficClass : int

traffic class from IPv6 header

flowLabel : int

flow label from IPv6 header

AssertExists()

Raises an AssertionError if the accessed protocol does not exist at some time stamp. Example: Signal.tcp.AssertExists()

Returns:

The protocol itself, to support attribut chaining.

Raises:

AssertionError

Return type:

Self

FindParent(protocol)

Returns a specific given protocol object if present, otherwise a NoProtocol object.

Parameters:
protocol : OsiProtocol

The required protocol name.

Returns:

The required parent protocol object.

Return type:

EthernetProtocolBase

parent

Returns the parent protocol object if there is one present, otherwise None.

Return type:

EthernetProtocolBase | None

timestamp : float

current timestamp

UdpProtocol

class UdpProtocol
<protocol>

Equivalent to method FindParent(protocol). Direct access to parent protocols. protocol is one of OsiProtocol.

Example: Signal.eth.src provides the source MAC address of the Ethernet protocol layer.

Type:

EthernetProtocolBase

srcPort : int

source port

dstPort : int

destination port

AssertExists()

Raises an AssertionError if the accessed protocol does not exist at some time stamp. Example: Signal.tcp.AssertExists()

Returns:

The protocol itself, to support attribut chaining.

Raises:

AssertionError

Return type:

Self

FindParent(protocol)

Returns a specific given protocol object if present, otherwise a NoProtocol object.

Parameters:
protocol : OsiProtocol

The required protocol name.

Returns:

The required parent protocol object.

Return type:

EthernetProtocolBase

parent

Returns the parent protocol object if there is one present, otherwise None.

Return type:

EthernetProtocolBase | None

packetLength : int

length of the UDP segment including the header length (8 Byte)

timestamp : float

current timestamp

checksum : int

checksum

TcpProtocol

class TcpProtocol
<protocol>

Equivalent to method FindParent(protocol). Direct access to parent protocols. protocol is one of OsiProtocol.

Example: Signal.eth.src provides the source MAC address of the Ethernet protocol layer.

Type:

EthernetProtocolBase

srcPort : int

source port

dstPort : int

destination port

seq : int

sequence number

packetLength : int

length of the whole TCP segment including header length

ack : int

Ack number

headerLength : int

TCP header length (data offset)

flags : int

flags

AssertExists()

Raises an AssertionError if the accessed protocol does not exist at some time stamp. Example: Signal.tcp.AssertExists()

Returns:

The protocol itself, to support attribut chaining.

Raises:

AssertionError

Return type:

Self

FindParent(protocol)

Returns a specific given protocol object if present, otherwise a NoProtocol object.

Parameters:
protocol : OsiProtocol

The required protocol name.

Returns:

The required parent protocol object.

Return type:

EthernetProtocolBase

parent

Returns the parent protocol object if there is one present, otherwise None.

Return type:

EthernetProtocolBase | None

window : int

window

timestamp : float

current timestamp

checksum : int

checksum

urgentPointer : int

urgent pointer

PtpProtocol

class PtpProtocol
<protocol>

Equivalent to method FindParent(protocol). Direct access to parent protocols. protocol is one of OsiProtocol.

Example: Signal.eth.src provides the source MAC address of the Ethernet protocol layer.

Type:

EthernetProtocolBase

messageType : int

PTP message type

version : int

PTP version

messageLength : int

PTP message length

domainNumber : int

PTP domain number

flags : int

PTP flags

correctionField : int

PTP correctionField

sourcePortIdentity : bytes

PTP source port identity

sequenceId : int

PTP sequence ID

controlField : int

PTP control field

logMessagePeriod : int

PTP log message interval

AssertExists()

Raises an AssertionError if the accessed protocol does not exist at some time stamp. Example: Signal.tcp.AssertExists()

Returns:

The protocol itself, to support attribut chaining.

Raises:

AssertionError

Return type:

Self

FindParent(protocol)

Returns a specific given protocol object if present, otherwise a NoProtocol object.

Parameters:
protocol : OsiProtocol

The required protocol name.

Returns:

The required parent protocol object.

Return type:

EthernetProtocolBase

parent

Returns the parent protocol object if there is one present, otherwise None.

Return type:

EthernetProtocolBase | None

timestamp : float

current timestamp

SomeIpProtocol

class SomeIpProtocol
<protocol>

Equivalent to method FindParent(protocol). Direct access to parent protocols. protocol is one of OsiProtocol.

Example: Signal.eth.src provides the source MAC address of the Ethernet protocol layer.

Type:

EthernetProtocolBase

messageId : int

message ID

serviceId : int

service ID (highest 16 bit from message id)

AssertExists()

Raises an AssertionError if the accessed protocol does not exist at some time stamp. Example: Signal.tcp.AssertExists()

Returns:

The protocol itself, to support attribut chaining.

Raises:

AssertionError

Return type:

Self

FindParent(protocol)

Returns a specific given protocol object if present, otherwise a NoProtocol object.

Parameters:
protocol : OsiProtocol

The required protocol name.

Returns:

The required parent protocol object.

Return type:

EthernetProtocolBase

parent

Returns the parent protocol object if there is one present, otherwise None.

Return type:

EthernetProtocolBase | None

methodId : int

method ID (lowest 16 bit from message id)

timestamp : float

current timestamp

length : int

length from this header position

requestId : int

request ID

clientId : int

client id (highest 16 bit from request id)

sessionId : int

session id (lowest 16 bit from request id)

protocolVersion : int

SOME/IP Protocol version

interfaceVersion : int

SOME/IP interface version

messageType : int

message Type

returnCode : int

return code