Articles Blog

Example Telephone

Example Telephone


Here’s another example, a graphical example, of a state machine, using slightly different icons on things. In this case, ovals for the states. We have the telephone being off hook, we have it when you’re dialing or pressing the buttons. We have it when it’s ringing, when it’s busy when you are connected to another party. And, when it’s in a rest state on hook, on the extreme left. Notice in that case, that there are two ovals nested inside of each other. This is used to designate what the default or start state of the system is. There are then transitions, these directed arcs going, among the states. One to look at is the one on the top right labeled dialing, where it’s a transition from a state to itself. That is, when you’re dialing or pressing the buttons, okay, you’re doing this several times and, you remain in the dialing state until you’ve finished dialing. Now we could have had a machine here that had numerous states as part of the dialing process, in which we’ve dialed the first digit, the second digit, and so on. And in that case, it would be different states. Until we eventually got entered our local number or our our long distance number. That would have complicated the diagram, and remember these diagrams, are abstractions. We abstract over the set of states, and abstract over the events. That’s, that’s your choice as a designer or a modeler. Notice also that, the diagram is somewhat busy and that there are arcs that have a seemingly redundant labels. This is another example of a situation where we’d like to improve the diagrams by by simplifying them. And that’s where we’re going when we get to concurrent systems model with statecharts.

Leave a Reply

Your email address will not be published. Required fields are marked *