Why are VIFe-codes defined without the top-bit (the extension bit)? #1369
Replies: 4 comments
-
The top bits are great because theoretically you can find the number of difs and vifs without understanding the difs/vifs. So, my idea was that I extract the dif/vifs separately and remove the top bits, since they have served their purpose. Also the combinable vifs that appear at the end can occur both with a high bit or no hight bit depending if they are the last combinable or not....again, it makes sense to a single entry in the table (without top-bit) instead of two (with and without top bit). Alas, there are of course exceptions and the variable size vif adds a requirement that you have to at least be able to detect this vif, read the vif length in the next byte to skip, and then continue vif decoding, where the bytes will have the top bit set..... |
Beta Was this translation helpful? Give feedback.
-
The simplest dif/vif is just two bytes without top-bits. As soon as the top bit is set for a dif or vif byte, then that means that the next byte should be included into the dif (or vif) that you are collecting. A dif or vif or both can be up to 10 bytes each. I think. |
Beta Was this translation helpful? Give feedback.
-
So in a nutshell: |
Beta Was this translation helpful? Give feedback.
-
Hey guys,
I'm just diving into your code.
While doing so I wondered why the extended VIF-codes are defined with
0x7D
instead of0xFD
?What I understand from EN13757-3, section 6.4 is, that the top bit has to be set.
Does this has something to do with that the top bits are removed from the vif-byte, when they are exctracted (wmbus.cc, Line 2656).
Thanks for you help, I'm curious.
Beta Was this translation helpful? Give feedback.
All reactions