[智能网联汽车] CAN Log 文件 - ASC文件格式 [转]

news/2024/11/16 10:46:15/文章来源:https://www.cnblogs.com/johnnyzen/p/18305983

因工作研究需要,担心精华内容丢失。故全文转载,转载自:图文详解CAN Log文件 - ASC文件格式 - CSDN


  • Vector提供了两种记录数据格式的格式规范:BLFASC

  • 在Vector提供的CAN_LOG_TRIGGER_ASC_Format.pdf文件中,规定了CANoe/CANalyzer ASC记录中CANLogTrigger event的格式。

1 CAN Log文件 -- ASC文件格式

1.1 Header

一个ASCII格式的日志文件以一个header开始。header包含关于日志文件的一般信息。

Format

date <WeekDay> <Month> <Date> <Fulltime> <Year>

base <hex |dec> timestamps <absolute |relative>

<”” |no> internal events logged

Example

date Wed Apr 16 09:21:13.159 am 2014

base hex timestamps absolute

internal events logged

base:表示记录的数值是hex十六进制或dec十进制的符号。

timestamps:表示时间戳absolute绝对写入测量的开始时间还是relative相对于前一个事件。

internal:events logged表示是否记录了内部事件。

1.2 版本编号

从CANalyzer/CANoe v7.0开始,版本号以注释的形式写在Header之后:

Format Since v7.0

// version <major>.<minor>.<patch>

Example

// version 8.2.1

<major>.<minor>表示CANalyzer/CANoe的版本号

<patch>表示CANalyzer/CANoe主版本中的修改版本(如服务包中的修改)。

1.3 经典CAN网络中的描述

该部分列出了CANoe/CANalyzer ASC记录中的所有CAN event。

1.3.1 经典CAN Standard标准帧的描述

Format since v8.0

<Time> <Channel> <ID> <Dir> d <DLC> <D0> <D1>...<D8> Length = <MessageDuration> BitCount = <MessageLength> ID = <IDnum> <MessageFlags>

Example

0.003040 1 123 Tx d 2 00 00 Length = 768000 BitCount = 67 ID = 291

ID:表示 CAN ID 的十六进制值;

Length:表示发送/接收该Frame/Message占据总线的时间,单位纳秒;

BitCount:表示发送/接收该Frame/Message由多少各Bit构成;

IDnum:表示CAN ID的十进制值。

举例:

date Mon Apr 10 02:24:54.471 pm 2023
base hex  timestamps absolute
internal events logged
// version 11.0.00.036886 CAN 1 Status:chip status error active0.036886 CAN 2 Status:chip status error active0.101317 1  211             Tx   d 8 00 00 00 00 00 00 00 00  Length = 242015 BitCount = 124 ID = 5290.201267 1  211             Tx   d 8 00 00 00 00 00 00 00 00  Length = 242015 BitCount = 124 ID = 5290.301361 1  211             Tx   d 8 00 00 00 00 00 00 00 00  Length = 242015 BitCount = 124 ID = 5290.401419 1  211             Tx   d 8 00 00 00 00 00 00 00 00  Length = 242015 BitCount = 124 ID = 529

1.3.2 经典CAN Extended扩展帧的描述

Format since v8.0

<Time> <Channel> <ID>x <Dir> d <DLC> <D0> <D1>...<D8> Length = <MessageDuration> BitCount = <MessageLength> ID = <IDnum>x <MessageFlags>

Example

4.876870 1 54C5638x Tx d 8 00 00 00 00 00 00 00 00 Length = 1704000 BitCount = 145 ID = 88888888x

经典CAN标准帧的差异: ID和IDnum后带字符x。

举例:

date Mon Apr 10 02:28:37.439 pm 2023
base hex  timestamps absolute
internal events logged
// version 11.0.00.021151 CAN 1 Status:chip status error active0.021151 CAN 2 Status:chip status error active0.101557 1  211x            Tx   d 8 00 00 00 00 00 00 00 00  Length = 290015 BitCount = 148 ID = 529x0.201483 1  211x            Tx   d 8 00 00 00 00 00 00 00 00  Length = 290015 BitCount = 148 ID = 529x0.301437 1  211x            Tx   d 8 00 00 00 00 00 00 00 00  Length = 290015 BitCount = 148 ID = 529x0.401151 1  211x            Tx   d 8 00 00 00 00 00 00 00 00  Length = 290015 BitCount = 148 ID = 529x

1.3.3 CAN Remote远程帧的描述

Format since v8.5

<Time> <Channel> <ID> <Dir> r <DLC> Length = <MessageDuration> BitCount = <MessageLength> ID = <IDnum>x

Example

2.5010 1 200 Tx r 8 Length = 1704000 BitCount = 145 ID = 88888888x

经典CAN**标准 **/ 扩展帧的差异:没有<D0> <D1>...<D8>

举例:

