Update parsing of plain text VIF#229
Open
johvik wants to merge 1 commit into
Open
Conversation
Collaborator
|
@johvik There is also no example in the test directory? Usually I prefer to have a test frame to "prove" features. |
The plain text VIF is specified to be "given in the first byte" so it should be read from the data part. I don't have a device using the specified way of doing it however I have an (older) ELV CMA10 which uses the immediate bytes (matches the way the code was written prior to this commit) so the parsing is updated to be done in two passes to work with both interpretations: 1. As per the specification 2. If variable length VIF is seen another attempt with the wrong placement is performed A handcrafted hex for the expected placement of the plain text VIF is added. In addition to this mbus_vib_unit_lookup() is patched so it prints the custom_vif value when it has extensions instead of "Custom VIF". The proper fix would be to also add support for the orthogonal VIF extensions.
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.
The plain text VIF is specified to be "given in the first byte" so it should be read from the data part.
I don't have a device using the specified way of doing it however I have an older ELV CMA10 which uses the immediate bytes (matches the way the code was written prior to this commit) so the parsing is updated to be done in two passes to work with both interpretations: