Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require"pack"
- pkts = {}
- pkts.HRS = function(packet)
- local self = {}
- local _
- self.unpack = function(...)
- local _ = {...}; if (_[1] == self) then table.remove(_,1); end
- local packet = unpack(_)
- _, self.pkt, self.laps, self.quals = string.unpack(packet, "zbb")
- end
- return self
- end
- p = "HRS\0"..string.char(20)..string.char(5)
- HRS = pkts.HRS(p)
- HRS.unpack(p)
- print(HRS.pkt, HRS.laps)
Advertisement
Add Comment
Please, Sign In to add comment