diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-09-25 13:24:11 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-09-25 13:24:11 (GMT) |
commit | 567df9318fff6d1bb570191c33ea68cd6ef88bee (patch) | |
tree | 72e310c422cea117abe859a6bddf0b613a2db589 /test/samples/uscxml | |
parent | be3c180fec71866a91b5f9297708d581bc1d6435 (diff) | |
download | uscxml-567df9318fff6d1bb570191c33ea68cd6ef88bee.zip uscxml-567df9318fff6d1bb570191c33ea68cd6ef88bee.tar.gz uscxml-567df9318fff6d1bb570191c33ea68cd6ef88bee.tar.bz2 |
More work on IMInvoker, renamed Blob attributes and some XPath datamodel fixes
Diffstat (limited to 'test/samples/uscxml')
-rw-r--r-- | test/samples/uscxml/applications/3dviewer.scxml | 84 | ||||
-rw-r--r-- | test/samples/uscxml/test-instant-messaging.scxml | 18 |
2 files changed, 17 insertions, 85 deletions
diff --git a/test/samples/uscxml/applications/3dviewer.scxml b/test/samples/uscxml/applications/3dviewer.scxml deleted file mode 100644 index 90970d3..0000000 --- a/test/samples/uscxml/applications/3dviewer.scxml +++ /dev/null @@ -1,84 +0,0 @@ -<scxml - datamodel="ecmascript" - xmlns="http://www.w3.org/2005/07/scxml" - xmlns:scenegraph="http://uscxml.tk.informatik.tu-darmstadt.de/scenegraph.xsd"> - <datamodel> - <data id="localCam" /> - <data id="foo" /> - </datamodel> - <state id="start"> - <!-- setup all invokers --> - - <!-- 20ms heartbeat --> - <invoke type="heartbeat" id="heartbeat.20ms"> - <param name="interval" expr="'20ms'" /> - </invoke> - - <!-- receive files --> - <invoke type="umundo" id="umundo.files"> - <param name="domain" expr="''" /> - <param name="channel" expr="'umundo.files'" /> - <param name="types" expr="'../proto/3DViewer'" /> - </invoke> - - <!-- publish / subscribe to remote pose --> - <invoke type="umundo" id="umundo.pose"> - <param name="domain" expr="''" /> - <param name="channel" expr="'umundo.pose'" /> - <param name="types" expr="'../proto/3DViewer'" /> - </invoke> - - <!-- 3D viewer - This is only a template for nodes inserted per javascript - --> - <invoke type="scenegraph"> - <content> - <scenegraph:display id="localDisplay" width="50%" height="50%"> - <scenegraph:viewport> - <scenegraph:camera id="localCam"> - </scenegraph:camera> - <scenegraph:translation> - <scenegraph:rotation> - <scenegraph:scale> - <scenegraph:node /> - </scenegraph:scale> - </scenegraph:rotation> - </scenegraph:translation> - </scenegraph:viewport> - </scenegraph:display> - </content> - </invoke> - <state id="sendPose"> - <transition target="sendPose" event="heartbeat.20ms" /> - <onentry> - <script> - localCam = document.evaluate("//scenegraph:display[@id='localDisplay']").asNodeSet(); - print(localCam[0].getAttribute("pitch")); - </script> - <send target="#_umundo.pose" event="umundo.pose"> - <param name="type" expr="'SceneSetup'" /> - <content> -({ - 'camPose': { - 'euler': { - 'pitch': localCam.getAttribute("pitch"), - 'roll': localCam.getAttribute("roll"), - 'yaw': localCam.getAttribute("yaw"), - } - }, - 'modelPose': { - 'euler': { - 'pitch': localCam.getAttribute("pitch"), - 'roll': localCam.getAttribute("roll"), - 'yaw': localCam.getAttribute("yaw"), - } - }, - 'modelName': "foo", - 'bandName': "foo" -}) - </content> - </send> - </onentry> - </state> - </state> -</scxml>
\ No newline at end of file diff --git a/test/samples/uscxml/test-instant-messaging.scxml b/test/samples/uscxml/test-instant-messaging.scxml index 569ec59..6ca39d4 100644 --- a/test/samples/uscxml/test-instant-messaging.scxml +++ b/test/samples/uscxml/test-instant-messaging.scxml @@ -1,4 +1,14 @@ <scxml datamodel="ecmascript"> + <script> +//<![CDATA[ + someBinaryData = new ArrayBuffer(256); + var view = new Uint8Array(someBinaryData); + for (var i = 0; i < view.length; i++) { + view[i] = i; + } +//]]> + </script> + <script src="http://uscxml.tk.informatik.tu-darmstadt.de/scripts/dump.js" /> <state id="idle"> <onentry> @@ -13,7 +23,13 @@ <state id="dump"> <transition event="dump" target="dump"> - <script>dump(_invokers['im']);</script> + <send event="dump" delay="1000ms" /> + <script>//dump(_invokers['im']);</script> + <send target="#_im" event="im.send"> + <param name="receiver" expr="'sradomski@localhost'" /> + <param name="data" expr="someBinaryData" /> + <content>Hey There!</content> + </send> </transition> </state> </state> |