1 BLF文件格式
文件头部包含内容
TYPE | 变量 | 说明 |
---|---|---|
FileStatistics | signature | DWORD , 信号量 |
statisticsSize | DWORD , sizeof(FileStatistics) | |
applicationId | BYTE, applicat ion ID(usually CANoe) | |
applicationMajor | BYTE , application major number (usually 0) | |
applicationMinor | BYTE , application minor number (usually 0) | |
applicationBuild | BYTE , application build number (usually 0) | |
apiMajor | BYTE , BL API major number (e.g. 3) | |
apiMinor | BYTE , BL API minor number (e.g. 9) | |
apiBuild | BYTE , BL API major number (e.g. 6) | |
apiPatch | BYTE , BL API patch number (e.g. 3) | |
fileSize | ULONGLONG ,文件大小 以字节记 | |
uncompressedFileSize | ULONGLONG ,解压缩文件大小 | |
objectCount | DWORD ,number of objects | |
objectsRead | DWORD ,number of objects read | |
measurementStartTime | SYSTEMTIME ,测量开始时间 | |
lastObjectTime | SYSTEMTIME ,最后一个对象的时间 | |
reserved[18] | DWORD | |
LogContainer | objectFlags | DWORD,object flags (usually BL_OBJ_FLAG_TIME_ONE_NANS) |
reserved | WORD | |
objectVersion | WORD, object specific version (usually 0) | |
uncompressedFileSize | ULONGLONG,解压文件大小 | |
compressedFileSize | std::streamsize,压缩文件大小 | |
compressedFile | char *,压缩文件内容 ,存储压缩后的can object |
can message 内容
TYPE | 变量 | 说明 |
---|---|---|
ObjectHeaderBase | signature | DWORD , 目标信号 |
headerSize | WORD ,sizeof object header ,取决于header的类型 | |
headerVersion | WORD ,object header 的类型(objectheader 有两种版本,以下只解释version 1) | |
objectSize | DWORD ,can object的大小 | |
objectType | DWORD ,can object的类型 | |
ObjectHeader | objectFlags | DWORD ,object 时间戳的单位 :10微妙或1ns |
reserved‘[’2] | BYTE | |
objectVersion | WORD ,object specific version,必须设为0 | |
objectType | DWORD ,can object的类型 | |
objectTimeStamp | ULONGLONG,can object在 objectFlags给出单位上的时间戳 | |
CanMessage | channel | WORD ,通道数 |
flags | BYTE , Bit 0: TX 、Bit 5: NERR、Bit 6: WU、 Bit 7: RTR | |
dlc | BYTE | |
id | DWORD | |
data’['8] | BYTE |
2 BLF文件写入流程
3 注意事项
- 注意各帧报文timstamp与filestatistics上lastObjectTime参数的对应设置
- blf文件中measurementStartTime 与lastObjectTime的时间间隔不宜过短 ,以小于1ms为例。
以上两种情况均容易产生在canoe解析时发生 Warning: The configured time interval is outside the logging file’s scope .