Often with reusable components, it is also useful to create an explicit library
of reusable components. This helps prevent developers inadvertently reinventing the
wheel because they did not know of the existence of a previously made component.
This could be accomplished with a simple little modeling language that would contain
a set of TextFragments. When developers wanted a text fragment, they would pick it
up from the library, adding it there if nothing suitable existed. An example of such a
library is shown in Table 7.1. Here we have included the start address, to ?¬?t with
TABLE 7.1 Library of Text Fragments
Label Start address Length
. . .press. . . 000 1
Pause 0.5 sec 001 5
the. . . 002 1
. . .current. . . 003 2
. . .mode. . . 004 1
. . .is. . . 005 1
Pause 0.3 sec 006 3
select. . . 007 2
. . .another. . . 008 3
for. . . 009 1
Timeout! 010 3
Invalid input! 011 5
Welcome to the system! 012 8
Press 1 for mode menu 013 7
Press 2 for other menu 014 8
Welcome to the other menu 015 10
Press 1 for the main menu 016 11
This is VoiceMenu v1.2 017 11
152 HOME AUTOMATION
Domatic??™s practice. In actual use, it would probably be better to omit this and instead
have the generator automatically create sequential numbering separately for each
product. A useful addition would be a property for each fragment that pointed to the
actual sound ?¬?le, so developers could listen to it directly from the model and even
emulate whole sections of speech.
Pages:
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294