The variable YEAR, has got an offset of 2000. This means, that I need to add 2000 to the taken value:
local Year_proto = ProtoField.uint16("Variable_Year", "This is the transmitted year", base.DEC, nil)
Before adding it to the shown values of my Wireshark-Parser, I need to save the LITTLE-ENDIAN 7 bits long number. The bit mask should be 0x07f0 = 0000 0111 1111 0000. The start byte is the 77 (buffer(77,2).
Can you please tell me how can I save the mentioned LITTLE-ENDIAN 7 bits number? Let's say that the name of the saved number is year_test and the variable "year" is the corrected value:
offset=2000.0
year=year_test+offset //for example year_test=0x15=21 --> 2021
Afterwards I would list the corrected year value as follows:
subtree:add(Year_proto, year)
Many thanks for your help!