def __init__(self, ustr): super().__init__(ustr) try: HexConstant(ustr) self.__value = int(ustr, 16) except TypeError: Base64Constant(ustr) binstr = base64.b64decode(bytes(ustr[2:], "utf8")) self.__value = ntoi(binstr)
def InitiatorTaskTag(self): return ntoi(self.__data[16:20])
def DataSegmentLength(self): return ntoi(self.__data[5:8])
def TotalAHSLength(self): return ntoi(self.__data[4]) # in units of 4 byte words
def Immediate(self): if ntoi(self.__data[0]) & self.__IMMEDIATE_MASK: return True else: return False
def Opcode(self): return ntoi(self.__data[0]) & self.__OPCODE_MASK
def Immediate(self): if ntoi(self.__data[0]) & self.__IMMEDIATE_MASK : return True else: return False
def __init__(self, addr, tpgt): self.__addr = str(addr) self.__tpgt = ntoi(tpgt)