Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 28th, 2012  |  syntax: None  |  size: 0.56 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. class ErrorLog:
  2.     """
  3.     Class that automatically addresses an error in the error log.
  4.     """
  5.  
  6.     def __init__(self, ptr_val=None):
  7.         if ptr_val == None:
  8.             self.base_addr = ((readCfgSpaceInt(0x506) - 1)*0x10 + 0x20000)
  9.         elif ptr_val < 0: # a negative pointer value is a relative offset to the tail of the log
  10.                         self.base_addr = ((readCfgSpaceInt(0x506) - 1 + ptr_val) * 0x10 + 0x20000)
  11.         else:
  12.             self.base_addr = (ptr_val*0x10 + 0x20000)
  13.  
  14.         self.error_code_cache = None
  15.         self.error_data_cache = None