Rev 748 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 748 | Rev 800 | ||
|---|---|---|---|
| 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 | RELATED_SPACES = [] |
| 11 | 11 | ||
| 12 | ''' Called to restore the default state ''' |
12 | ''' Called to restore the default state ''' |
| 13 | def reset(self): |
13 | def reset(self): |
| 14 | pass |
14 | pass |
| 15 | 15 | ||
| 16 | ''' Called when state space is loaded, before any calls to run ''' |
16 | ''' Called when state space is loaded, before any calls to run ''' |
| 17 | def load(self): |
17 | def load(self): |
| 18 | pass |
18 | pass |
| 19 | 19 | ||
| 20 | ''' Called just before state space is dumped to disk ''' |
20 | ''' Called just before state space is dumped to disk ''' |
| 21 | def unload(self): |
21 | def unload(self): |
| 22 | pass |
22 | pass |
| 23 | 23 | ||
| 24 | """ 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 |
25 | related: array of statespace objects related to this state space |
| 26 | args: optional arguments |
26 | args: optional arguments |
| 27 | """ |
27 | """ |
| 28 | def run(self, related, args): |
28 | def run(self, related, args): |
| 29 | pass |
29 | pass |
| 30 | 30 | ||