<?xml version="1.0" encoding="UTF-8"?>
<diagram author="Yentl Van Tendeloo" name="Logging">
    <inport name="inp"/>
    <outport name="outp"/>

    <class name="Logging" default="true">
        <scxml initial="init">
            <state id="init" initial="wait_output">
                <state id="wait_output">
                    <transition event="input" port="inp" target=".">
                        <parameter name="value"/>
                        <script>
                            print("SCCD got input " + str(value))
                        </script>
                    </transition>

                    <transition after="0.1" target="."/>
                </state>

                <transition after="2.0" target=".">
                    <raise event="output" scope="output" port="outp">
                        <parameter expr="'B'"/>
                    </raise>
                    <script>
                        print("SCCD sent output 'B'")
                    </script>
                </transition>

                <transition event="terminate" port="inp" target="../finished">
                    <script>
                        print("Got terminate")
                    </script>
                </transition>
            </state>

            <state id="finished">
                <onentry>
                    <script>
                        print("FINISHED")
                    </script>
                </onentry>
            </state>
        </scxml>
    </class>
</diagram>
