14.02.2020, 09:18
The protocol is rather simple, here's a starter example that you can use to decode data further:
Note that the logged event number will be in decimal whereas it is written in hexadecimal in the protocol description.
Code:
res = socket:receive('*l')
if res then
data = lmcore.hextostr(res, true)
st, addr, len, cmd, event, id, area = data:byte(1, 7)
log(st, addr, len, cmd, event, id, area)
end
Note that the logged event number will be in decimal whereas it is written in hexadecimal in the protocol description.