Tuesday, February 3, 2009

Ch5, Ex3 (TBD)

----WORK IN PROGRESS-----------

We can add one more state to Floor, called "keepopen", when Floor receives a call msg while door is open, then Floor starts another timer and goes to state "keepopen", all the call msgs in keepopen state are ignored and getting stoptimer puts the Floor back in doorsopen state. Add state "down" to Lift, when it receives any msg in this state it simply replies with down(id). When Floor receives a down msg it simply tries to call another lift. When a lift sends arrived msg to a Floor, it also sets a timer, on receipt of stoptimer, if its still waiting for Floor to close the doors then it goes into down state.

No comments:

Post a Comment