<?xml version="1.0" encoding="UTF-8"?>
<model version="4.6.0" links="1">
 <documentation>Calc is the model of the Calculator described in Chapter 4 of PSiCC2</documentation>
 <!--${qpn}-->
 <framework name="qpn"/>
 <!--${SMs}-->
 <package name="SMs" stereotype="0x02">
  <!--${SMs::Calc}-->
  <class name="Calc" superclass="qpn::QHsm">
   <documentation>Calculator state machine</documentation>
   <!--${SMs::Calc::operand1}-->
   <attribute name="operand1" type="double" visibility="0x02" properties="0x00"/>
   <!--${SMs::Calc::operator}-->
   <attribute name="operator" type="uint8_t" visibility="0x02" properties="0x00"/>
   <!--${SMs::Calc::SM}-->
   <statechart properties="0x01">
    <!--${SMs::Calc::SM::initial}-->
    <initial target="../1">
     <action>BSP_clear();</action>
     <initial_glyph conn="2,2,5,1,80,4,6">
      <action box="1,-2,13,4"/>
     </initial_glyph>
    </initial>
    <!--${SMs::Calc::SM::on}-->
    <state name="on">
     <entry>BSP_message(&quot;on-ENTRY;&quot;);</entry>
     <exit>BSP_message(&quot;on-EXIT;&quot;);</exit>
     <!--${SMs::Calc::SM::on::initial}-->
     <initial target="../4">
      <action>BSP_message(&quot;on-INIT;&quot;);</action>
      <initial_glyph conn="15,9,5,1,37,9,-2">
       <action box="1,0,5,2"/>
      </initial_glyph>
     </initial>
     <!--${SMs::Calc::SM::on::C}-->
     <tran trig="C" target="..">
      <action>BSP_clear();</action>
      <tran_glyph conn="2,12,3,1,86">
       <action box="0,-2,4,2"/>
      </tran_glyph>
     </tran>
     <!--${SMs::Calc::SM::on::OFF}-->
     <tran trig="OFF" target="../../2">
      <tran_glyph conn="2,14,3,1,88,99,-71">
       <action box="0,0,5,2"/>
      </tran_glyph>
     </tran>
     <!--${SMs::Calc::SM::on::error}-->
     <state name="error">
      <entry>BSP_message(&quot;error-ENTRY;&quot;);</entry>
      <exit>BSP_message(&quot;error-EXIT;&quot;);</exit>
      <state_glyph node="11,66,9,8">
       <entry box="1,2,5,2"/>
       <exit box="1,4,5,2"/>
      </state_glyph>
     </state>
     <!--${SMs::Calc::SM::on::ready}-->
     <state name="ready">
      <entry>BSP_message(&quot;ready-ENTRY;&quot;);</entry>
      <exit>BSP_message(&quot;ready-EXIT;&quot;);</exit>
      <!--${SMs::Calc::SM::on::ready::initial}-->
      <initial target="../6">
       <action>BSP_message(&quot;ready-INIT;&quot;);</action>
       <initial_glyph conn="18,20,5,0,20,2">
        <action box="0,-2,6,2"/>
       </initial_glyph>
      </initial>
      <!--${SMs::Calc::SM::on::ready::DIGIT_0}-->
      <tran trig="DIGIT_0" target="../../5/3">
       <action>BSP_clear();</action>
       <tran_glyph conn="18,34,2,0,8,2,2">
        <action box="1,0,6,2"/>
       </tran_glyph>
      </tran>
      <!--${SMs::Calc::SM::on::ready::DIGIT_1_9}-->
      <tran trig="DIGIT_1_9" target="../../5/4">
       <action>BSP_clear();
BSP_insert(Q_PAR(me));</action>
       <tran_glyph conn="32,34,2,0,8,2,2">
        <action box="1,0,9,2"/>
       </tran_glyph>
      </tran>
      <!--${SMs::Calc::SM::on::ready::POINT}-->
      <tran trig="POINT" target="../../5/5">
       <action>BSP_clear();
BSP_insert((int)'0');
BSP_insert((int)'.');</action>
       <tran_glyph conn="46,34,2,0,4,4,6">
        <action box="0,0,6,2"/>
       </tran_glyph>
      </tran>
      <!--${SMs::Calc::SM::on::ready::OPER}-->
      <tran trig="OPER" target="../../6">
       <action>me-&gt;operand1 = BSP_get_value();
me-&gt;operator = Q_PAR(me);</action>
       <tran_glyph conn="50,20,1,1,36,50,-36">
        <action box="0,-2,6,2"/>
       </tran_glyph>
      </tran>
      <!--${SMs::Calc::SM::on::ready::result}-->
      <state name="result">
       <entry>BSP_message(&quot;result-ENTRY;&quot;);</entry>
       <exit>BSP_message(&quot;result-EXIT;&quot;);</exit>
       <state_glyph node="14,22,10,10">
        <entry box="1,2,5,2"/>
        <exit box="1,4,5,2"/>
       </state_glyph>
      </state>
      <!--${SMs::Calc::SM::on::ready::begin}-->
      <state name="begin">
       <entry>BSP_message(&quot;begin-ENTRY;&quot;);</entry>
       <exit>BSP_message(&quot;begin-EXIT;&quot;);</exit>
       <!--${SMs::Calc::SM::on::ready::begin::OPER}-->
       <tran trig="OPER">
        <!--${SMs::Calc::SM::on::ready::begin::OPER::[e->key=='-']}-->
        <choice target="../../../../5/6">
         <guard brief="e-&gt;key == '-'">Q_PAR(me) == KEY_MINUS</guard>
         <choice_glyph conn="40,30,5,0,32,14">
          <action box="1,0,11,2"/>
         </choice_glyph>
        </choice>
        <!--${SMs::Calc::SM::on::ready::begin::OPER::[else]}-->
        <choice>
         <guard>else</guard>
         <choice_glyph conn="40,30,4,-1,-4,4">
          <action box="1,-3,6,2"/>
         </choice_glyph>
        </choice>
        <tran_glyph conn="30,30,3,-1,10">
         <action box="0,-2,6,2"/>
        </tran_glyph>
       </tran>
       <state_glyph node="30,22,16,10">
        <entry box="1,2,5,2"/>
        <exit box="1,4,5,2"/>
       </state_glyph>
      </state>
      <state_glyph node="8,16,42,18">
       <entry box="1,2,5,2"/>
       <exit box="1,4,5,2"/>
      </state_glyph>
     </state>
     <!--${SMs::Calc::SM::on::operand1}-->
     <state name="operand1">
      <entry>BSP_message(&quot;operand1-ENTRY;&quot;);</entry>
      <exit>BSP_message(&quot;operand1-EXIT;&quot;);</exit>
      <!--${SMs::Calc::SM::on::operand1::CE}-->
      <tran trig="CE" target="../../4/6">
       <action>BSP_clear();</action>
       <tran_glyph conn="78,40,0,1,-16,-32">
        <action box="0,-2,6,2"/>
       </tran_glyph>
      </tran>
      <!--${SMs::Calc::SM::on::operand1::OPER}-->
      <tran trig="OPER" target="../../6">
       <action>me-&gt;operand1 = BSP_get_value();
me-&gt;operator = Q_PAR(me);</action>
       <tran_glyph conn="56,64,2,1,4,-6">
        <action box="-5,-2,6,2"/>
       </tran_glyph>
      </tran>
      <!--${SMs::Calc::SM::on::operand1::EQUALS}-->
      <tran trig="EQUALS" target="../../4/5">
       <tran_glyph conn="10,40,0,3,-14,4">
        <action box="0,-2,6,2"/>
       </tran_glyph>
      </tran>
      <!--${SMs::Calc::SM::on::operand1::zero1}-->
      <state name="zero1">
       <entry>BSP_message(&quot;zero1-ENTRY;&quot;);</entry>
       <exit>BSP_message(&quot;zero1-EXIT;&quot;);</exit>
       <!--${SMs::Calc::SM::on::operand1::zero1::DIGIT_0}-->
       <tran trig="DIGIT_0">
        <action>;</action>
        <tran_glyph conn="12,55,3,-1,10">
         <action box="0,-2,7,2"/>
        </tran_glyph>
       </tran>
       <!--${SMs::Calc::SM::on::operand1::zero1::DIGIT_1_9}-->
       <tran trig="DIGIT_1_9" target="../../4">
        <action>BSP_insert(Q_PAR(me));</action>
        <tran_glyph conn="12,52,3,3,16,-6,2">
         <action box="0,-2,9,2"/>
        </tran_glyph>
       </tran>
       <!--${SMs::Calc::SM::on::operand1::zero1::POINT}-->
       <tran trig="POINT" target="../../5">
        <action>BSP_insert((int)'0');
BSP_insert((int)'.');</action>
        <tran_glyph conn="18,57,2,2,2,38,-2">
         <action box="1,0,6,2"/>
        </tran_glyph>
       </tran>
       <state_glyph node="12,44,14,13">
        <entry box="1,2,5,2"/>
        <exit box="1,4,5,2"/>
       </state_glyph>
      </state>
      <!--${SMs::Calc::SM::on::operand1::int1}-->
      <state name="int1">
       <entry>BSP_message(&quot;int1-ENTRY;&quot;);</entry>
       <exit>BSP_message(&quot;int1-EXIT;&quot;);</exit>
       <!--${SMs::Calc::SM::on::operand1::int1::POINT}-->
       <tran trig="POINT" target="../../5">
        <action>BSP_insert((int)'.');</action>
        <tran_glyph conn="30,52,3,3,16,-6,2">
         <action box="0,-2,6,2"/>
        </tran_glyph>
       </tran>
       <!--${SMs::Calc::SM::on::operand1::int1::DIGIT_0, DIGIT_1_9}-->
       <tran trig="DIGIT_0, DIGIT_1_9">
        <action>BSP_insert(Q_PAR(me));</action>
        <tran_glyph conn="30,55,3,-1,10">
         <action box="0,-2,14,2"/>
        </tran_glyph>
       </tran>
       <state_glyph node="30,44,14,13">
        <entry box="1,2,5,2"/>
        <exit box="1,4,5,2"/>
       </state_glyph>
      </state>
      <!--${SMs::Calc::SM::on::operand1::frac1}-->
      <state name="frac1">
       <entry>BSP_message(&quot;frac1-ENTRY;&quot;);</entry>
       <exit>BSP_message(&quot;frac1-EXIT;&quot;);</exit>
       <!--${SMs::Calc::SM::on::operand1::frac1::POINT}-->
       <tran trig="POINT">
        <action>;</action>
        <tran_glyph conn="48,55,3,-1,10">
         <action box="0,-2,6,2"/>
        </tran_glyph>
       </tran>
       <!--${SMs::Calc::SM::on::operand1::frac1::DIGIT_0, DIGIT_1_9}-->
       <tran trig="DIGIT_0, DIGIT_1_9">
        <action>BSP_insert(Q_PAR(me));</action>
        <tran_glyph conn="48,52,3,-1,10">
         <action box="0,-2,15,2"/>
        </tran_glyph>
       </tran>
       <state_glyph node="48,44,14,13">
        <entry box="1,2,5,2"/>
        <exit box="1,4,5,2"/>
       </state_glyph>
      </state>
      <!--${SMs::Calc::SM::on::operand1::negated1}-->
      <state name="negated1">
       <entry>BSP_message(&quot;negated1-ENTRY;&quot;);
BSP_negate();</entry>
       <exit>BSP_message(&quot;negated1-EXIT;&quot;);</exit>
       <!--${SMs::Calc::SM::on::operand1::negated1::DIGIT_0}-->
       <tran trig="DIGIT_0" target="../../3">
        <action>BSP_insert(Q_PAR(me));</action>
        <tran_glyph conn="66,57,2,2,3,-51,-3">
         <action box="0,0,6,2"/>
        </tran_glyph>
       </tran>
       <!--${SMs::Calc::SM::on::operand1::negated1::DIGIT_1_9}-->
       <tran trig="DIGIT_1_9" target="../../4">
        <action>BSP_insert(Q_PAR(me));</action>
        <tran_glyph conn="73,57,2,2,4,-39,-4">
         <action box="0,0,9,2"/>
        </tran_glyph>
       </tran>
       <!--${SMs::Calc::SM::on::operand1::negated1::POINT}-->
       <tran trig="POINT" target="../../5">
        <action>BSP_insert(Q_PAR(me));</action>
        <tran_glyph conn="81,57,2,2,5,-23,-5">
         <action box="1,0,6,2"/>
        </tran_glyph>
       </tran>
       <!--${SMs::Calc::SM::on::operand1::negated1::OPER}-->
       <tran trig="OPER">
        <!--${SMs::Calc::SM::on::operand1::negated1::OPER::[else]}-->
        <choice>
         <guard>else</guard>
         <choice_glyph conn="74,52,4,-1,-4,5">
          <action box="1,-4,6,2"/>
         </choice_glyph>
        </choice>
        <!--${SMs::Calc::SM::on::operand1::negated1::OPER::[e->key=='-']}-->
        <choice>
         <guard brief="e-&gt;key == '-'">Q_PAR(me) == KEY_MINUS</guard>
         <action>;</action>
         <choice_glyph conn="74,52,5,-1,5">
          <action box="1,0,11,2"/>
         </choice_glyph>
        </choice>
        <tran_glyph conn="64,52,3,-1,10">
         <action box="0,-2,6,2"/>
        </tran_glyph>
       </tran>
       <state_glyph node="64,44,18,13">
        <entry box="1,2,5,2"/>
        <exit box="1,4,5,2"/>
       </state_glyph>
      </state>
      <state_glyph node="8,40,76,24">
       <entry box="1,2,5,2"/>
       <exit box="1,4,5,2"/>
      </state_glyph>
     </state>
     <!--${SMs::Calc::SM::on::opEntered}-->
     <state name="opEntered">
      <entry>BSP_message(&quot;opEntered-ENTRY;&quot;);</entry>
      <exit>BSP_message(&quot;opEntered-EXIT;&quot;);</exit>
      <!--${SMs::Calc::SM::on::opEntered::DIGIT_0}-->
      <tran trig="DIGIT_0" target="../../7/3">
       <action>BSP_clear();</action>
       <tran_glyph conn="27,80,2,0,2,-5,6">
        <action box="1,0,6,2"/>
       </tran_glyph>
      </tran>
      <!--${SMs::Calc::SM::on::opEntered::DIGIT_1_9}-->
      <tran trig="DIGIT_1_9" target="../../7/4">
       <action>BSP_clear();
BSP_insert(Q_PAR(me));</action>
       <tran_glyph conn="34,80,2,0,8">
        <action box="1,0,9,2"/>
       </tran_glyph>
      </tran>
      <!--${SMs::Calc::SM::on::opEntered::POINT}-->
      <tran trig="POINT" target="../../7/5">
       <action>BSP_clear();