date Mon Apr 10 02:31:19.810 pm 2023
base hex  timestamps absolute
internal events logged
// version 11.0.00.041478 CAN 1 Status:chip status error active0.041478 CAN 2 Status:chip status error active0.101079 1  211             Tx   r 8  Length = 88015 BitCount = 47 ID = 5290.101219 1  211x            Tx   r 8  Length = 134015 BitCount = 70 ID = 529x0.200845 1  211x            Tx   r 8  Length = 134015 BitCount = 70 ID = 529x0.200939 1  211             Tx   r 8  Length = 88015 BitCount = 47 ID = 529

1.3.4 CAN Error错误帧的描述

CAN Error Frame

Format since v7.5

Interfaces with CAN-Core:

<Time> <Channel> ErrorFrame Flags = <flags> CodeExt = <codeExt> Code = <code> ID = <ID> DLC = <DLC> Position = <Position> Length = <Length>

Flags

定义参数Code, CodeExt, ID, DLC, Position和Length的有效性的Bit field。Bit含义:

0:SJA 1000 ECC是有效的

1:矢量CAN核心错误代码有效

2:矢量CAN核心错误位置有效

3:矢量CAN核心帧长度(ns)有效

Code

Vector CAN-Core的Bit含义:

Bit 0-5

0: Bit Error

1: Form Error

2: Stuff Error

3: Other Error

4: CRC Error

5: Ack-Del-Error

7: Ack-Error

Bit 6-7

0: RX-NAK-Error

1: TX-NAK-Error

2: RX-Error

3: TX-Error

CodeExtExtended error flags

Bit 0-4:Segment (only SJA1000)

Bit 5:Direction, 1=RX

Bit 6-11:Error Code

0 Bit Error

1 Form Error

2 Stuff Error

3 Other Error

4 CRC Error

5 ACK- DEL Error

7 ACK Error

Bit 12-13:Extended Direction

0 RX NAK

1 TX NAK

2 RX

3 TX

Bit 14:1 =错误帧由应用程序发送

备注

1 只对带有Vector CAN-Core的接口有效(CANcardXLe, VN7600, VN16xx, VN89xx和其他)。

2 ID、DLC和data field的有效性取决于干扰的类型和位置。

例如: 如果信息在ID- field受到干扰,那么只有ID的第一个Bit可能有效,但DLC和data field无效。错误位置不是干扰的位置。

例如: 如果错误位置位于CRC-field,那么信息可能在任何其他field受到干扰,错误的CRC是该干扰的结果。

Examples

1.592186 2 ErrorFrame Flags = 0xe CodeExt = 0x20a2 Code = 0x82 ID = 0 DLC = 0 Position = 5 Length = 11300

CAN Error Event

Format

<Time> CAN <Channel> Status:<Error>

<Time> CAN <Channel> Status:<Error> - TxErr: <TxCount> RxErr: <RxCount>

TxCount

transmit error count寄存器的值

RxCount

receive error count寄存器的值

Example

0.0006 CAN 2 Status:chip status error active

2137.317027 CAN 2 Status:chip status error active - TxErr: 8 RxErr: 0

举例:

