The second assignment for my first Master’s course in SE is to create 3 state diagrams. For those that are following along, I haven’t yet finished my first assignment if you are wondering. They are both due on February 28th, so I have some time.
The 3 state diagrams I need to make are for an automatic washing machine, the software for a DVD player, and a telephone answering system (think cell phone voice mail).
I decided to take a stab at the software for the DVD player first. I have decided to go with StarUML for the initial modelling. Star UML supports UML 2.0 (which I like), however the diagrams are ugly IMHO. Also a choice pseudo state symbol is a circle as opposed to a side-ways diamond. I am afraid that this may cause confusion. As we speak I am downloading BOUML (which doesn’t look to be supported any longer) and Visual Paradigm Community Edition (which is free for non-commercial use, go education!). Hopefully one of these will give me a “better picture”.
The following is a list of states I think the DVD player software can be in:
- Power Off – When the DVD player is turned off or unplugged.
- Idle – When the DVD player is on, but the tray is empty. You may see the bouncy DVD logo on the screen here (like that episode of The Office).
- Tray Open – When the tray is open awaiting for the DVD to be entered.
- Validation – When the tray has been closed and what has been put (or taken out of) the tray is being validated.
- DVD Menu – When you are on the DVD’s menu screen.
- DVD Playing – When the audio/video content of the DVD is being played forwards at normal playback speed.
- DVD Re-winding – When the audio/video content of the DVD is being played backwards at a variable speed greater than normal playback speed (potentially confusing but the DVD is playing backwards at a speed greater than what it is normally played forwards).
- DVD Fast Forwarding – When the audio/video content of the DVD is being played forwards at variable speed greater than normal playback speed.
- DVD Paused – When the video is paused on a single frame and the audio is not playing.
Potential other states include the “DVD Player Menu” which has a bunch of sub-states, I am not sure whether or not to include this. I have no measure to what level these are supposed to be modeled to.
I have also identified the following stimuli:
- Power -> When the user presses the power button
- Open Tray -> When the user presses the open tray button, or a corrupt or non-dvd is in the tray.
- Close Tray -> When the user pressed the close tray button or pushes on the open tray.
- Play -> When the user presses the play button.
- Fast Forward -> When the user presses the fast forward button.
- Rewind -> When the user presses the rewind button.
- Pause -> When the user presses the pause button.
- Stop -> When the user presses the stop button, or the DVD playback has reached the end of the content.
Here again we have the potential for Menu, when the user presses the Menu button, Select when the user presses the select button (to choose a menu option), Up Arrow, Down Arrow, Left Arrow, Right Arrow when each of the arrow buttons are pressed (change the menu selection).
Again, I am not sure to what level of detail the professor is looking for here. I suppose I may want to error on the side of too much. But then again, if the professor is left weeding through the diagram I may come out behind. I may just send him the first one I do and ask for a critique and if it is at the appropriate level of detail or not.
When I am done with the first cut of the actual diagram I’ll post what I have, also I’ll probably throw a review of BOUML and Visual Paradigm. Until then… adios!