6 from smclib
import statemap
36 msg =
"\n\tState: %s\n\tTransition: %s" % (
37 fsm.getState().
getName(), fsm.getTransition())
45 class SM_WaitingForSister(SM_Default):
49 fsm.getState().
Exit(fsm)
55 fsm.getState().
Entry(fsm)
59 fsm.getState().
Exit(fsm)
65 fsm.getState().
Entry(fsm)
69 fsm.getState().
Exit(fsm)
74 fsm.setState(SM.Alive)
75 fsm.getState().
Entry(fsm)
79 fsm.getState().
Exit(fsm)
87 fsm.getState().
Entry(fsm)
94 fsm.getState().
Exit(fsm)
99 fsm.setState(SM.AwaitSisterDeath)
100 fsm.getState().
Entry(fsm)
103 ctxt = fsm.getOwner()
104 fsm.getState().
Exit(fsm)
109 fsm.setState(SM.Dead)
110 fsm.getState().
Entry(fsm)
113 ctxt = fsm.getOwner()
114 fsm.getState().
Exit(fsm)
119 fsm.setState(SM.Alive)
120 fsm.getState().
Entry(fsm)
123 ctxt = fsm.getOwner()
124 fsm.getState().
Exit(fsm)
130 fsm.setState(SM.Dead)
131 fsm.getState().
Entry(fsm)
137 fsm.getState().
Exit(fsm)
138 fsm.setState(SM.AwaitSisterDeath)
139 fsm.getState().
Entry(fsm)
142 ctxt = fsm.getOwner()
143 fsm.getState().
Exit(fsm)
148 fsm.setState(SM.Dead)
149 fsm.getState().
Entry(fsm)
152 fsm.getState().
Exit(fsm)
153 fsm.setState(SM.AwaitSisterDeath)
154 fsm.getState().
Entry(fsm)
157 fsm.getState().
Exit(fsm)
158 fsm.setState(SM.AwaitSisterDeath)
159 fsm.getState().
Entry(fsm)
162 ctxt = fsm.getOwner()
163 fsm.getState().
Exit(fsm)
168 fsm.setState(SM.Dead)
169 fsm.getState().
Entry(fsm)
175 fsm.getState().
Exit(fsm)
176 fsm.setState(SM.Dead)
177 fsm.getState().
Entry(fsm)
180 fsm.getState().
Exit(fsm)
181 fsm.setState(SM.Dead)
182 fsm.getState().
Entry(fsm)
185 fsm.getState().
Exit(fsm)
186 fsm.setState(SM.Dead)
187 fsm.getState().
Entry(fsm)
190 fsm.getState().
Exit(fsm)
191 fsm.setState(SM.Dead)
192 fsm.getState().
Entry(fsm)
195 fsm.getState().
Exit(fsm)
196 fsm.setState(SM.Dead)
197 fsm.getState().
Entry(fsm)
200 fsm.getState().
Exit(fsm)
201 fsm.setState(SM.Dead)
202 fsm.getState().
Entry(fsm)
217 statemap.FSMContext.__init__(self, SM.WaitingForSister)
221 def trans_sm(*arglist):
223 getattr(self.getState(), attrib)(self, *arglist)
228 self._state.Entry(self)
def SisterDead(self, fsm)
def ConnectTimeout(self, fsm)
def SisterAlive(self, fsm)
virtual void enterStartState()=0
def SisterDead(self, fsm)
def SisterAlive(self, fsm)
const char * getName() const
def SisterAlive(self, fsm)
def __init__(self, owner)
def SisterDead(self, fsm)
def SisterAlive(self, fsm)
def DisconnectTimeout(self, fsm)
def SisterAlive(self, fsm)
def __getattr__(self, attrib)
def HeartbeatTimeout(self, fsm)
def ConnectTimeout(self, fsm)
def HeartbeatTimeout(self, fsm)
def SisterDead(self, fsm)
def ConnectTimeout(self, fsm)
def DisconnectTimeout(self, fsm)
def SisterDead(self, fsm)
def DisconnectTimeout(self, fsm)
def HeartbeatTimeout(self, fsm)
def HeartbeatTimeout(self, fsm)