Quote:
Originally Posted by siebert
You're only testing whether all bits are set or not. For a 1-bit mask this is ok, as it can only encode the values 0 and 1.
With a two-bit mask the encoded values are 0, 1, 2 and 3 (but 3 means more than 2 and the real value is stored in a separate byte). The current code doesn't decode these values.
Ciao,
Steffen
|
Hi Steffen,
I am not sure I understand
If I assume the following (note tag1 has more than 1 bit set in its mask)
tag 1 has bitmask 0x03 and requires 1 value be read in as field 1
tag 2 has bitmask 0x01 and requires 1 value be read in as field 2
tag 3 has bitmask 0x02 and requires 1 value be read in as field 3
tag 4 has bitmask 0x08 and requires 1 value to be read in as field 4
And if type == 0x07:
I would read in the first value as field 1, next value as field 2, next value as field 3 and no further values would be read in for this particular entry since the bitmask & type != bitmask for tag 4.
I think you are saying this is wrong ...
I think you are saying that a bitmask with two bits set means something different from how I am interpreting it?
If so, via a concrete example, could you explain how a bitmask with more than 1 bit set should be interpreted if it is not as I had assumed above.
Thanks!
Kevin