Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2b9968a

Browse files
authored
Explicitly use parent-first execution, otherwise sctunit tests won't … (#244)
* Explicitly use parent-first execution, otherwise sctunit tests won't workWith child-first execution, two cycles are required for transitions that check userInput, because statechart local reactions are performed AFTER state transitions* Explicitly use parent-first execution, otherwise sctunit tests won't workWith child-first execution, the statechart directly runs into On state without waiting for a user event...
1 parent02dd649 commit2b9968a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎com.yakindu.sct.examples.coffeemachine.c/model/CoffeeMachine.ysc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<xmi:XMIxmi:version="2.0"xmlns:xmi="http://www.omg.org/XMI"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation"xmlns:sgraph="http://www.yakindu.org/sct/sgraph/2.0.0">
3-
<sgraph:Statechartxmi:id="_O39IYAClEea895739UzP5A"specification="@CycleBased(200)&#xA;&#xA;import :&quot;../src/cm_hmi.h&quot;&#xA;import :&quot;../src/coffee_machine.h&quot;&#xA;&#xA;interface:&#xA;&#xA;in event userEvent : UserEvents&#xA;&#xA;internal:&#xA;&#xA;var recipe : cm_recipe_t&#xA;var lastChoice : UserEvents = UserEvents.NONE&#xA;var processing : bool = false&#xA;&#xA;// we store the value of the user event&#xA;var userInput : UserEvents&#xA;always / userInput = UserEvents.NONE&#xA;userEvent / userInput = valueof (userEvent)&#xA;&#xA;&#xA;/* we simulate the heater here */&#xA;every 200ms / updateHeating(2)&#xA;&#xA;/* processing user feedback */&#xA;every 500ms [processing]/ show(&quot;.&quot;)"name="CoffeeMachine"domainID="com.yakindu.domain.c">
3+
<sgraph:Statechartxmi:id="_O39IYAClEea895739UzP5A"specification="@CycleBased(200)&#xA;@ParentFirstExecution&#xA;&#xA;import :&quot;../src/cm_hmi.h&quot;&#xA;import :&quot;../src/coffee_machine.h&quot;&#xA;&#xA;interface:&#xA;&#xA;in event userEvent : UserEvents&#xA;&#xA;internal:&#xA;&#xA;var recipe : cm_recipe_t&#xA;var lastChoice : UserEvents = UserEvents.NONE&#xA;var processing : bool = false&#xA;&#xA;// we store the value of the user event&#xA;var userInput : UserEvents&#xA;always / userInput = UserEvents.NONE&#xA;userEvent / userInput = valueof (userEvent)&#xA;&#xA;&#xA;/* we simulate the heater here */&#xA;every 200ms / updateHeating(2)&#xA;&#xA;/* processing user feedback */&#xA;every 500ms [processing]/ show(&quot;.&quot;)"name="CoffeeMachine"domainID="com.yakindu.domain.c">
44
<regionsxmi:id="_O4n2wAClEea895739UzP5A"name="main">
55
<verticesxsi:type="sgraph:Entry"xmi:id="_O58scAClEea895739UzP5A">
66
<outgoingTransitionsxmi:id="_O6HrkAClEea895739UzP5A"target="_O5_vwAClEea895739UzP5A"/>

‎com.yakindu.sct.examples.coffeemachine.cpp/model/CoffeeMachineCpp.ysc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<xmi:XMIxmi:version="2.0"xmlns:xmi="http://www.omg.org/XMI"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation"xmlns:sgraph="http://www.yakindu.org/sct/sgraph/2.0.0">
3-
<sgraph:Statechartxmi:id="_O39IYAClEea895739UzP5A"specification="@EventDriven&#xA;&#xA;import:&quot;../src/CoffeeMachine.hpp&quot;&#xA;import :&quot;../src/CMHMI.hpp&quot;&#xA;&#xA;interface:&#xA;&#xA;in event userEvent : CM_HMI.UserEvents&#xA;var cm : Coffee_Machine&#xA;var hmi : CM_HMI&#xA;&#xA;internal:&#xA;&#xA;var recipe:Coffee_Machine.cm_recipe_t&#xA;var lastChoice : CM_HMI.UserEvents&#xA;var processing : bool = false&#xA;&#xA;// we store the value of the user event&#xA;var userInput :CM_HMI.UserEvents&#xA;always / userInput =CM_HMI. UserEvents.NONE&#xA;userEvent / userInput = valueof (userEvent)&#xA;&#xA;&#xA;/* we simulate the heater here */&#xA;every 200ms / cm.updateHeating(2)&#xA;&#xA;/* processing user feedback */&#xA;every 500ms [processing]/ hmi.show(&quot;.&quot;)"name="CoffeeMachineCpp"domainID="com.yakindu.domain.c">
3+
<sgraph:Statechartxmi:id="_O39IYAClEea895739UzP5A"specification="@EventDriven&#xA;@ParentFirstExecution&#xA;&#xA;import:&quot;../src/CoffeeMachine.hpp&quot;&#xA;import :&quot;../src/CMHMI.hpp&quot;&#xA;&#xA;interface:&#xA;&#xA;in event userEvent : CM_HMI.UserEvents&#xA;var cm : Coffee_Machine&#xA;var hmi : CM_HMI&#xA;&#xA;internal:&#xA;&#xA;var recipe:Coffee_Machine.cm_recipe_t&#xA;var lastChoice : CM_HMI.UserEvents&#xA;var processing : bool = false&#xA;&#xA;// we store the value of the user event&#xA;var userInput :CM_HMI.UserEvents&#xA;always / userInput =CM_HMI. UserEvents.NONE&#xA;userEvent / userInput = valueof (userEvent)&#xA;&#xA;&#xA;/* we simulate the heater here */&#xA;every 200ms / cm.updateHeating(2)&#xA;&#xA;/* processing user feedback */&#xA;every 500ms [processing]/ hmi.show(&quot;.&quot;)"name="CoffeeMachineCpp"domainID="com.yakindu.domain.c">
44
<regionsxmi:id="_O4n2wAClEea895739UzP5A"name="main">
55
<verticesxsi:type="sgraph:Entry"xmi:id="_O58scAClEea895739UzP5A">
66
<outgoingTransitionsxmi:id="_O6HrkAClEea895739UzP5A"target="_O5_vwAClEea895739UzP5A"/>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp