+
+ def packet2parsedstr(self,data):
+ """
+ This will return a string that is the parsed CAN message. The bytes will be parsed
+ for the standard ID, extended ID (if one is present), rtr, length and databytes (if present).
+ The message will be placed into a string as decimal integers not hex values. This method
+ calls L{packet2parsed} to do the packet parsing.
+
+ @type data: List
+ @param data: Data packet as returned by the L{rxpacket}
+ @rtype: String
+ @return: String that shows the data message in decimal format, parsed.
+ """
+ packet = self.packet2parsed(data)
+ msg = "sID: %04d" %packet['sId']
+ if( packetParsed.get('eID')):
+ msg += " eID: %d" %packetParsed.get('eID')
+ msg += " rtr: %d"%packetParsed['rtr']
+ length = packetParsed['length']
+ msg += " length: %d"%length
+ msg += " data:"
+ for i in range(0,length):
+ dbidx = 'db%d'%i
+ msg +=" %03d"% ord(packetParsed[dbidx]) # could change this to HEX
+ #msg = self.client.packet2parsedstr(packet)
+ return msg