date Mon Apr 10 02:33:32.536 pm 2023
base hex  timestamps absolute
internal events logged
// version 11.0.00.014704 CAN 1 Status:chip status error active0.014704 CAN 2 Status:chip status error active0.100641 CAN 1 Status:chip status error active  - TxErr: 8 RxErr: 00.100642 1  ErrorFrame	Flags = 0xfffe	CodeExt = 0x31d9	Code = 0xc7	ID = 0x211	DLC = 8	Position = 99	Length = 226015	Data = 0  0  0  0  0  0  0  00.100901 CAN 1 Status:chip status error active  - TxErr: 16 RxErr: 00.100902 1  ErrorFrame	Flags = 0xfffe	CodeExt = 0x31d9	Code = 0xc7	ID = 0x211	DLC = 8	Position = 99	Length = 226015	Data = 0  0  0  0  0  0  0  00.101161 CAN 1 Status:chip status error active  - TxErr: 24 RxErr: 00.101162 1  ErrorFrame	Flags = 0xfffe	CodeExt = 0x31d9	Code = 0xc7	ID = 0x211	DLC = 8	Position = 99	Length = 226015	Data = 0  0  0  0  0  0  0  00.101421 CAN 1 Status:chip status error active  - TxErr: 32 RxErr: 00.101422 1  ErrorFrame	Flags = 0xfffe	CodeExt = 0x31d9	Code = 0xc7	ID = 0x211	DLC = 8	Position = 99	Length = 226015	Data = 0  0  0  0  0  0  0  00.101681 CAN 1 Status:chip status error active  - TxErr: 40 RxErr: 00.101682 1  ErrorFrame	Flags = 0xfffe	CodeExt = 0x31d9	Code = 0xc7	ID = 0x211	DLC = 8	Position = 99	Length = 226015	Data = 0  0  0  0  0  0  0  00.101941 CAN 1 Status:chip status error active  - TxErr: 48 RxErr: 00.101942 1  ErrorFrame	Flags = 0xfffe	CodeExt = 0x31d9	Code = 0xc7	ID = 0x211	DLC = 8	Position = 99	Length = 226015	Data = 0  0  0  0  0  0  0  00.102201 CAN 1 Status:chip status error active  - TxErr: 56 RxErr: 00.102202 1  ErrorFrame	Flags = 0xfffe	CodeExt = 0x31d9	Code = 0xc7	ID = 0x211	DLC = 8	Position = 99	Length = 226015	Data = 0  0  0  0  0  0  0  00.102461 CAN 1 Status:chip status error active  - TxErr: 64 RxErr: 00.102462 1  ErrorFrame	Flags = 0xfffe	CodeExt = 0x31d9	Code = 0xc7	ID = 0x211	DLC = 8	Position = 99	Length = 226015	Data = 0  0  0  0  0  0  0  00.102721 CAN 1 Status:chip status error active  - TxErr: 72 RxErr: 00.102722 1  ErrorFrame	Flags = 0xfffe	CodeExt = 0x31d9	Code = 0xc7	ID = 0x211	DLC = 8	Position = 99	Length = 226015	Data = 0  0  0  0  0  0  0  00.102981 CAN 1 Status:chip status error active  - TxErr: 80 RxErr: 00.102982 1  ErrorFrame	Flags = 0xfffe	CodeExt = 0x31d9	Code = 0xc7	ID = 0x211	DLC = 8	Position = 99	Length = 226015	Data = 0  0  0  0  0  0  0  00.103241 CAN 1 Status:chip status error active  - TxErr: 88 RxErr: 00.103242 1  ErrorFrame	Flags = 0xfffe	CodeExt = 0x31d9	Code = 0xc7	ID = 0x211	DLC = 8	Position = 99	Length = 226015	Data = 0  0  0  0  0  0  0  00.103501 CAN 1 Status:chip status warning level - TxErr: 96 RxErr: 00.103502 1  ErrorFrame	Flags = 0xfffe	CodeExt = 0x31d9	Code = 0xc7	ID = 0x211	DLC = 8	Position = 99	Length = 226015	Data = 0  0  0  0  0  0  0  00.103761 CAN 1 Status:chip status warning level - TxErr: 104 RxErr: 00.103762 1  ErrorFrame	Flags = 0xfffe	CodeExt = 0x31d9	Code = 0xc7	ID = 0x211	DLC = 8	Position = 99	Length = 226015	Data = 0  0  0  0  0  0  0  00.104021 CAN 1 Status:chip status warning level - TxErr: 112 RxErr: 00.104022 1  ErrorFrame	Flags = 0xfffe	CodeExt = 0x31d9	Code = 0xc7	ID = 0x211	DLC = 8	Position = 99	Length = 226015	Data = 0  0  0  0  0  0  0  00.104281 CAN 1 Status:chip status warning level - TxErr: 120 RxErr: 00.104282 1  ErrorFrame	Flags = 0xfffe	CodeExt = 0x31d9	Code = 0xc7	ID = 0x211	DLC = 8	Position = 99	Length = 226015	Data = 0  0  0  0  0  0  0  00.104541 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 00.104542 1  ErrorFrame	Flags = 0xfffe	CodeExt = 0x31d9	Code = 0xc7	ID = 0x211	DLC = 8	Position = 99	Length = 226015	Data = 0  0  0  0  0  0  0  01.014705 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 01.014705 CAN 2 Status:chip status error active2.014705 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 02.014705 CAN 2 Status:chip status error active3.014705 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 03.014705 CAN 2 Status:chip status error active4.014706 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 04.014706 CAN 2 Status:chip status error active5.014706 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 05.014706 CAN 2 Status:chip status error active

1.4 CANFD网络中的描述

该部分列出了CANoe/CANalyzer ASC记录中的所有经典CAN event和CAN FD channel上的CAN FD event。

1.4.1 经典CAN Standard标准帧的描述

Format since v8.1

<Time> CANFD <Channel> <Dir> <ID> <SymbolicName> <BRS> <ESI> <DLC> <DataLength> <D1> … <D8> <MessageDuration> <MessageLength> <Flags> <CRC> <BitTimingConfArb> <BitTimingConfData> <BitTimingConfExtArb> <BitTimingConfExtData>

Example

0.105364 CANFD 1 Tx 1 0 0 1 1 01 112000 59 200040 39b5 46500250 460a0250 20011736 20010205

ID:表示CANID的十六进制值;

BRS:表示CANFD Frame的BRS位;

ESI:表示CANFD Frame的DEI位;

DLC:表示CANFD Frame的控制段DTC;

DataLength:message的有效长度,以字节为单位。

MessageDuration:表示发送/接收该Frame/Message占据总线的时间,单位纳秒;

MessageLength:表示发送/接收该Frame/Message由多少各Bit构成;

