Concurrent and Distributed Systems U3 IP

profilecedoza25

Illustrate in a state diagram the workings of a software-controlled community exit gate as described below. Add states and events to those mentioned, as necessary. (A diagram with more states is often much clearer than one with complicated guard conditions.) Use superstates if you wish. 


  • The gate is normally in state Closed.
    • It can be opened by the event clickfrom a remote controller.
      • In response to click, the software issues the command start-opento the gate hardware.
    • The gate is in state Openingwhile it swings fully open.
    • When the gate is fully open, the software starts a timer and the gate enters stateOpened.
  • After tseconds in Opened, the software attempts to close the gate.
    • If no obstacle is detected above a roadway sensor, the software issues the command start-close, and the gate enters state Closing.
      • In Closing, in response to click,the software issues the commands stopand start-open; the gate enters the stateOpening.
    • If an obstacle is detected, the software restarts the timer; the gate remains open.
      • After tseconds, another attempt is made, and so forth.
    • When the gate is fully closed, it enters state Closed.

  • Unless the gate is already fully open, a power cutevent causes it to open fully on back-up power.
    • For this, the software issues the command start-bkp-openand the gate entersEmergency Opening
      • If power is restored—the event power up<
    • 7 years ago
    • 25
    Answer(0)