BSP_insert((int)'0');
BSP_insert((int)'.');</action>
       <tran_glyph conn="46,80,2,0,3,4,5">
        <action box="0,0,6,2"/>
       </tran_glyph>
      </tran>
      <!--${SMs::Calc::SM::on::opEntered::OPER}-->
      <tran trig="OPER">
       <!--${SMs::Calc::SM::on::opEntered::OPER::[e->key=='-']}-->
       <choice target="../../../7/6">
        <guard brief="e-&gt;key == '-'">Q_PAR(me) == KEY_MINUS</guard>
        <choice_glyph conn="34,76,5,0,38,12">
         <action box="1,0,11,2"/>
        </choice_glyph>
       </choice>
       <!--${SMs::Calc::SM::on::opEntered::OPER::[else]}-->
       <choice>
        <guard>else</guard>
        <choice_glyph conn="34,76,4,-1,-4,4">
         <action box="1,-3,6,2"/>
        </choice_glyph>
       </choice>
       <tran_glyph conn="26,76,3,-1,8">
        <action box="0,-2,6,2"/>
       </tran_glyph>
      </tran>
      <state_glyph node="26,66,24,14">
       <entry box="1,2,5,2"/>
       <exit box="1,4,5,2"/>
      </state_glyph>
     </state>
     <!--${SMs::Calc::SM::on::operand2}-->
     <state name="operand2">
      <entry>BSP_message(&quot;operand2-ENTRY;&quot;);</entry>
      <exit>BSP_message(&quot;operand2-EXIT;&quot;);</exit>
      <!--${SMs::Calc::SM::on::operand2::CE}-->
      <tran trig="CE" target="../../6">
       <action>BSP_clear();</action>
       <tran_glyph conn="78,84,0,1,-12,-28">
        <action box="0,-4,6,2"/>
       </tran_glyph>
      </tran>
      <!--${SMs::Calc::SM::on::operand2::EQUALS}-->
      <tran trig="EQUALS">
       <!--${SMs::Calc::SM::on::operand2::EQUALS::[else]}-->
       <choice target="../../../3">
        <guard>else</guard>
        <choice_glyph conn="4,68,5,3,7">
         <action box="1,0,6,2"/>
        </choice_glyph>
       </choice>
       <!--${SMs::Calc::SM::on::operand2::EQUALS::[BSP_eval()]}-->
       <choice target="../../../4/5">
        <guard brief="BSP_eval()">BSP_eval(me-&gt;operand1, me-&gt;operator, BSP_get_value())</guard>
        <choice_glyph conn="4,68,4,3,-44,10">
         <action box="0,-4,10,2"/>
        </choice_glyph>
       </choice>
       <tran_glyph conn="8,100,3,-1,-4,-32">
        <action box="-4,-2,6,2"/>
       </tran_glyph>
      </tran>
      <!--${SMs::Calc::SM::on::operand2::OPER}-->
      <tran trig="OPER">
       <!--${SMs::Calc::SM::on::operand2::OPER::[else]}-->
       <choice target="../../../3">
        <guard>else</guard>
        <choice_glyph conn="6,77,4,3,-5,5">
         <action box="0,-4,6,2"/>
        </choice_glyph>
       </choice>
       <!--${SMs::Calc::SM::on::operand2::OPER::[BSP_eval()]}-->
       <choice target="../../../6">
        <guard brief="BSP_eval()">BSP_eval(me-&gt;operand1, me-&gt;operator, BSP_get_value())</guard>
        <action>me-&gt;operand1 = BSP_get_value();</action>
        <choice_glyph conn="6,77,5,3,16,-5,4">
         <action box="1,1,10,2"/>
        </choice_glyph>
       </choice>
       <tran_glyph conn="8,96,3,-1,-2,-19">
        <action box="-4,-2,6,2"/>
       </tran_glyph>
      </tran>
      <!--${SMs::Calc::SM::on::operand2::zero2}-->
      <state name="zero2">
       <entry>BSP_message(&quot;zero2-ENTRY;&quot;);</entry>
       <exit>BSP_message(&quot;zero2-EXIT;&quot;);</exit>
       <!--${SMs::Calc::SM::on::operand2::zero2::DIGIT_0}-->
       <tran trig="DIGIT_0">
        <action>;</action>
        <tran_glyph conn="12,99,3,-1,10">
         <action box="0,-2,7,2"/>
        </tran_glyph>
       </tran>
       <!--${SMs::Calc::SM::on::operand2::zero2::DIGIT_1_9}-->
       <tran trig="DIGIT_1_9" target="../../4">
        <action>BSP_insert(Q_PAR(me));</action>
        <tran_glyph conn="12,96,3,3,16,-6,2">
         <action box="0,-2,9,2"/>
        </tran_glyph>
       </tran>
       <!--${SMs::Calc::SM::on::operand2::zero2::POINT}-->
       <tran trig="POINT" target="../../5">
        <action>BSP_insert((int)'0');
