14.11.2022, 07:38
Use this:
Code:
value = event.getvalue()
f0 = bit.band(bit.rshift(value, 28), 0x0F)
f1 = bit.band(bit.rshift(value, 24), 0x0F)
f2 = bit.band(bit.rshift(value, 20), 0x0F)
f3 = bit.band(bit.rshift(value, 16), 0x0F)
f4 = bit.band(bit.rshift(value, 12), 0x0F)
f5 = bit.band(bit.rshift(value, 8), 0x0F)
code = f0 .. f1 .. f2 .. f3 .. f4 .. f5
err = bit.band(value, 0x80) == 0x80
permission = bit.band(value, 0x40) == 0x40
direction = bit.band(value, 0x20) == 0x20
encryption = bit.band(value, 0x10) == 0x10
index = bit.band(value, 0x0F)
log(code, err, permission, direction, encryption, index)