summaryrefslogtreecommitdiffstats
path: root/test/samples/uscxml/applications/spoken-map-ticker.scxml
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-08-29 09:52:14 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-08-29 09:52:14 (GMT)
commit442204d0f510cb033cb75a542b010f4f90cbd2a3 (patch)
treea243159f780aa77d53d2523a0dea7a365613ae21 /test/samples/uscxml/applications/spoken-map-ticker.scxml
parentafda86c8ba1f2ce3dc89a56bf9bccc62c52ff240 (diff)
downloaduscxml-442204d0f510cb033cb75a542b010f4f90cbd2a3.zip
uscxml-442204d0f510cb033cb75a542b010f4f90cbd2a3.tar.gz
uscxml-442204d0f510cb033cb75a542b010f4f90cbd2a3.tar.bz2
Some bug-fixes and enhancements to build-process
Diffstat (limited to 'test/samples/uscxml/applications/spoken-map-ticker.scxml')
-rw-r--r--test/samples/uscxml/applications/spoken-map-ticker.scxml39
1 files changed, 26 insertions, 13 deletions
diff --git a/test/samples/uscxml/applications/spoken-map-ticker.scxml b/test/samples/uscxml/applications/spoken-map-ticker.scxml
index 926cd6c..5a1c0b2 100644
--- a/test/samples/uscxml/applications/spoken-map-ticker.scxml
+++ b/test/samples/uscxml/applications/spoken-map-ticker.scxml
@@ -1,4 +1,4 @@
-<scxml datamodel="ecmascript" name="comet-test"
+<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">
@@ -6,6 +6,9 @@
<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>
@@ -13,42 +16,52 @@
</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>
+ <!-- <script>dump(_event);</script> -->
</finalize>
</invoke>
- <invoke type="openal" id="audio">
- <!-- <param name="maxX" expr="180" />
- <param name="maxY" expr="18" />
- <param name="maxZ" expr="85" /> -->
- </invoke>
+ <invoke type="openal" id="audio"></invoke>
<state id="idle">
- <transition target="idle" event="map.center">
+ <!--
+ 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="18 - _event.data.zoom" />
- <!-- <param name="y" expr="0" /> -->
+ <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="'../audio/click.wav'" />
+ <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 &amp;&amp; _event.data.severity &gt; 8">
<send target="#_vxml">
<content>