Flags:Bit含义

  • Bit 0: Reserved, must be 0
  • Bit 1: Reserved, for internal use
  • Bit 2: 1=NERR (1=single wire on low speed CAN)
  • Bit 3: 1=High voltage wake up
  • Bit 4: 1=Remote frame (only CAN)
  • Bit 5: Reserved, must be 0
  • Bit 6: 1= Tx Acknowledge
  • Bit 7: 1= Tx Request
  • Bit 8: Reserved, must be 0
  • Bit 9: SRR (CAN FD)
  • Bit 10: R0
  • Bit 11: R1
  • Bit 12: FDF bit 0: CAN frame 1: CAN FD frame
  • Bit 13: BRS bit (CAN FD)
  • Bit 14: ESI bit (CAN FD)
  • Bit 15: Reserved, must be 0
  • Bit 16: Reserved, must be 0
  • Bit 17: 1= Frame is part ofa burst
  • Bit 18: Single shot mode: Frame could not be transmitted
  • Bit 19: Single shot mode: If bit 18 set to 1, then this bit reports the reason.0 = arbitration lost 1=frame disturbed
  • Bit 20: Reserved, for internal use
  • Bit 21: Reserved, for internal use
  • Bit 22 -31: Reserved, must be 0

CRC:message的校验和;

  • Bit 0 – 20: CRC
  • Bit 21 – 26: Reserved for internal use
  • Bit 27 – 29: Stuff count field
  • Bit 30: Stuff count field parity
  • Bit 31: ISO format. 如果设置为1,那么该报文是CAN FD ISO格式,并且stuff count是有效的.

BitTimingConfArbBitTimingConfData:指的是用于仲裁和数据段的bit timing参数。这些段可以解释为32位长的bit field。

  • Bit 0-7: Quartz Frequency in kHz
  • Bit 8-15: Prescaler
  • Bit 16-23: BTL Cycles
  • Bit 24-31: Sampling Point

BitTimingConfExtArbBitTimingConfExtData:bit timing存储在该段中。如果bit timing不能以旧格式存储,那么将被设置为0。

  • Bit 0 – 7: TSEG1-1
  • Bit 8 – 15: TSEG2-1
  • Bit 16 – 27: Prescaler
  • Bit 28 – 31: Quartz Frequency (enumeration). Supported values: 0: 16 MHz, 1: 32 MHz, 2: 80 MHz

举例:

date Mon Apr 10 02:38:41.859 pm 2023
base hex  timestamps absolute
internal events logged
// version 11.0.00.038849 CAN 1 Status:chip status error active0.038849 CAN 2 Status:chip status error active0.100980 CANFD   1 Tx        211                                   0 0 8  8 00 00 00 00 00 00 00 00   242015  124   200040     2a8f 50a00150 46280150 20001f7e 20000b1a0.200978 CANFD   1 Tx        211                                   0 0 8  8 00 00 00 00 00 00 00 00   242015  124   200040     2a8f 50a00150 46280150 20001f7e 20000b1a0.301134 CANFD   1 Tx        211                                   0 0 8  8 00 00 00 00 00 00 00 00   242015  124   200040     2a8f 50a00150 46280150 20001f7e 20000b1a0.400976 CANFD   1 Tx        211                                   0 0 8  8 00 00 00 00 00 00 00 00   242015  124   200040     2a8f 50a00150 46280150 20001f7e 20000b1a

1.4.2 经典CAN Extended扩展帧的描述

Format since v8.1

<Time> CANFD <Channel> <Dir> <ID> <SymbolicName> <BRS> <ESI> <DLC> <DataLength> <D1> … <D8> <MessageDuration> <MessageLength> <Flags> <CRC> <BitTimingConfArb> <BitTimingConfData> <BitTimingConfData> <BitTimingConfExtArb> <BitTimingConfExtData>

Example

0.100995 CANFD 2 Rx 10001x 0 0 1 1 01 156000 82 200000 149a 46500250 460a0250 20011736 20010205

各字段的解释详见“1.4.1 经典CAN Standard标准帧的描述”。

举例:

date Mon Apr 10 02:42:26.030 pm 2023
base hex  timestamps absolute
internal events logged
// version 11.0.00.035889 CAN 1 Status:chip status error active0.035889 CAN 2 Status:chip status error active0.100829 CANFD   1 Tx        211x                                  0 0 8  8 00 00 00 00 00 00 00 00   290015  148   200040      37b 50a00150 46280150 20001f7e 20000b1a0.200893 CANFD   1 Tx        211x                                  0 0 8  8 00 00 00 00 00 00 00 00   290015  148   200040      37b 50a00150 46280150 20001f7e 20000b1a0.300831 CANFD   1 Tx        211x                                  0 0 8  8 00 00 00 00 00 00 00 00   290015  148   200040      37b 50a00150 46280150 20001f7e 20000b1a0.400909 CANFD   1 Tx        211x                                  0 0 8  8 00 00 00 00 00 00 00 00   290015  148   200040      37b 50a00150 46280150 20001f7e 20000b1a

1.4.3 CANFD Standard标准帧的描述

Format since v8.1

