for i in range(0,packet['length']):
idx = 5 + i
dbidx = 'db%d'%i
- packet[dbidx] = data[idx]
-
+ packet[dbidx] = ord(data[idx])
return packet
def packet2parsedstr(self,data):
packet = self.packet2parsed(data)
- msg = "sID: %04d" %sId
+ msg = "sID: %04d" %packet['sId']
if( packetParsed.get('eID')):
msg += " eID: %d" %packetParsed.get('eID')
msg += " rtr: %d"%packetParsed['rtr']