fix(logging): ASC 扩展帧 ID 补上末尾 x - #430
Merged
Merged
Conversation
Vector ASC (CAN_LOG_TRIGGER_ASC_Format) requires 29-bit identifiers to end with x so CANoe/CANalyzer can replay the file. Treat IDs above 0x7FF as extended even when idType is missing, and cover classic/CAN FD write plus AscReader round-trip. Co-authored-by: frankie <frankie-zeng@users.noreply.github.com>
Keep formatter assertions and parse the generated ASC through AscReader so the trailing-x requirement is verified without depending on log.ts worker assets or File transport flush timing.
frankie-zeng
marked this pull request as ready for review
August 25, 2026 04:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #427
问题
录制 Vector ASC 日志时,扩展帧(29-bit)仲裁 ID 末尾缺少
x,CANoe / CANalyzer 无法回放。Vector CAN, Log & Trigger ASC Logging Format(CAN_LOG_TRIGGER_ASC_Format)规定扩展帧为:
标准 11-bit ID 不加
x;扩展 ID 必须带尾缀x。python-canASCWriter与 linux-canlog2asc同样如此。修复
idType === EXTENDED追加x> 0x7FF)或带CAN_EFF_FLAG的 ID 也视为扩展帧,避免idType丢失时仍写出错误格式AscReader回读的测试验证
本地已通过:
test/transport/asc.test.ts:6 passedtest/replay/replay.spec.ts:9 passed