BSP_insert((int)'.');</action>
        <tran_glyph conn="18,101,2,2,2,38,-2">
         <action box="1,0,6,2"/>
        </tran_glyph>
       </tran>
       <state_glyph node="12,88,14,13">
        <entry box="1,2,5,2"/>
        <exit box="1,4,5,2"/>
       </state_glyph>
      </state>
      <!--${SMs::Calc::SM::on::operand2::int2}-->
      <state name="int2">
       <entry>BSP_message(&quot;int2-ENTRY;&quot;);</entry>
       <exit>BSP_message(&quot;int2-EXIT;&quot;);</exit>
       <!--${SMs::Calc::SM::on::operand2::int2::POINT}-->
       <tran trig="POINT" target="../../5">
        <action>BSP_insert((int)'.');</action>
        <tran_glyph conn="30,96,3,3,16,-6,2">
         <action box="0,-2,6,2"/>
        </tran_glyph>
       </tran>
       <!--${SMs::Calc::SM::on::operand2::int2::DIGIT_0, DIGIT_1_9}-->
       <tran trig="DIGIT_0, DIGIT_1_9">
        <action>BSP_insert(Q_PAR(me));</action>
        <tran_glyph conn="30,99,3,-1,10">
         <action box="0,-2,14,2"/>
        </tran_glyph>
       </tran>
       <state_glyph node="30,88,14,13">
        <entry box="1,2,5,2"/>
        <exit box="1,4,5,2"/>
       </state_glyph>
      </state>
      <!--${SMs::Calc::SM::on::operand2::frac2}-->
      <state name="frac2">
       <entry>BSP_message(&quot;frac2-ENTRY;&quot;);</entry>
       <exit>BSP_message(&quot;frac2-EXIT;&quot;);</exit>
       <!--${SMs::Calc::SM::on::operand2::frac2::POINT}-->
       <tran trig="POINT">
        <action>;</action>
        <tran_glyph conn="48,99,3,-1,10">
         <action box="0,-2,6,2"/>
        </tran_glyph>
       </tran>
       <!--${SMs::Calc::SM::on::operand2::frac2::DIGIT_0, DIGIT_1_9}-->
       <tran trig="DIGIT_0, DIGIT_1_9">
        <action>BSP_insert(Q_PAR(me));</action>
        <tran_glyph conn="48,96,3,-1,10">
         <action box="0,-2,15,2"/>
        </tran_glyph>
       </tran>
       <state_glyph node="48,88,14,13">
        <entry box="1,2,5,2"/>
        <exit box="1,4,5,2"/>
       </state_glyph>
      </state>
      <!--${SMs::Calc::SM::on::operand2::negated2}-->
      <state name="negated2">
       <entry>BSP_message(&quot;negated2-ENTRY;&quot;);
