Add Raw_APDU class for unparsed and nonjudgmental data transmission

This commit is contained in:
Henryk Plötz 2010-06-01 03:05:19 +02:00
parent 5baedf1e8e
commit 59917271dd
1 changed files with 14 additions and 0 deletions

View File

@ -458,6 +458,20 @@ class R_APDU(APDU):
"Return this APDU as a binary string"
return self.data + self.sw
class Raw_APDU(APDU):
"""Raw APDU that doesn't do any parsing"""
def parse(self, apdu):
"'Parse' the apdu and copy the values to this object"
self.data = apdu
def render(self):
"Return this APDU as a binary string"
return self.data
def _format_fields(self):
return ""
class PN532_Frame(APDU):
"""This is not really an ISO 7816 APDU, but close enough to use the same
class infrastructure."""