[547887]Adding Adapter Test for Transitions
Adding a Test FB for testing internal transitions with events from
adapters.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=547887
Change-Id: I39a9b8b5f89ff44552530a51186a76469170ae5f
Signed-off-by: Jan Holzweber <j.holzweber@gmx.at>
diff --git a/SystemTests/testfbforcodegenerator/Adapters/AdapterTransition.fbt b/SystemTests/testfbforcodegenerator/Adapters/AdapterTransition.fbt
new file mode 100644
index 0000000..6dbb5e0
--- /dev/null
+++ b/SystemTests/testfbforcodegenerator/Adapters/AdapterTransition.fbt
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE FBType SYSTEM "http://www.holobloc.com/xml/LibraryElement.dtd">
+<FBType Comment="Template for an empty basic function block" Name="AdapterTransition">
+ <Identification Description="Copyright (c) 2019 Jan Holzweber This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at https://www.eclipse.org/legal/epl-2.0/ SPDX-License-Identifier: EPL-2.0" Standard="61499-2"/>
+ <VersionInfo Author="Jan Holzweber" Date="2019-06-21" Version="1.0"/>
+ <InterfaceList>
+ <EventInputs>
+ <Event Comment="" Name="EI" Type="Event"/>
+ </EventInputs>
+ <EventOutputs>
+ <Event Comment="" Name="EO" Type="Event"/>
+ </EventOutputs>
+ <Plugs>
+ <AdapterDeclaration Comment="" Name="ATimeOut" Type="ATimeOut"/>
+ </Plugs>
+ </InterfaceList>
+ <BasicFB>
+ <ECC>
+ <ECState Comment="Initial State" Name="START" x="550.0" y="425.0"/>
+ <ECState Comment="" Name="State" x="2680.0" y="905.0">
+ <ECAction Output="ATimeOut.START"/>
+ </ECState>
+ <ECState Comment="" Name="State_1" x="1585.0" y="1700.0">
+ <ECAction Output="EO"/>
+ </ECState>
+ <ECTransition Comment="" Condition="EI" Destination="State" Source="START" x="1760.0" y="715.0"/>
+ <ECTransition Comment="" Condition="ATimeOut.TimeOut" Destination="State_1" Source="State" x="2230.0" y="1355.0"/>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State_1" x="1175.0" y="1145.0"/>
+ </ECC>
+ </BasicFB>
+</FBType>
diff --git a/SystemTests/testfbforcodegenerator/Adapters/AdapterTransition2.fbt b/SystemTests/testfbforcodegenerator/Adapters/AdapterTransition2.fbt
new file mode 100644
index 0000000..b732ada
--- /dev/null
+++ b/SystemTests/testfbforcodegenerator/Adapters/AdapterTransition2.fbt
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE FBType SYSTEM "http://www.holobloc.com/xml/LibraryElement.dtd">
+<FBType Comment="Template for an empty basic function block" Name="AdapterTransition2">
+ <Identification Description="Copyright (c) 2019 Jan Holzweber This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at https://www.eclipse.org/legal/epl-2.0/ SPDX-License-Identifier: EPL-2.0" Standard="61499-2"/>
+ <VersionInfo Author="Jan Holzweber" Date="2019-06-21" Version="1.0"/>
+ <InterfaceList>
+ <EventInputs>
+ <Event Comment="" Name="SendTimeout" Type="Event"/>
+ </EventInputs>
+ <EventOutputs>
+ <Event Comment="" Name="Start" Type="Event"/>
+ <Event Comment="" Name="Stop" Type="Event"/>
+ </EventOutputs>
+ <Sockets>
+ <AdapterDeclaration Comment="" Name="ATimeOut" Type="ATimeOut"/>
+ </Sockets>
+ </InterfaceList>
+ <BasicFB>
+ <ECC>
+ <ECState Comment="Initial State" Name="START" x="550.0" y="425.0"/>
+ <ECState Comment="" Name="State" x="2200.0" y="700.0">
+ <ECAction Output="Start"/>
+ </ECState>
+ <ECState Comment="" Name="State_1" x="1800.0" y="1800.0">
+ <ECAction Output="Stop"/>
+ </ECState>
+ <ECState Comment="" Name="State_2" x="520.0" y="2405.0">
+ <ECAction Output="ATimeOut.TimeOut"/>
+ </ECState>
+ <ECTransition Comment="" Condition="ATimeOut.START" Destination="State" Source="START" x="1505.0" y="620.0"/>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State" x="2030.0" y="215.0"/>
+ <ECTransition Comment="" Condition="ATimeOut.STOP" Destination="State_1" Source="START" x="1290.0" y="1195.0"/>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State_1" x="870.0" y="1445.0"/>
+ <ECTransition Comment="" Condition="SendTimeout" Destination="State_2" Source="START" x="645.0" y="1475.0"/>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State_2" x="425.0" y="1520.0"/>
+ </ECC>
+ </BasicFB>
+</FBType>