summaryrefslogtreecommitdiffstats
path: root/test/uscxml/test-file-element.scxml
blob: baeafae1ce45f46faa48b6fb0bdb0c369b790587 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<scxml datamodel="ecmascript">
	<!-- This exemplifies the file element and TypedArrays in _event['data']['content'] -->
	<script src="http://uscxml.tk.informatik.tu-darmstadt.de/scripts/dump.js" />
	<state id="read">
		<onentry>
			<file url="foo.bin" operation="read" type="binary" callback="foo.bin" />
		</onentry>
		<transition event="foo.bin" target="write">
			<log expr="dump(_event)" />
		</transition>
	</state>
	<state id="write">
		<onentry>
			<file url="bar.bin" operation="write" type="binary" contentexpr="_event['data']['content']" />
		</onentry>
	</state>
</scxml>