
Untitled
By: a guest on
May 28th, 2012 | syntax:
None | size: 0.56 KB | hits: 11 | expires: Never
class ErrorLog:
"""
Class that automatically addresses an error in the error log.
"""
def __init__(self, ptr_val=None):
if ptr_val == None:
self.base_addr = ((readCfgSpaceInt(0x506) - 1)*0x10 + 0x20000)
elif ptr_val < 0: # a negative pointer value is a relative offset to the tail of the log
self.base_addr = ((readCfgSpaceInt(0x506) - 1 + ptr_val) * 0x10 + 0x20000)
else:
self.base_addr = (ptr_val*0x10 + 0x20000)
self.error_code_cache = None
self.error_data_cache = None