Skip to content

Update parsing of plain text VIF#229

Open
johvik wants to merge 1 commit into
rscada:masterfrom
johvik:second-pass
Open

Update parsing of plain text VIF#229
johvik wants to merge 1 commit into
rscada:masterfrom
johvik:second-pass

Conversation

@johvik

@johvik johvik commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

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

@lategoodbye

Copy link
Copy Markdown
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants