decode: updates all around

Rewrite packet handling so packets can span multiple USB URBs
(which sometimes happens with WMC) and also add a bunch more
WMC decoding stuff.
This commit is contained in:
Dan Williams
2012-01-21 12:55:16 -06:00
parent a9d6b5a8b6
commit c37fdf5f94
4 changed files with 235 additions and 132 deletions

View File

@@ -24,6 +24,10 @@ TP_REQUEST = 0x00
TP_RESPONSE = 0x02
TP_INDICATION = 0x04
def complete(data, direction):
# We don't handle QMUX frames spanning packets yet
return True
def unpack(data, direction):
return binascii.unhexlify(data)
@@ -183,5 +187,5 @@ def show(data, prefix, direction):
print ""
def get_funcs():
return (unpack, show)
return (complete, unpack, show)