<Time> CANFD <Channel> <Dir> <ID> <SymbolicName> <BRS> <ESI> <DLC> <DataLength> <D1> … <D64> <MessageDuration> <MessageLength> <Flags> <CRC> <BitTimingConfArb> <BitTimingConfData> <BitTimingConfExtArb> <BitTimingConfExtData>

Example

0.151061 CANFD 1 Tx 2 0 0 2 2 02 03 150000 78 301040 10151 46500250 460a0250 20011736 20010205

各字段的解释详见“1.4.1 经典CAN Standard标准帧的描述”。

举例:

date Mon Apr 10 02:48:53.277 pm 2023
base hex  timestamps absolute
internal events logged
// version 11.0.00.046804 CAN 1 Status:chip status error active0.046804 CAN 2 Status:chip status error active0.100836 CANFD   1 Tx        211                                   1 0 8  8 00 00 00 00 00 00 00 00   107015  139   303040 f801828f 50a00150 46280150 20001f7e 20000b1a0.200741 CANFD   1 Tx        211                                   1 0 8  8 00 00 00 00 00 00 00 00   107015  139   303040 f801828f 50a00150 46280150 20001f7e 20000b1a0.300714 CANFD   1 Tx        211                                   1 0 8  8 00 00 00 00 00 00 00 00   107015  139   303040 f801828f 50a00150 46280150 20001f7e 20000b1a0.400735 CANFD   1 Tx        211                                   1 0 8  8 00 00 00 00 00 00 00 00   107015  139   303040 f801828f 50a00150 46280150 20001f7e 20000b1a

1.4.4 CANFD Extended扩展帧的描述

Format since v8.1

<Time> CANFD <Channel> <Dir> <ID> <SymbolicName> <BRS> <ESI> <DLC> <DataLength> <D1> … <D64> <MessageDuration> <MessageLength> <Flags> <CRC> <BitTimingConfArb> <BitTimingConfData> <BitTimingConfExtArb> <BitTimingConfExtData>

Example

0.105537 CANFD 2 Rx 10001x 0 0 1 1 01 174015 91 301000 bfd9 46500250 460a0250 20011736 20010205

各字段的解释详见“1.4.1 经典CAN Standard标准帧的描述”。

举例:

date Mon Apr 10 02:49:57.722 pm 2023
base hex  timestamps absolute
internal events logged
// version 11.0.00.018020 CAN 1 Status:chip status error active0.018020 CAN 2 Status:chip status error active0.100571 CANFD   1 Tx        211x                                  1 0 8  8 00 00 00 00 00 00 00 00   151015  161   303040 80016b85 50a00150 46280150 20001f7e 20000b1a0.200634 CANFD   1 Tx        211x                                  1 0 8  8 00 00 00 00 00 00 00 00   151015  161   303040 80016b85 50a00150 46280150 20001f7e 20000b1a0.300783 CANFD   1 Tx        211x                                  1 0 8  8 00 00 00 00 00 00 00 00   151015  161   303040 80016b85 50a00150 46280150 20001f7e 20000b1a0.400604 CANFD   1 Tx        211x                                  1 0 8  8 00 00 00 00 00 00 00 00   151015  161   303040 80016b85 50a00150 46280150 20001f7e 20000b1a

1.4.5 CAN Remote远程帧的描述

Format

<Time> CANFD <Channel> <Dir> <ID> <SymbolicName> <BRS> <ESI> <DLC> <DataLength> <MessageDuration> <MessageLength> <Flags> <CRC> <BitTimingConfArb> <BitTimingConfData> <BitTimingConfData> <BitTimingConfExtArb> <BitTimingConfExtData>

Example

0.300981 CANFD 1 Tx 50005x 0 0 5 0 140000 73 200050 7a60 46500250 460a0250 20011736 20010205

各字段的解释详见“1.4.1 经典CAN Standard标准帧的描述”。

举例:

date Mon Apr 10 02:52:19.883 pm 2023
base hex  timestamps absolute
internal events logged
// version 11.0.00.026889 CAN 1 Status:chip status error active0.026889 CAN 2 Status:chip status error active0.101047 CANFD   1 Tx        211                                   0 0 8  0    88015   47   200050     2c3a 50a00150 46280150 20001f7e 20000b1a0.101187 CANFD   1 Tx        211x                                  0 0 8  0   134015   70   220050     6a2a 50a00150 46280150 20001f7e 20000b1a0.201045 CANFD   1 Tx        211x                                  0 0 8  0   134015   70   200050     6a2a 50a00150 46280150 20001f7e 20000b1a0.201139 CANFD   1 Tx        211                                   0 0 8  0    88015   47   220050     2c3a 50a00150 46280150 20001f7e 20000b1a

1.4.6 CAN Error错误帧的描述

CAN FD Error Frame

Format

<Time> CANFD <Channel> <Dir> ErrorFrame <ErrorText> <flags> <code> <codeExt> <Phase> <Position> <ID> <BRS> <ESI> <DLC> <DataLength> <D1> … <D64> <MessageDuration> <extFlags> <CRC> <BitTimingConfArb> <BitTimingConfData> <BitTimingConfExtArb> <BitTimingConfExtData> <extFlags>:

