def setReversed(self, value=True): CRCProcessor.setReversed(self, value) ## optimize execution time by reducing one level of function call if value is False: self.calculate3 = self.calculateMSBClassic else: self.calculate3 = self.calculateLSBClassic
def createDataOperator(self, crcSize, inputData): dataList = morph_data(inputData, crcSize) if dataList: return Fast16HwCRCDataOperator(self, dataList) if not inputData: print "unable to morph to Fast16HwCRCDataOperator -- empty input data" else: print "unable to morph -- unsupported crc size:", crcSize return CRCProcessor.createDataOperator(self, crcSize, inputData)
def __init__(self): CRCProcessor.__init__(self)
def __init__(self, lookupSize): CRCProcessor.__init__(self) self.lookupSize = lookupSize