From a05dfd226f0b41c040a0b7e5cd61be1f22db81a2 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 14 Oct 2013 19:22:22 +0200 Subject: [PATCH] Make nervlists relative --- statemachine.odg | Bin 16453 -> 16850 bytes statemachine.py | 32 ++++++++++++++++---------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/statemachine.odg b/statemachine.odg index 64b3cebbac907a6b1941c82b35deab817b6c0882..883e18348f8e3399d346b2f5c278b9c666b1d12a 100644 GIT binary patch delta 9193 zcma)i1yEkkvgi3e+}&M*ySo$IU4mP1g6ly-fM6lG1y68yf@^|11SbS{cQ*ff->bTB zYioC>>eSTf>iJD~&s6tRclQTFrotd->Pj%MxB!3%0E1;p323TVe<$gw?Ey(|5&-z; zBTQ5kBT0y$0ZGIZWF)nHvW~Kmd~kId2h}{UQqYn1fJLN5c|=$$x?Jka{NQ{_n1oQT}V;Nr^n@)-sUOXjTVSY)UBZgWe| z%DhxU_(07nc%8=A(q+Y;Gr|~ugj?!pH!Oa}%cH^al(F?{N@ zB~e?}vqT>F->n^iC#Id(l{0oKyB*pxVgktP2gl%tY};KOOYuFc_3I>+Z^UsWaLIDGd$;(TmO7iavfFAuqJu86rKR-w zXe=9?w?jMQBn}IDW4iJ{V(a45aF0PtwDqIOZa%=0D{$hpXG8SQg^SN|_j|WZ9)dTV zox8}Yo;l^FK$pYs9X!!F(y$DFUU!&csY@s7+FlJn_Dzi}QAzGE*aTt$H|hq<{o0;c z*J@bg3(9wR!DuXppfbz*U0$=17r1iJHzo@hmXbwM9zHs12+3&iy^rl$Ma8WX zlomBhoFs5EXQu`!fL)u#{QA2tBAfE3FA0Rl<7P(T{TT%{^o-^(g1FyajO7>X&&A!j ztxye{Bc%tGELlF3hmKHm3ML78d+E8WP2CQ$!1U`ArsR(qr6JjW#MNLa`?X?jC`1KP zGnj6v2l1r8^R&+#eLdDt&j-s%{k)-#U{@Nxa?*>JNy$u1Oq|;XTL&-+bxlB`uui9k z&EV|p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*+%ux u2S86Kp;(xX`9DXy{@pSb|G}8fK>>j1Kf0#~C5Vd@NK diff --git a/statemachine.py b/statemachine.py index 6a3e889..f2cac47 100644 --- a/statemachine.py +++ b/statemachine.py @@ -44,13 +44,17 @@ class Nerver(): # If f returns something, that's also returned by nerv. def __init__(self, nervlist): self.nervlist = list(nervlist) + self.last_event_time = time.time() - def nerv(self, total_time): + def nerv(self): if len(self.nervlist): (time, f) = self.nervlist[0] + now = time.time() + time_gone = now-self.last_event_time # check if the first element is to be triggered - if time >= total_time: + if time_gone >= time: self.nervlist = self.nervlist[1:] # "pop" the first element, but do not modify original list + self.last_event_time = now return f() @@ -65,7 +69,6 @@ class StateMachine(): class State(): def __init__(self, state_machine, nervlist = None): self.state_machine = state_machine - self.time_entered = time.time() self._nerver = None if nervlist is None else Nerver(nervlist) def handle_pins_event(self): pass # one needn't implement this @@ -77,7 +80,7 @@ class StateMachine(): arg("412 Precondition Failed: The current state (%s) cannot handle the OPEN event" % self.__class__.__name__) def handle_wakeup_event(self): if self._nerver is not None: - return self._nerver.nerv(time.time() - self.time_entered) + return self._nerver.nerv() def pins(self): return self.state_machine.pins def actor(self): @@ -119,8 +122,8 @@ class StateMachine(): class StateUnlocking(State): def __init__(self,callback,sm): # construct a nervlist - nervlist = [(t*OPEN_REPEAT_TIMEOUT, lambda: self.actor().act(Actor.CMD_UNLOCK)) for t in xrange(1, OPEN_REPEAT_NUMBER+1)] - nervlist += [((OPEN_REPEAT_NUMBER+1)*OPEN_REPEAT_TIMEOUT, self.could_not_open)] + nervlist = [(OPEN_REPEAT_TIMEOUT, lambda: self.actor().act(Actor.CMD_UNLOCK)) for t in xrange(OPEN_REPEAT_NUMBER)] + nervlist += [(OPEN_REPEAT_TIMEOUT, self.could_not_open)] super().__init__(sm,nervlist) self.callbacks=[callback] # FIXME: can we send "202 processing: Trying to open the door" here? Are the callbacks multi-use? @@ -183,14 +186,13 @@ class StateMachine(): logger.error("door manually locked, but space switch on - going to StateZu") play_sound("manual_lock") return StateZu(self.state_machine) - # handle_wakeup_event intentionally not overwritten class StateLocking(State): # FIXME: Why does this even have callbacks? # TODO: share code with StateUnlocking def __init__(self,sm): # construct a nervlist - nervlist = [(t*CLOSE_REPEAT_TIMEOUT, lambda: self.actor().act(Actor.CMD_LOCK)) for t in xrange(1, CLOSE_REPEAT_NUMBER+1)] + nervlist = [(t*CLOSE_REPEAT_TIMEOUT, lambda: self.actor().act(Actor.CMD_LOCK)) for t in range(1, CLOSE_REPEAT_NUMBER+1)] nervlist += [((CLOSE_REPEAT_NUMBER+1)*CLOSE_REPEAT_TIMEOUT, self.could_not_close)] super().__init__(sm, nervlist) self.callbacks=[] @@ -219,26 +221,24 @@ class StateMachine(): return StateAboutToOpen(self.state_machine) class StateAboutToLeave(State): + def __init__(self, sm): + nervlist = [(LEAVE_TIMEOUT, lambda: StateLocking(self.state_machine))] + super().__init__(sm, nervlist) def handle_pins_event(self): if not self.pins().door_closed: return StateLeaving(self.state_machine) if self.pins().door_locked: return StateZu(self.state_machine) - def handle_wakeup_event(self): - over = time.time() - self.time_entered - if over >= LEAVE_TIMEOUT: - return StateLocking(self.state_machine) class StateLeaving(State): + def __init__(self, sm): + nervlist = [(LEAVE_TIMEOUT, lambda: StateAboutToOpen(self.state_machine))] + super().__init__(sm, nervlist) def handle_pins_event(self): if self.pins().door_closed: return StateLocking(self.state_machine) if self.pins().door_locked: return StateZu(self.state_machine) - def handle_wakeup_event(self): - over = time.time() - self.time_entered - if over >= LEAVE_TIMEOUT: - return StateAboutToOpen(self.state_machine) def __init__(self, actor): self.actor = actor -- 2.30.2