fix(dll): TYPE_2_1/2_2 carry one OD octet per Table A.10 - #27
Merged
Merged
Conversation
Table A.10 gives TYPE_2_1 to TYPE_2_6 exactly one On-request Data octet and reserves the two-octet OD for TYPE_2_V (OPERATE M-sequence code 5). The device DLL, the test harness and the Python virtual master all used two OD octets for every TYPE_2_x, which agrees between our own stacks but not with a third-party peer on any TYPE_2_1/2_2 profile. Derive od_len as 2 only for TYPE_2_V, update the regression tests that pinned the old width (the 2-octet Type-0 DeviceOperate regression moves to TYPE_2_V), and align the Python M-sequence generator comment/values. Device ctest 22/22 and the virtual-master unit tests 14/14 are green.
This was referenced Sep 18, 2026
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 #26 (device side of the train).
Table A.10 gives TYPE_2_1 to TYPE_2_6 exactly one On-request Data octet and reserves two OD octets for TYPE_2_V (OPERATE code 5). The device DLL (
iolink_dll_init,device_apply_stack_config) and the Python virtual master (MSequenceType.get_od_len) used two OD octets for every TYPE_2_x, so our stacks agreed with each other but not with a third-party peer on any TYPE_2_1/2_2 profile.od_lenis 2 only for TYPE_2_V, 1 for everything else;Gates: device ctest 22/22, virtual-master unit tests 14/14, clang-format clean on all changed files.