You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nonzero FIXED_EVENT_LIST associations are unaffected.
Motivation
The A2L writer currently always emits event 0 as DEFAULT_EVENT_LIST. Some registry producers use event 0 as a fallback when they cannot reliably determine a fixed event.
In that case, presenting event 0 as the default may incorrectly suggest that it is the appropriate measurement raster. Emitting a bare VARIABLE association allows the calibration-tool user to choose the event explicitly.
The existing behavior remains the default; this option only allows callers to suppress that recommendation when the event is unknown.
Compatibility
The option defaults to true, preserving the existing A2L output.
As a writer-only setting, it is excluded from registry JSON serialization and restores the enabled default after deserialization.
Validation
Tested with Rust 1.90
cargo test -p xcp_registry --all-features
Test result: 8 passed, 0 failed, 1 pre-existing test ignored
Sorry, I just changed this as well at the moment, because it was very strange behaviour.
I removed the special treatment of event 0 completely, for now.
As a quick fix, it mc_registry writes default event instead of fixed event depending on absolute addressing mode.
As Rust xcp-lite does not use absolute addressing mode, is has no impact here. All events in Rust applications are emitted as fixed events now, as it should be.
Let me consider first, what options xcp_client offline A2L generation has, before we decide which features mc_registry might need.
Your changes are now in conflict.
Is that ok for now ?
Yes, that’s absolutely fine. Thanks for letting me know. I’ll leave the PR as it is for now while you consider it. I’ll be happy to rebase and adapt the implementation or close the PR if it’s no longer needed. Thanks again!
Sorry, I just changed this as well at the moment, because it was very strange behaviour. I removed the special treatment of event 0 completely, for now. As a quick fix, it mc_registry writes default event instead of fixed event depending on absolute addressing mode. As Rust xcp-lite does not use absolute addressing mode, is has no impact here. All events in Rust applications are emitted as fixed events now, as it should be. Let me consider first, what options xcp_client offline A2L generation has, before we decide which features mc_registry might need. Your changes are now in conflict. Is that ok for now ?
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
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.
Summary
Add
Registry::set_write_default_event_list(bool)to control whether event 0 is emitted inDEFAULT_EVENT_LIST.When disabled, event 0 changes from:
to:
Nonzero
FIXED_EVENT_LISTassociations are unaffected.Motivation
The A2L writer currently always emits event 0 as
DEFAULT_EVENT_LIST. Some registry producers use event 0 as a fallback when they cannot reliably determine a fixed event.In that case, presenting event 0 as the default may incorrectly suggest that it is the appropriate measurement raster. Emitting a bare
VARIABLEassociation allows the calibration-tool user to choose the event explicitly.The existing behavior remains the default; this option only allows callers to suppress that recommendation when the event is unknown.
Compatibility
The option defaults to
true, preserving the existing A2L output.As a writer-only setting, it is excluded from registry JSON serialization and restores the enabled default after deserialization.
Validation
cargo test -p xcp_registry --all-features