diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-04-22 14:02:03 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-04-22 14:02:03 (GMT) |
commit | 1fb6bcf30f954e426f2d3002d14887574fb941dd (patch) | |
tree | 08cff7f2b879c50efe79e3c04d255075522af862 /test/uscxml/applications/spoken-map-ticker.scxml | |
parent | 71c334bf4e35559496feac3f3cf00b72ceb88812 (diff) | |
download | uscxml-1fb6bcf30f954e426f2d3002d14887574fb941dd.zip uscxml-1fb6bcf30f954e426f2d3002d14887574fb941dd.tar.gz uscxml-1fb6bcf30f954e426f2d3002d14887574fb941dd.tar.bz2 |
Major refactoring
- Moved tests
- Changes to promela datamodel
- Implemented Trie
Diffstat (limited to 'test/uscxml/applications/spoken-map-ticker.scxml')
-rw-r--r-- | test/uscxml/applications/spoken-map-ticker.scxml | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/test/uscxml/applications/spoken-map-ticker.scxml b/test/uscxml/applications/spoken-map-ticker.scxml new file mode 100644 index 0000000..5a1c0b2 --- /dev/null +++ b/test/uscxml/applications/spoken-map-ticker.scxml @@ -0,0 +1,78 @@ +<scxml datamodel="ecmascript" name="mapticker" + xmlns:html="http://www.w3.org/1999/xhtml" + xmlns:vxml="http://www.w3.org/2001/vxml" + xmlns="http://www.w3.org/2005/07/scxml"> + + <script src="http://uscxml.tk.informatik.tu-darmstadt.de/scripts/dump.js" /> + + <state id="start"> + <!-- + Invoke an external HTML browser + --> + <invoke type="xhtml" id="xhtml1"> + <content src="spoken-map-ticker.xhtml" /> + <finalize> + <!-- <script>dump(_event);</script> --> + </finalize> + </invoke> + + <!-- + Invoke a VoiceXML browser + --> + <invoke type="vxml" id="vxml" /> + + <!-- + Invoke a uMundo component for pub/sub ticker subscription + --> + <invoke type="umundo" id="umundo"> + <param name="channel" expr="'map/tick'" /> + <finalize> + <!-- <script>dump(_event);</script> --> + </finalize> + </invoke> + + <invoke type="openal" id="audio"></invoke> + + <state id="idle"> + <!-- + Map in XHTML invoker was moved -> update OpenAL listener position + --> + <transition event="map.center" target="idle"> + <send event="move.listener" target="#_audio"> + <param name="x" expr="_event.data.lon" /> + <param name="y" expr="1" /> + <param name="z" expr="_event.data.lat" /> + </send> + </transition> + + <!-- + Ticker message was received + -> Send to XHTML invoker to display + -> Play clicking noise from respective direction + -> Speak content if severity exceeds a given threshold + --> + <transition target="idle" event="umundo.rcvd"> + <send target="#_xhtml1"> + <content>${_event.data}</content> + </send> + <send target="#_audio" event="play" delay="0ms"> + <param name="src" expr="'click.wav'" /> + <param name="x" expr="_event.data.lon" /> + <param name="y" expr="0" /> + <param name="z" expr="_event.data.lat" /> + </send> + + <if cond="_event.data.message && _event.data.severity > 8"> + <send target="#_vxml"> + <content> + <vxml:prompt> + ${_event.data.message} + </vxml:prompt> + </content> + </send> + </if> + + </transition> + </state> + </state> +</scxml>
\ No newline at end of file |