Subversion Repositories HomeAutomation

Rev

Rev 736 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | SVN | RSS feed

  1. ###########################################################
  2. #
  3. # Template for a state space
  4. #
  5. ###########################################################
  6.  
  7. class StateSpace:
  8.    
  9.     DESCRIPTIVE_NAME = 'New Packet Filter'
  10.     RELATED_SPACES = []
  11.  
  12.     ''' Called to restore the default state '''
  13.     def reset(self):
  14.         pass
  15.  
  16.     ''' Called when state space is loaded, before any calls to run '''
  17.     def load(self):
  18.         pass
  19.    
  20.     ''' Called just before state space is dumped to disk '''
  21.     def unload(self):
  22.         pass
  23.    
  24.     """ Triggered by filters as response to incoming packets
  25.        related: array of statespace objects related to this state space
  26.        args: optional arguments
  27.    """
  28.     def run(self, related, args):
  29.         pass
  30.