extFlags(Extended error flags)

Bit 0:0: FDF is 0 (CAN Error Frame);1: FDF is 1 (CAN FD Error Frame)

Bit 1:0: BRS is 0;1: BRS is 1

Bit 2:0: ESI is 0;1: ESI is 1

Bit 30: Error in Arbitration Phase1: Error in Data Phase

Bit 40: Error is on a CAN channel1: Error is on a CAN FD channel

all othersreserved, must be set to 0

Example:

Classic

CAN

0.051203 CANFD 1 Rx ErrorFrame Stuff Error fffe 82 20a2 Arb.5 0 0 0 0 0 11984 10 0 46500250 460a0250 20011736 20010205

Example:

CAN FD

10.006898 CANFD 1 Tx ErrorFrame Not Acknowledge error, dominant error flag fffe c7 31ca Arb.556 44 0 0 f 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1331984 11 0 46500250 460a0250 20011736 20010205

各字段的解释详见“1.4.1 经典CAN Standard标准帧的描述”。

举例:

date Mon Apr 10 02:55:04.694 pm 2023
base hex  timestamps absolute
internal events logged
// version 11.0.00.036456 CAN 1 Status:chip status error active0.036456 CAN 2 Status:chip status error active0.100770 CAN 1 Status:chip status error active  - TxErr: 8 RxErr: 00.100770 CANFD   1 Tx   ErrorFrame Not Acknowledge error, dominant error flag       fffe c7     31da Arb. 109      211  1 0 8  8 00 00 00 00 00 00 00 00    93015       13 f8000000 50a00150 46280150 20001f7e 20000b1a0.100897 CAN 1 Status:chip status error active  - TxErr: 16 RxErr: 00.100897 CANFD   1 Tx   ErrorFrame Not Acknowledge error, dominant error flag       fffe c7     31da Arb. 109      211  1 0 8  8 00 00 00 00 00 00 00 00    93015       13 f8000000 50a00150 46280150 20001f7e 20000b1a0.101024 CAN 1 Status:chip status error active  - TxErr: 24 RxErr: 00.101024 CANFD   1 Tx   ErrorFrame Not Acknowledge error, dominant error flag       fffe c7     31da Arb. 109      211  1 0 8  8 00 00 00 00 00 00 00 00    93015       13 f8000000 50a00150 46280150 20001f7e 20000b1a0.101151 CAN 1 Status:chip status error active  - TxErr: 32 RxErr: 00.101151 CANFD   1 Tx   ErrorFrame Not Acknowledge error, dominant error flag       fffe c7     31da Arb. 109      211  1 0 8  8 00 00 00 00 00 00 00 00    93015       13 f8000000 50a00150 46280150 20001f7e 20000b1a0.101278 CAN 1 Status:chip status error active  - TxErr: 40 RxErr: 00.101278 CANFD   1 Tx   ErrorFrame Not Acknowledge error, dominant error flag       fffe c7     31da Arb. 109      211  1 0 8  8 00 00 00 00 00 00 00 00    93015       13 f8000000 50a00150 46280150 20001f7e 20000b1a0.101405 CAN 1 Status:chip status error active  - TxErr: 48 RxErr: 00.101405 CANFD   1 Tx   ErrorFrame Not Acknowledge error, dominant error flag       fffe c7     31da Arb. 109      211  1 0 8  8 00 00 00 00 00 00 00 00    93015       13 f8000000 50a00150 46280150 20001f7e 20000b1a0.101532 CAN 1 Status:chip status error active  - TxErr: 56 RxErr: 00.101532 CANFD   1 Tx   ErrorFrame Not Acknowledge error, dominant error flag       fffe c7     31da Arb. 109      211  1 0 8  8 00 00 00 00 00 00 00 00    93015       13 f8000000 50a00150 46280150 20001f7e 20000b1a0.101659 CAN 1 Status:chip status error active  - TxErr: 64 RxErr: 00.101659 CANFD   1 Tx   ErrorFrame Not Acknowledge error, dominant error flag       fffe c7     31da Arb. 109      211  1 0 8  8 00 00 00 00 00 00 00 00    93015       13 f8000000 50a00150 46280150 20001f7e 20000b1a0.101786 CAN 1 Status:chip status error active  - TxErr: 72 RxErr: 00.101786 CANFD   1 Tx   ErrorFrame Not Acknowledge error, dominant error flag       fffe c7     31da Arb. 109      211  1 0 8  8 00 00 00 00 00 00 00 00    93015       13 f8000000 50a00150 46280150 20001f7e 20000b1a0.101913 CAN 1 Status:chip status error active  - TxErr: 80 RxErr: 00.101913 CANFD   1 Tx   ErrorFrame Not Acknowledge error, dominant error flag       fffe c7     31da Arb. 109      211  1 0 8  8 00 00 00 00 00 00 00 00    93015       13 f8000000 50a00150 46280150 20001f7e 20000b1a0.102040 CAN 1 Status:chip status error active  - TxErr: 88 RxErr: 00.102040 CANFD   1 Tx   ErrorFrame Not Acknowledge error, dominant error flag       fffe c7     31da Arb. 109      211  1 0 8  8 00 00 00 00 00 00 00 00    93015       13 f8000000 50a00150 46280150 20001f7e 20000b1a0.102167 CAN 1 Status:chip status warning level - TxErr: 96 RxErr: 00.102167 CANFD   1 Tx   ErrorFrame Not Acknowledge error, dominant error flag       fffe c7     31da Arb. 109      211  1 0 8  8 00 00 00 00 00 00 00 00    93015       13 f8000000 50a00150 46280150 20001f7e 20000b1a0.102294 CAN 1 Status:chip status warning level - TxErr: 104 RxErr: 00.102294 CANFD   1 Tx   ErrorFrame Not Acknowledge error, dominant error flag       fffe c7     31da Arb. 109      211  1 0 8  8 00 00 00 00 00 00 00 00    93015       13 f8000000 50a00150 46280150 20001f7e 20000b1a0.102421 CAN 1 Status:chip status warning level - TxErr: 112 RxErr: 00.102421 CANFD   1 Tx   ErrorFrame Not Acknowledge error, dominant error flag       fffe c7     31da Arb. 109      211  1 0 8  8 00 00 00 00 00 00 00 00    93015       13 f8000000 50a00150 46280150 20001f7e 20000b1a0.102548 CAN 1 Status:chip status warning level - TxErr: 120 RxErr: 00.102548 CANFD   1 Tx   ErrorFrame Not Acknowledge error, dominant error flag       fffe c7     31da Arb. 109      211  1 0 8  8 00 00 00 00 00 00 00 00    93015       13 f8000000 50a00150 46280150 20001f7e 20000b1a0.102675 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 00.102675 CANFD   1 Tx   ErrorFrame Not Acknowledge error, dominant error flag       fffe c7     31da Arb. 109      211  1 0 8  8 00 00 00 00 00 00 00 00    93015       13 f8000000 50a00150 46280150 20001f7e 20000b1a1.036456 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 01.036456 CAN 2 Status:chip status error active2.036457 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 02.036457 CAN 2 Status:chip status error active3.036457 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 03.036457 CAN 2 Status:chip status error active

