def _get_crc(self):
     data = hl2bs(self.apdu + [ETX])
     try:
         return crc_xmodem16(data)
     except Exception:
         print(self.apdu)
         raise
예제 #2
0
 def _get_crc(self):
     data = conv.hl2bs(self.apdu + [ETX])
     #print "crc for %s => %s" % ([hex(i) for i in self.apdu], hex(crc.crc_xmodem16(data)))
     try:
         return crc.crc_xmodem16(data)
     except:
         print(self.apdu)
         raise
예제 #3
0
 def _get_crc(self):
     data = conv.hl2bs(self.apdu + [ ETX ])
     #print "crc for %s => %s" % ([hex(i) for i in self.apdu], hex(crc.crc_xmodem16(data)))
     try:
         return crc.crc_xmodem16(data)
     except:
         print self.apdu
         raise
예제 #4
0
 def value(self):
     return conv.hl2bs(self._data)
예제 #5
0
 def as_bin(self):
     return conv.hl2bs(self.dump_message())
예제 #6
0
 def as_bin(self):
     return conv.hl2bs(self.dump_message())
예제 #7
0
파일: bmp.py 프로젝트: Ciatronical/ecrterm
 def value(self):
     return conv.hl2bs(self._data)