BSP_negate();</entry>
       <exit>BSP_message(&quot;negated2-EXIT;&quot;);</exit>
       <!--${SMs::Calc::SM::on::operand2::negated2::DIGIT_0}-->
       <tran trig="DIGIT_0" target="../../3">
        <action>BSP_insert(Q_PAR(me));</action>
        <tran_glyph conn="66,101,2,2,3,-51,-3">
         <action box="0,0,6,2"/>
        </tran_glyph>
       </tran>
       <!--${SMs::Calc::SM::on::operand2::negated2::DIGIT_1_9}-->
       <tran trig="DIGIT_1_9" target="../../4">
        <action>BSP_insert(Q_PAR(me));</action>
        <tran_glyph conn="73,101,2,2,4,-37,-4">
         <action box="0,0,9,2"/>
        </tran_glyph>
       </tran>
       <!--${SMs::Calc::SM::on::operand2::negated2::POINT}-->
       <tran trig="POINT" target="../../5">
        <action>BSP_insert(Q_PAR(me));</action>
        <tran_glyph conn="80,101,2,2,5,-28,-5">
         <action box="1,0,6,2"/>
        </tran_glyph>
       </tran>
       <!--${SMs::Calc::SM::on::operand2::negated2::OPER}-->
       <tran trig="OPER">
        <!--${SMs::Calc::SM::on::operand2::negated2::OPER::[else]}-->
        <choice>
         <guard>else</guard>
         <choice_glyph conn="74,97,4,-1,-4,5">
          <action box="1,-4,6,2"/>
         </choice_glyph>
        </choice>
        <!--${SMs::Calc::SM::on::operand2::negated2::OPER::[e->key=='-']}-->
        <choice>
         <guard brief="e-&gt;key == '-'">Q_PAR(me) == KEY_MINUS</guard>
         <action>;</action>
         <choice_glyph conn="74,97,5,-1,5">
          <action box="1,0,11,2"/>
         </choice_glyph>
        </choice>
        <tran_glyph conn="64,97,3,-1,10">
         <action box="0,-2,6,2"/>
        </tran_glyph>
       </tran>
       <state_glyph node="64,88,18,13">
        <entry box="1,2,5,2"/>
        <exit box="1,4,5,2"/>
       </state_glyph>
      </state>
      <state_glyph node="8,84,76,24">
       <entry box="1,2,5,2"/>
       <exit box="1,4,5,2"/>
      </state_glyph>
     </state>
     <state_glyph node="2,4,86,106">
      <entry box="1,2,5,2"/>
      <exit box="1,4,5,2"/>
     </state_glyph>
    </state>
    <!--${SMs::Calc::SM::final}-->
    <state name="final">
     <entry>BSP_message(&quot;final-ENTRY;&quot;);
BSP_exit();</entry>
     <state_glyph node="2,111,17,6">
      <entry box="1,2,5,2"/>
     </state_glyph>
    </state>
    <state_diagram size="92,119"/>
   </statechart>
  </class>
  <!--${SMs::Calc_ctor}-->
  <operation name="Calc_ctor" type="void" visibility="0x00" properties="0x00">
   <documentation>constructor</documentation>
   <code>Calc *me = &amp;l_calc;
QHsm_ctor(&amp;me-&gt;super, Q_STATE_CAST(&amp;Calc_initial));</code>
  </operation>
 </package>
 <!--${.}-->
 <directory name=".">
  <!--${.::calc.h}-->
  <file name="calc.h">
   <text>#ifndef CALC_H
#define CALC_H

enum CalcSignals {
    C_SIG = Q_USER_SIG,
    CE_SIG,
    DIGIT_0_SIG,
    DIGIT_1_9_SIG,
    POINT_SIG,
    OPER_SIG,
    EQUALS_SIG,
    OFF_SIG
};

$declare(SMs::Calc_ctor)

extern QHsm * const the_calc;  /* &quot;opaque&quot; pointer to calculator HSM */

#endif /* CALC_H */</text>
  </file>
  <!--${.::calc.c}-->
  <file name="calc.c">
   <text>#include &quot;qpn.h&quot;   /* QP-nano */
#include &quot;bsp.h&quot;   /* Board Support Package */
#include &quot;calc.h&quot;  /* this applicatin */

$declare(SMs::Calc)

static Calc l_calc;    /* the only instance of the Calc class */

/* global-scope definitions ---------------------------------------*/
QHsm * const the_calc = &amp;l_calc.super; /* &quot;opaque&quot; pointer to HSM */

$define(SMs::Calc_ctor)
$define(SMs::Calc)</text>
  </file>
 </directory>
</model>