1.5 换行

换行是用CR+LF表示的编码。

2 小结:如何分辨CAN Log文件中的“标准帧”和“扩展帧”

2.1 经典CAN网络中的标准帧和扩展帧

经典CAN网络中的标准帧和扩展帧的差异:

  • 经典CAN标准帧的ID和IDnum字段后不带字符x;
  • 经典CAN扩展帧的ID和IDnum字段后带字符x。

举例:

date Mon Apr 10 04:24:18.233 pm 2023
base hex  timestamps absolute
internal events logged
// version 11.0.00.028996 CAN 1 Status:chip status error active0.028996 CAN 2 Status:chip status error active0.101449 1  211             Tx   d 8 00 00 00 00 00 00 00 00  Length = 242015 BitCount = 124 ID = 5290.101745 1  211x            Tx   d 8 00 00 00 00 00 00 00 00  Length = 290015 BitCount = 148 ID = 529x0.201469 1  211x            Tx   d 8 00 00 00 00 00 00 00 00  Length = 290015 BitCount = 148 ID = 529x0.201717 1  211             Tx   d 8 00 00 00 00 00 00 00 00  Length = 242015 BitCount = 124 ID = 529

2.2 CANFD网络中的标准帧和扩展帧

CANFD网络中,可能同时存在:经典CAN标准帧经典CAN扩展帧CANFD标准帧CANFD**扩展帧。

  • 经典CAN/CANFD标准帧的ID字段后不带字符x;
  • 经典CAN/CANFD扩展帧的ID字段后带字符x;
  • Flags字段的的Bit 12: FDF bit,其0表示经典CAN frame;1表示CAN FD frame

举例:

date Mon Apr 10 03:28:33.279 pm 2023
base hex  timestamps absolute
internal events logged
// version 11.0.00.008330 CAN 1 Status:chip status error active0.008330 CAN 2 Status:chip status error active0.100736 CANFD   1 Tx        211                                   1 0 8  8 00 00 00 00 00 00 00 00   107015  139   303040 f801828f 50a00150 46280150 20001f7e 20000b1a0.100893 CANFD   1 Tx        211x                                  1 0 8  8 00 00 00 00 00 00 00 00   151015  161   323040 80016b85 50a00150 46280150 20001f7e 20000b1a0.101141 CANFD   1 Tx        211                                   0 0 8  8 00 00 00 00 00 00 00 00   242015  124   220040     2a8f 50a00150 46280150 20001f7e 20000b1a0.101437 CANFD   1 Tx        211x                                  0 0 8  8 00 00 00 00 00 00 00 00   290015  148   220040      37b 50a00150 46280150 20001f7e 20000b1a

