Contents | Overview | Editor | Forum |
---|
This SCXML document gives an overview of the SCXML language and shows the use of its state machine transition flows
The example below shows the implementation of a simple microwave oven using SCXML
The example below shows the implementation of a simple microwave oven using <parallel> and the SCXML 'In()' predicate
The example below shows the implementation of a simple calculator in SCXML
This project is intended to test Qt QML SCXML module for designing in-vehicle infotainment systems
Resource hierarchy solution of dining philosophers problem intended to show usage of communication between invoked submachines.
This example demonstrates different techniques of using SCXML data models in applications
Salus RT500 (Digital Room Thermostat) Simulator is a widget-based application that demonstrates usage of Qt SCXML CPP DataModel
Classical StopWatch with 2 buttons. All internal logic is written with SCXML EcmaScript Datamodel
Qt widget-based application that executes W3C SCXML tests and custom tests in sequence, and is able to build a report in Markdown format
The BendixKing KT 76C transponder - radio transmitter/receiver which operates on radar frequencies
Qt widget-based application that executes W3C SCXML tests for Lua Datamodel in sequence
Qt widget-based application that demonstrates how to invoke child state machines with QScxmlCppDataModel
<scxml datamodel="native" initial="dark" name="ScxmlWaterPump" version="1.0" xmlns="http://www.w3.org/2005/07/scxml"><!--we provide the datamodel inline in the scaffolding-->
<script><![CDATA[pinMode(LED, OUTPUT);
for (char i = 0; i < 4; ++i) {
pinMode(pump[i], OUTPUT);
digitalWrite(pump[i], PUMP_OFF);
bed[i].set_CS_AutocaL_Millis(0xFFFFFFFF);
}]]>
</script>
<state id="dark"><!--it is too dark to water flowers--><!--start to take measurements and activate single pumps if too dry-->
<onentry>
<script><![CDATA[for (char i = 0; i < 4; ++i) {
digitalWrite(pump[i], PUMP_OFF);
}]]>
</script>
</onentry>
<transition cond="_event->data.light > LIGHT_THRES" event="light" target="light"/>
</state>
<state id="light"><!--delivers events for all the capsense measurements-->
<invoke id="cap" type="capsense"/>
<transition cond="_event->data.light < LIGHT_THRES" event="light" target="dark"/>
<state id="idle">
<transition cond="soil[0] < 0 &&
soil[0] <= soil[1] &&
soil[0] <= soil[2] &&
soil[0] <= soil[3]" event="pump" target="pump1"/>
<transition cond="soil[1] < 0 &&
soil[1] <= soil[0] &&
soil[1] <= soil[2] &&
soil[1] <= soil[3]" event="pump" target="pump2"/>
<transition cond="soil[2] < 0 &&
soil[2] <= soil[0] &&
soil[2] <= soil[1] &&
soil[2] <= soil[3]" event="pump" target="pump3"/>
<transition cond="soil[3] < 0 &&
soil[3] <= soil[0] &&
soil[3] <= soil[1] &&
soil[3] <= soil[2]" event="pump" target="pump4"/>
</state>
<state id="pumping">
<onentry>
<send delay="8000ms" event="idle"/>
</onentry>
<transition event="idle" target="idle"/>
<state id="pump1">
<invoke id="1" type="pump"/>
</state>
<state id="pump2">
<invoke id="2" type="pump"/>
</state>
<state id="pump3">
<invoke id="3" type="pump"/>
</state>
<state id="pump4">
<invoke id="4" type="pump"/>
</state>
</state>
</state>
</scxml>
TOP | Contents | Overview | Editor | Forum |
---|