SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 279 | Next

Steven Kelly and Juha-Pekka Tolvanen

"Domain-Specific Modeling"


7.4.1 Example Models
In our example application in Fig. 7.5, the telecom module responds to the call with
the main menu: an initial welcome message and list of the options. To keep things
simple, here there are only two options: pressing 1 takes the user to the mode menu and
pressing 2 to the version info. The version info is simple: it reads out the version info
and waits for the user to press 1 to return to the main menu. The InvalidInput
and Timeout relationships are even simpler: each simply says ???Invalid input!??? or
???Timeout!??? and returns to the previous menu as shown.
The mode menu is more complex: it reads out the current mode and a list of all
modes, telling the user which key to press for each. The DTMF_Input for the mode
FIGURE 7.5 Sample VoiceMenu model
150 HOME AUTOMATION
menu allows the user to press a key corresponding to a mode. As there are ?¬?ve modes,
the key must be from 1 to 5 (setting the mode to 0 does nothing). If legal input is
received, the ???Set mode??? object??™s subdiagram uses a SystemCall to change the system
mode to match the key which was pressed.
The details of the mode menu are described in the VoiceOutput subdiagram in
Fig. 7.6. After initially stating the currentmode and telling the user to select another
mode, the application initializes a counter variable, register A, to zero.


Pages:
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6