Subversion Repositories HomeAutomation

Rev

Rev 736 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

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