X 参考文献

  • 图文详解CAN Log文件 - ASC文件格式 - CSDN
  • Vector工具链
  • CAN Matrix DBC
  • CAN Matrix Arxml

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/744856.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

第八天笔记(项目测试工具悟道使用)

禅道 一、禅道的介绍 (1)定义禅道是一个项目管理工具,也是一个bug管理工具,还是一个用例管理工具。 (2)作用:为了解决众多企业在管理中出现混乱,无序的现象,开发出来 (3)来源:禅道属易软天川公司 (4 )禅道是集于产品管理,项目管理,测试管理于一身,同时包含事务…

阿贝云永久免费云服务器1核1G5M服务器使用评测

最近关注到了阿贝云,申请了一台,做个评测,供大家参考使用。永久免费服务器规格(CPU1核,内存1G,公网带宽5M,SSD数据盘10G),网络还是防御 200G 的高防 BGP,还提供了两个快照服务,作为免费服务器来说还是非常不错的。 使用 i-abc/Speedtest 三网测速 大陆三网+教育网 I…

2024QBXT暑假j组精英营Day2

\(一\) \(数据结构\) \(1\) \(链表\) \(1.0\) \(介绍\) 链表分为单向链表和双向链表 单向链表即当前链表只指向下一个元素 双向链表即对于每个元素,记录其前面一个元素,也记录其后面一个元 素。 链表不建议使用 STL 的某些元素进行替代,手写链表更为方便。 \(1.1\) \(单向链…

抢红包设计(预分配法)

大致设计常见软件QPSNginx 单机理论能达到30w左右的QPSRedis 单机可以承受8W+的QPS,理论可以达到10wQPSMysql 单机只有4k左右的QPS创建红包 红包拆分算法二倍均值法(每个人获得的红包金额差不多)math.Max(0.01, money / member * 2) 假设有10个人,红包总额10元。 10…

揭秘 Java 变长参数:如何优雅地处理不定数量的字符串

哈喽,大家好,我是木头左!理解变长参数:基础概念 在Java中,变长参数也称为可变参数,它允许你传递任意数量的参数到一个方法中。这个特性是通过使用三个点符号...来实现的。当你在方法的参数列表中使用...时,任何传递给该方法的额外参数都会被当作数组来处理。这为提供了一…

记一道弱智题

P2033 Chessboard Dance 今天集训第四天,遇到这道模拟题。 我搞错了一大问题。首先我以为移动是整行移动,但显然不是的。于是我就开始想这个怎么处理:我想是先碰到之后让箱子作为P,继续往后推,再碰到箱子……最后回溯。这是可怕的递归,函数是 MOVE(x, y, Steps_rem)。奈何…

【THM】Pickle Rick练习

脚本小子是这样的,黑客只要写POC就可以,可是脚本小子要考虑的事情就多了。【THM】Pickle Rick练习 与本文相关的TryHackMe实验房间链接:TryHackMe | Room details 简介:瑞克和莫蒂 CTF。 帮助瑞克变回人类!这个以瑞克和莫蒂为主题的挑战要求你利用网络服务器,找到三种材料…

乒乓球比赛计分系统需求流程

计应222_杜晓瑾_2210502012 乒乓球比赛计分系统需求流程 1、产品愿景: 我们的产品乒乓球比赛计分系统是为了解决乒乓球运动员、裁判、教练、爱好者、普通用户等人的问题,他们可以使用乒乓球计分器软件,在登录后可随时查看以往记录,进行对比,但是现有的计分器不能达到他们的…

腾讯特别调薪8%,年底十三薪分摊到月薪:福利升级还是另有深意?

腾讯公司对校招生房补和员工服务奖的薪酬政策做出调整,此消息引发广泛关注和热烈讨论,有正面评价如激励和跳槽优势,也有负面如变相降薪、新员工福利降低和个税增多等争议。近日,一则关于腾讯公司薪酬政策调整的消息在业内外引起了不小的震动。据悉,腾讯宣布把校招生的房补…

Day 6

References:Python教学29期(强烈推荐) : Day6 今日内容介绍 , 可变不可变类型 , 条件判断 , 逻辑运算符与优先级 , 成员运算与身份运算 , if今日内容

编写VCS运行使用的makefile遇到的问题

企图在makefile中直接使用之前的cshrc脚本中定义的alias的别名,但是一直报错 Command not found。查询发现makefile并不支持alias。 所以将alias的别名和值都复制到makefile中,去掉alias 加上等号。 后面使用$符号调用。Linux下makefile不支持alias命令_makefile alias-CSDN博…

说说RabbitMQ延迟队列实现原理?

使用 RabbitMQ 和 RocketMQ 的人是幸运的,因为这两个 MQ 自身提供了延迟队列的实现,不像用 Kafka 的同学那么苦逼,还要自己实现延迟队列。当然,这都是题外话,今天咱们重点来聊聊 RabbitMQ 延迟队列的实现原理,以及 RabbitMQ 实现延迟队列的优缺点有哪些?很多人知道使用 …