Repository navigation
Fix/feeder conversion failure inline error - #207
Merged
Merged
Conversation
… of dropping it
When a feeder's north/south domain-value conversion (enum or linear
scaling lookup in convertValue/enumConversion/linearConversion) fails
-- e.g. because a set request's value has no matching entry in the
configured conversion table, as happened for the enum-typed
Vehicle.Powertrain.Transmission.PerformanceMode signal receiving
'SPORT' with no matching scaling entry -- the feeder previously
returned an empty string for the value. That empty string passed
convertDomainData's/initVSSInterfaceMgr's only emptiness check (on
Name, not Value) and was written to state storage as-is, silently
discarding the set value while still reporting write success; the
next get then returned whatever value the backend already held for
that path (e.g. a stale/default value), giving no indication that
anything had failed.
Introduces utils.InlineErrorDataConversionFailed
('viss-inline:Data-conversion-failed'), written to state storage
instead of '' on conversion failure, so a subsequent get surfaces the
failure via the VISS in-line error reporting convention rather than
returning stale/default data. This constant is a VISSR-specific
extension of that convention and is NOT part of the VISS
specification (only 'Data-not-available' is spec-defined); the
extension is documented as such in its doc comment.
Also renames the existing non-normative 'visserr:' sentinel prefix to
'viss-inline:' (utils.InlineErrorDataNotAvailable) to match the wire
format mandated by the VISS Transport specification's in-line error
reporting section, updating storage_backend.go, curvelog.go, and the
tutorial doc that referenced the old prefix.
Signed-off-by: Ulf Bjorkengren <ulfbjn@gmail.com>
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.
No description provided.