Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Haug2018-02-05 17:40:59 +0000
committerJuergen Haug2018-02-05 19:36:04 +0000
commit13968fee4fe90ead866af91f635bfa067e0cb6f8 (patch)
treef6a7fc7273d9205ad93be95ed879a17c1351536c /runtime
parentbf57ff2b489e79cb585eb3a69e3275031358f94c (diff)
parentf6d683be58e7d0ad5332b5ded57ec4dd33c59f0f (diff)
downloadorg.eclipse.etrice-13968fee4fe90ead866af91f635bfa067e0cb6f8.tar.gz
org.eclipse.etrice-13968fee4fe90ead866af91f635bfa067e0cb6f8.tar.xz
org.eclipse.etrice-13968fee4fe90ead866af91f635bfa067e0cb6f8.zip
Merge branch 'master' into newfsmgen_finalize
with conflicts... Change-Id: I4d06be6132abcdfbf53ea078e65373b42b2541f9
Diffstat (limited to 'runtime')
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/model/Tests.room131
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/model/diagrams/room.basic.etunit.TestCaseActor.behavior284
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/model/diagrams/room.basic.etunit.TestLifecycleActor.behavior200
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/container/etStaticDeque.c12
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/container/etStaticDeque.h40
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/osal/etSocket.h63
6 files changed, 186 insertions, 544 deletions
diff --git a/runtime/org.eclipse.etrice.modellib.c/model/Tests.room b/runtime/org.eclipse.etrice.modellib.c/model/Tests.room
index d39ab3f3f..b503022f6 100644
--- a/runtime/org.eclipse.etrice.modellib.c/model/Tests.room
+++ b/runtime/org.eclipse.etrice.modellib.c/model/Tests.room
@@ -1,7 +1,7 @@
RoomModel room.basic.test {
-
+
import room.basic.service.timing.* from "TimingService.room"
- import room.basic.types.* from "Types.room"
+ import room.basic.types.* from "Types.room"
/**
* A SubSystemClass or ActorClass having this annotation is construed as an instance.<br>
@@ -11,68 +11,155 @@ RoomModel room.basic.test {
* </p>
*/
AnnotationType TestInstance {
- target = { SubSystemClass, ActorClass }
+ target = { SubSystemClass, ActorClass
+ }
}
+ /**
+ * SequentialTestExecutor that can started/aborted via exeControl.
+ */
+ ActorClass ControllableSequentialTestExecutor {
+ Interface {
+
+ // control execution
+ Port exeControl: PTestControl
+
+ // tests
+ conjugated Port control[*]: PTestControl
+ }
+ Structure {
+ external Port exeControl
+ external Port control
+ Attribute current: int16
+ Attribute overallSuccess: boolean
+ }
+ Behavior {
+ StateMachine {
+ State execute {
+ }
+
+ Transition init0: initial -> idle
+ State idle {
+ entry '''
+ current = 0;
+ overallSuccess = true;
+ '''
+ }
+ Transition tr0: idle -> cp cp1 {
+ triggers {
+ <start: exeControl>
+ }
+ }
+ Transition tr1: execute -> aborted {
+ triggers {
+ <abort: exeControl>
+ }
+ action '''
+ control[current].abort();
+ '''
+ }
+ State aborted
+ ChoicePoint cp0
+ ChoicePoint cp1
+ Transition tr2: execute -> cp cp0 {
+ triggers {
+ <done: control>
+ }
+ action '''
+ overallSuccess &= success;
+ current++;'''
+ }
+ Transition tr3: cp cp0 -> idle {
+ action '''exeControl.done(overallSuccess);'''
+ }
+ Transition tr4: cp cp0 -> execute {
+ cond '''current < self->constData->control.size'''
+ action '''control[current].start();'''
+ }
+ Transition tr5: cp cp1 -> idle {
+ action '''exeControl.done(overallSuccess);'''
+ }
+ Transition tr6: cp cp1 -> execute {
+ cond '''current < self->constData->control.size'''
+ action '''control[current].start();'''
+ }
+ Transition tr7: aborted -> idle {
+ triggers {
+ <done: control>
+ }
+ action '''
+ exeControl.done(false);
+ '''
+ }
+ }
+ }
+ }
+
+ /**
+ * SequentialTestExecutor that starts automatically.
+ */
ActorClass SequentialTestExecutor {
Interface {
conjugated Port control[*]: PTestControl
-
}
Structure {
usercode3 {
"#include \"etUnit/etUnit.h\""
}
- external Port control
- Attribute next : int16
+ external Port control
+ Attribute current: int16
}
Behavior {
StateMachine {
State execute {
- entry
-
- {
- "if(next < self->constData->control.size){"
- "\tcontrol[next++].start();"
- "} else {"
- "\tetUnit_testFinished(0);"
- "}"
- }
+ entry '''
+ if(current < self->constData->control.size){
+ control[current].start();
+ } else {
+ etUnit_close();
+ etUnit_testFinished(0);
+ }
+ '''
+ }
+ Transition init0: initial -> execute {
+ action '''
+ current = 0;
+ etUnit_open("log", "results");
+ '''
}
- Transition init0: initial -> execute
- {
- }
Transition tr0: execute -> execute {
triggers {
<done: control>
}
+ action '''current++;'''
}
}
}
}
-
+
ProtocolClass PTestControl {
incoming {
+
/**
* Start test execution.
*/
Message start()
-
+
/**
* Abort test execution.
*/
Message abort()
}
outgoing {
+
/**
* Test execution finished or aborted.
*/
- Message done(success : boolean)
+ Message done(success: boolean)
}
// semantics {
// in:start -> out:done
// in:abort -> out:done
// }
}
-
} \ No newline at end of file
diff --git a/runtime/org.eclipse.etrice.modellib.c/model/diagrams/room.basic.etunit.TestCaseActor.behavior b/runtime/org.eclipse.etrice.modellib.c/model/diagrams/room.basic.etunit.TestCaseActor.behavior
deleted file mode 100644
index b771c8fca..000000000
--- a/runtime/org.eclipse.etrice.modellib.c/model/diagrams/room.basic.etunit.TestCaseActor.behavior
+++ /dev/null
@@ -1,284 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" gridUnit="10" diagramTypeId="room.behavior" name="Behavior of TestCaseActor" pictogramLinks="//@link //@children.0/@link //@children.0/@children.1/@link //@children.0/@children.2/@link //@children.0/@children.3/@link //@children.0/@children.4/@link //@children.0/@children.5/@link //@children.1/@link //@children.1/@children.1/@link //@children.0/@children.2/@children.1/@link //@connections.0/@link //@connections.1/@link //@connections.2/@link //@connections.3/@link" verticalGridUnit="10" version="0.11.0">
- <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/>
- <link>
- <businessObjects href="../Tests.room#ActorClass:TestCaseActor"/>
- </link>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="sg"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="4" transparency="0.5" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../Tests.room#StateGraph:TestCaseActor$sg"/>
- </link>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="800" height="80" y="40" font="//@fonts.1" horizontalAlignment="ALIGNMENT_RIGHT" verticalAlignment="ALIGNMENT_TOP" value="/"/>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="trp"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="40" height="40" x="100" y="100">
- <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="20" height="20" x="10" y="10"/>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../Tests.room#StateGraph:TestCaseActor$sg"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="40" height="20" y="10" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="I"/>
- </children>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="state"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="173" height="122" x="260" y="210">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="113" height="62" x="30" y="30" cornerHeight="20" cornerWidth="20">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="true" transparency="0.0" width="15" height="8" x="88" y="3" cornerHeight="5" cornerWidth="5"/>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="56" y="56">
- <points x="-3" y="-3"/>
- <points x="-3" y="3"/>
- <points x="-11" y="3"/>
- </graphicsAlgorithmChildren>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="56" y="56">
- <points x="3" y="-3"/>
- <points x="3" y="3"/>
- <points x="11" y="3"/>
- </graphicsAlgorithmChildren>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="56" y="56">
- <points x="-2" y="-3"/>
- <points x="-2" y="3"/>
- <points x="2" y="3"/>
- <points x="2" y="-3"/>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../Tests.room#SimpleState:TestCaseActor$testing"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.2" incomingConnections="//@connections.3" referencedGraphicsAlgorithm="//@children.0/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="113" height="62" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="testing"/>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="trp"/>
- <properties key="item-kind" value="extp"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="62" y="62">
- <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="11" height="11" x="25" y="25"/>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0" x="25" y="25">
- <points x="5"/>
- <points x="11" y="5"/>
- <points x="5" y="11"/>
- <points y="5"/>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../Tests.room#ExitPoint:TestCaseActor$testing$tpFinish"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.1"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="22" y="37" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" verticalAlignment="ALIGNMENT_TOP" value="tpFinish"/>
- </children>
- </children>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="state"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="120" height="90" x="580" y="226">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="35" y="3" cornerHeight="5" cornerWidth="5"/>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="true" transparency="0.0" x="30" y="24">
- <points x="-3" y="-3"/>
- <points x="-3" y="3"/>
- <points x="-11" y="3"/>
- </graphicsAlgorithmChildren>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
- <points x="3" y="-3"/>
- <points x="3" y="3"/>
- <points x="11" y="3"/>
- </graphicsAlgorithmChildren>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
- <points x="-2" y="-3"/>
- <points x="-2" y="3"/>
- <points x="2" y="3"/>
- <points x="2" y="-3"/>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../Tests.room#SimpleState:TestCaseActor$timeout"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.2" referencedGraphicsAlgorithm="//@children.0/@children.3/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="timeout"/>
- </children>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="state"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="120" height="90" x="294" y="412">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="35" y="3" cornerHeight="5" cornerWidth="5"/>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="true" transparency="0.0" x="30" y="24">
- <points x="-3" y="-3"/>
- <points x="-3" y="3"/>
- <points x="-11" y="3"/>
- </graphicsAlgorithmChildren>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
- <points x="3" y="-3"/>
- <points x="3" y="3"/>
- <points x="11" y="3"/>
- </graphicsAlgorithmChildren>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
- <points x="-2" y="-3"/>
- <points x="-2" y="3"/>
- <points x="2" y="3"/>
- <points x="2" y="-3"/>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../Tests.room#SimpleState:TestCaseActor$finish"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.1" referencedGraphicsAlgorithm="//@children.0/@children.4/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="finish"/>
- </children>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="state"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="120" height="90" x="260" y="75">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="35" y="3" cornerHeight="5" cornerWidth="5"/>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
- <points x="-3" y="-3"/>
- <points x="-3" y="3"/>
- <points x="-11" y="3"/>
- </graphicsAlgorithmChildren>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="true" transparency="0.0" x="30" y="24">
- <points x="3" y="-3"/>
- <points x="3" y="3"/>
- <points x="11" y="3"/>
- </graphicsAlgorithmChildren>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
- <points x="-2" y="-3"/>
- <points x="-2" y="3"/>
- <points x="2" y="3"/>
- <points x="2" y="-3"/>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../Tests.room#SimpleState:TestCaseActor$wait4Start"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.3" incomingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.5/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="wait4Start"/>
- </children>
- </children>
- </children>
- <children xsi:type="pi:ContainerShape" active="true">
- <properties key="obj-type" value="sg"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="4" transparency="0.5" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../Tests.room#StateGraph:TestCaseActor$testing$sg"/>
- </link>
- <children>
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="800" height="80" y="40" font="//@fonts.1" horizontalAlignment="ALIGNMENT_RIGHT" verticalAlignment="ALIGNMENT_TOP" value="/testing"/>
- </children>
- <children xsi:type="pi:ContainerShape" active="true">
- <properties key="obj-type" value="trp"/>
- <properties key="item-kind" value="extp"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="80" height="80" x="378" y="500">
- <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="20" height="20" x="30" y="30"/>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="2" filled="true" transparency="0.0" x="30" y="30">
- <points x="10"/>
- <points x="20" y="10"/>
- <points x="10" y="20"/>
- <points y="10"/>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../Tests.room#ExitPoint:TestCaseActor$testing$tpFinish"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor"/>
- <children>
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="80" height="30" y="50" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" verticalAlignment="ALIGNMENT_TOP" value="tpFinish"/>
- </children>
- </children>
- </children>
- <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.1/@anchors.0" end="//@children.0/@children.5/@anchors.0">
- <properties key="obj-type" value="trans"/>
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
- <link>
- <businessObjects href="../Tests.room#InitialTransition:TestCaseActor$initial"/>
- </link>
- <connectionDecorators visible="true" locationRelative="true" location="1.0">
- <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0">
- <points x="-15" y="5"/>
- <points/>
- <points x="-15" y="-5"/>
- </graphicsAlgorithm>
- </connectionDecorators>
- <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="init"/>
- </connectionDecorators>
- </connections>
- <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.2/@children.1/@anchors.0" end="//@children.0/@children.4/@anchors.0">
- <properties key="obj-type" value="trans"/>
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
- <link>
- <businessObjects href="../Tests.room#ContinuationTransition:TestCaseActor$trFinish"/>
- </link>
- <connectionDecorators visible="true" locationRelative="true" location="1.0">
- <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0">
- <points x="-15" y="5"/>
- <points/>
- <points x="-15" y="-5"/>
- </graphicsAlgorithm>
- </connectionDecorators>
- <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="trFinish: "/>
- </connectionDecorators>
- </connections>
- <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.2/@anchors.0" end="//@children.0/@children.3/@anchors.0">
- <properties key="obj-type" value="trans"/>
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
- <link>
- <businessObjects href="../Tests.room#TriggeredTransition:TestCaseActor$trTimeout"/>
- </link>
- <connectionDecorators visible="true" locationRelative="true" location="1.0">
- <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0">
- <points x="-15" y="5"/>
- <points/>
- <points x="-15" y="-5"/>
- </graphicsAlgorithm>
- </connectionDecorators>
- <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="trTimeout: &lt;timeout:..."/>
- </connectionDecorators>
- </connections>
- <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.5/@anchors.0" end="//@children.0/@children.2/@anchors.0">
- <properties key="obj-type" value="trans"/>
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
- <link>
- <businessObjects href="../Tests.room#TriggeredTransition:TestCaseActor$tr0"/>
- </link>
- <connectionDecorators visible="true" locationRelative="true" location="1.0">
- <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0">
- <points x="-15" y="5"/>
- <points/>
- <points x="-15" y="-5"/>
- </graphicsAlgorithm>
- </connectionDecorators>
- <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr0: &lt;startTestCase:..."/>
- </connectionDecorators>
- </connections>
- <colors red="227" green="238" blue="249"/>
- <colors red="255" green="255" blue="255"/>
- <colors/>
- <colors red="200" green="200" blue="200"/>
- <fonts name="Arial" size="8"/>
- <fonts name="Arial" size="9" bold="true"/>
-</pi:Diagram>
diff --git a/runtime/org.eclipse.etrice.modellib.c/model/diagrams/room.basic.etunit.TestLifecycleActor.behavior b/runtime/org.eclipse.etrice.modellib.c/model/diagrams/room.basic.etunit.TestLifecycleActor.behavior
deleted file mode 100644
index bb74dc57b..000000000
--- a/runtime/org.eclipse.etrice.modellib.c/model/diagrams/room.basic.etunit.TestLifecycleActor.behavior
+++ /dev/null
@@ -1,200 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" gridUnit="10" diagramTypeId="room.behavior" name="Behavior of TestLifecycleActor" pictogramLinks="//@link //@children.0/@link //@children.0/@children.1/@link //@children.0/@children.2/@link //@children.0/@children.3/@link //@children.0/@children.4/@link //@connections.0/@link //@connections.1/@link //@connections.2/@link //@connections.3/@link //@connections.4/@link" verticalGridUnit="10" version="0.11.0">
- <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/>
- <link>
- <businessObjects href="../Tests.room#ActorClass:TestLifecycleActor"/>
- </link>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="sg"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="4" transparency="0.5" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../Tests.room#StateGraph:TestLifecycleActor$sg"/>
- </link>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="800" height="80" y="40" font="//@fonts.1" horizontalAlignment="ALIGNMENT_RIGHT" verticalAlignment="ALIGNMENT_TOP" value="/"/>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="trp"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="40" height="40" x="100" y="100">
- <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="20" height="20" x="10" y="10"/>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../Tests.room#StateGraph:TestLifecycleActor$sg"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="40" height="20" y="10" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="I"/>
- </children>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="state"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="120" height="90" x="206" y="120">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="35" y="3" cornerHeight="5" cornerWidth="5"/>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="30" y="24">
- <points x="-3" y="-3"/>
- <points x="-3" y="3"/>
- <points x="-11" y="3"/>
- </graphicsAlgorithmChildren>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
- <points x="3" y="-3"/>
- <points x="3" y="3"/>
- <points x="11" y="3"/>
- </graphicsAlgorithmChildren>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
- <points x="-2" y="-3"/>
- <points x="-2" y="3"/>
- <points x="2" y="3"/>
- <points x="2" y="-3"/>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../Tests.room#SimpleState:TestLifecycleActor$idle"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.1 //@connections.2" incomingConnections="//@connections.0 //@connections.3"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="idle"/>
- </children>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="state"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="120" height="90" x="472" y="120">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="35" y="3" cornerHeight="5" cornerWidth="5"/>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="true" transparency="0.0" x="30" y="24">
- <points x="-3" y="-3"/>
- <points x="-3" y="3"/>
- <points x="-11" y="3"/>
- </graphicsAlgorithmChildren>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
- <points x="3" y="-3"/>
- <points x="3" y="3"/>
- <points x="11" y="3"/>
- </graphicsAlgorithmChildren>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
- <points x="-2" y="-3"/>
- <points x="-2" y="3"/>
- <points x="2" y="3"/>
- <points x="2" y="-3"/>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../Tests.room#SimpleState:TestLifecycleActor$terminate"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.2 //@connections.4" referencedGraphicsAlgorithm="//@children.0/@children.3/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="terminate"/>
- </children>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="trp"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="50" height="50" x="375" y="265">
- <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="25" height="25" x="12" y="12"/>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../Tests.room#ChoicePoint:TestLifecycleActor$cp0"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.3 //@connections.4" incomingConnections="//@connections.1"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="50" height="25" y="12" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="C"/>
- </children>
- </children>
- </children>
- <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.1/@anchors.0" end="//@children.0/@children.2/@anchors.0">
- <properties key="obj-type" value="trans"/>
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
- <link>
- <businessObjects href="../Tests.room#InitialTransition:TestLifecycleActor$initial"/>
- </link>
- <connectionDecorators visible="true" locationRelative="true" location="1.0">
- <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0">
- <points x="-15" y="5"/>
- <points/>
- <points x="-15" y="-5"/>
- </graphicsAlgorithm>
- </connectionDecorators>
- <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="init"/>
- </connectionDecorators>
- </connections>
- <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.2/@anchors.0" end="//@children.0/@children.4/@anchors.0">
- <properties key="obj-type" value="trans"/>
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
- <link>
- <businessObjects href="../Tests.room#TriggeredTransition:TestLifecycleActor$tr1"/>
- </link>
- <connectionDecorators visible="true" locationRelative="true" location="1.0">
- <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0">
- <points x="-15" y="5"/>
- <points/>
- <points x="-15" y="-5"/>
- </graphicsAlgorithm>
- </connectionDecorators>
- <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr1: &lt;finishedTestCa..."/>
- </connectionDecorators>
- </connections>
- <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.2/@anchors.0" end="//@children.0/@children.3/@anchors.0">
- <properties key="obj-type" value="trans"/>
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
- <link>
- <businessObjects href="../Tests.room#TriggeredTransition:TestLifecycleActor$tr2"/>
- </link>
- <connectionDecorators visible="true" locationRelative="true" location="1.0">
- <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0">
- <points x="-15" y="5"/>
- <points/>
- <points x="-15" y="-5"/>
- </graphicsAlgorithm>
- </connectionDecorators>
- <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr2: &lt;timeout:timer>"/>
- </connectionDecorators>
- </connections>
- <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.4/@anchors.0" end="//@children.0/@children.2/@anchors.0">
- <properties key="obj-type" value="trans"/>
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
- <link>
- <businessObjects href="../Tests.room#ContinuationTransition:TestLifecycleActor$tr3"/>
- </link>
- <connectionDecorators visible="true" locationRelative="true" location="1.0">
- <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0">
- <points x="-15" y="5"/>
- <points/>
- <points x="-15" y="-5"/>
- </graphicsAlgorithm>
- </connectionDecorators>
- <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr3: [else]"/>
- </connectionDecorators>
- <bendpoints x="306" y="329"/>
- </connections>
- <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.4/@anchors.0" end="//@children.0/@children.3/@anchors.0">
- <properties key="obj-type" value="trans"/>
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
- <link>
- <businessObjects href="../Tests.room#CPBranchTransition:TestLifecycleActor$tr4"/>
- </link>
- <connectionDecorators visible="true" locationRelative="true" location="1.0">
- <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0">
- <points x="-15" y="5"/>
- <points/>
- <points x="-15" y="-5"/>
- </graphicsAlgorithm>
- </connectionDecorators>
- <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr4: [tcCurrentIdx >..."/>
- </connectionDecorators>
- </connections>
- <colors red="227" green="238" blue="249"/>
- <colors red="255" green="255" blue="255"/>
- <colors/>
- <colors red="200" green="200" blue="200"/>
- <fonts name="Arial" size="8"/>
- <fonts name="Arial" size="9" bold="true"/>
-</pi:Diagram>
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/container/etStaticDeque.c b/runtime/org.eclipse.etrice.runtime.c/src/common/container/etStaticDeque.c
index 09d1e5a2a..763185dee 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/container/etStaticDeque.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/container/etStaticDeque.c
@@ -12,6 +12,8 @@
#include "etStaticDeque.h"
+#include <string.h>
+
void etStaticDeque_construct(etStaticDeque* const self, void* memory, int size, int objectSize) {
self->size = 0;
self->first = 0;
@@ -28,12 +30,12 @@ void etStaticDeque_clear(etStaticDeque* const self) {
}
void* etStaticDeque_get(const etStaticDeque* const self, int position) {
- // TODO JB: Handle position out of bounds exception
+ /* TODO JB: Handle position out of bounds exception */
return (void*) &self->memory[(self->first + position * self->objectSize) % (self->objectSize * self->maxSize)];
}
void etStaticDeque_push_front(etStaticDeque* const self, void* object) {
- // TODO JB: Handle out of memory exception
+ /* TODO JB: Handle out of memory exception */
if(self->size < self->maxSize) {
++self->size;
self->first = (self->first + (self->maxSize - 1) * self->objectSize) % (self->objectSize * self->maxSize);
@@ -42,7 +44,7 @@ void etStaticDeque_push_front(etStaticDeque* const self, void* object) {
}
void etStaticDeque_push_back(etStaticDeque* const self, void* object) {
- // TODO JB: Handle out of memory exception
+ /* TODO JB: Handle out of memory exception */
if(self->size < self->maxSize) {
++self->size;
memcpy(etStaticDeque_back(self), object, self->objectSize);
@@ -50,7 +52,7 @@ void etStaticDeque_push_back(etStaticDeque* const self, void* object) {
}
void etStaticDeque_pop_front(etStaticDeque* const self) {
- // TODO JB: Handle deque empty exception
+ /* TODO JB: Handle deque empty exception */
if(self->size > 0) {
self->first = (self->first + self->objectSize) % (self->objectSize * self->maxSize);
--self->size;
@@ -58,7 +60,7 @@ void etStaticDeque_pop_front(etStaticDeque* const self) {
}
void etStaticDeque_pop_back(etStaticDeque* const self) {
- // TODO JB: Handle deque empty exception
+ /* TODO JB: Handle deque empty exception */
if(self->size > 0) {
--self->size;
}
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/container/etStaticDeque.h b/runtime/org.eclipse.etrice.runtime.c/src/common/container/etStaticDeque.h
index 23cc4ca67..2333bb0dc 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/container/etStaticDeque.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/container/etStaticDeque.h
@@ -16,7 +16,10 @@
#include <stdint.h>
/**
- * Implementation of a double ended queue with a circular buffer
+ * etStaticDeque (static double ended queue) is a data structure for storing objects of equal size in order.
+ * The size of the deque is limited by the memory provided by the user.
+ * Pushing/Popping elements to/from the front and the back as well as arbitrary access is supported in constant time.
+ * The data structure relies on a circular buffer implemented as an array.
*/
typedef struct etStaticDeque {
uint8_t* memory; /* memory for the objects */
@@ -27,47 +30,74 @@ typedef struct etStaticDeque {
} etStaticDeque;
/**
- * Constructs the Deque on the given memory with specified size and objectSize
+ * Constructs the Deque on the given memory with specified size and objectSize.
+ *
+ * \param self the pointer to the StaticDeque
+ * \param memory a pointer to the memory for the objects of the StaticDeque
+ * \param size the maximum count of objects that fit into the specified memory
+ * \param objectSize the size of the objects stored in the StaticDeque
*/
void etStaticDeque_construct(etStaticDeque* self, void* memory, int size, int objectSize);
/**
- * Clears the Deque, removes all objects
+ * Clears the Deque, removes all objects.
+ *
+ * \param self the pointer to the StaticDeque
*/
-void etStaticDeque_clear(etStaticDeque* const self);
+void etStaticDeque_clear(etStaticDeque* self);
/**
- * Returns a reference to an arbitrary object at the specified position
+ * Returns a reference to an arbitrary object at the specified position.
+ *
+ * \param self the pointer to the StaticDeque
+ * \param position the position of the object to be returned
+ * \return the object at the specified position
*/
void* etStaticDeque_get(const etStaticDeque* self, int position);
/**
* Copies the object and stores it at the front
+ *
+ * \param self the pointer to the StaticDeque
+ * \param object the object to push to the front of the queue
*/
void etStaticDeque_push_front(etStaticDeque* self, void* object);
/**
* Copies the object and stores it at the end
+ *
+ * \param self the pointer to the StaticDeque
+ * \param object the object to push to the end of the queue
*/
void etStaticDeque_push_back(etStaticDeque* self, void* object);
/**
* Removes the first object
+ *
+ * \param self the pointer to the StaticDeque
*/
void etStaticDeque_pop_front(etStaticDeque* self);
/**
* Removes the last element
+ *
+ * \param self the pointer to the StaticDeque
*/
void etStaticDeque_pop_back(etStaticDeque* self);
/**
* Returns a reference to the first object
+ *
+ * \param self the pointer to the StaticDeque
+ * \return the object at the front of the queue
*/
void* etStaticDeque_front(const etStaticDeque* self);
/**
* Returns a reference to the last object
+ *
+ * \param self the pointer to the StaticDeque
+ * \return the object at the end of the queue
*/
void* etStaticDeque_back(const etStaticDeque* self);
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/osal/etSocket.h b/runtime/org.eclipse.etrice.runtime.c/src/common/osal/etSocket.h
index ca1e5e397..de729de9a 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/osal/etSocket.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/osal/etSocket.h
@@ -28,59 +28,66 @@ typedef struct {
etServerSocket;
/*
- * Constructs a new etSocket and connects to the specified host
- * @param self: pointer to etSocket
- * @param address: address of the host to connect to
- * @param port: port of the host
- * @return: 0 on success
+ * Constructs a new etSocket and connects to the specified host.
+ *
+ * \param self pointer to etSocket
+ * \param address address of the host to connect to
+ * \param port port of the host
+ * \return 0 on success
*/
int etSocket_construct(etSocket* self, const char* address, short port);
/*
- * Destructs the etSocket
- * @param self: pointer to etSocket
- * @return: 0 on success
+ * Destructs the etSocket.
+ *
+ * \param self pointer to etSocket
+ * \return 0 on success
*/
int etSocket_destruct(etSocket* self);
/*
- * Receives data from an etSocket
- * @param self: pointer to etSocket
- * @param buffer: buffer for received data
- * @param length: max length of received data
- * @return: length of received data, -1 when failed
+ * Receives data from an etSocket.
+ *
+ * \param self pointer to etSocket
+ * \param buffer buffer for received data
+ * \param length max length of received data
+ * \return length of received data, -1 when failed
*/
int etSocket_recv(etSocket* self, uint8* buffer, size_t length);
/*
- * Sends data over the etSocket
- * @param self: pointer to etSocket
- * @param buffer: buffer that holds the data to be sent
- * @param length: length of the data
- * @return: length of sent data, -1 when failed
+ * Sends data over the etSocket.
+ *
+ * \param self pointer to etSocket
+ * \param buffer buffer that holds the data to be sent
+ * \param length length of the data
+ * \return length of sent data, -1 when failed
*/
int etSocket_send(etSocket* self, uint8* buffer, size_t length);
/*
- * Constructs a new etServerSocket and starts to listen on the specified port
- * @param self: pointer to etServerSocket
- * @param port: port number
- * @return: 0 on success
+ * Constructs a new etServerSocket and starts to listen on the specified port.
+ *
+ * \param self pointer to etServerSocket
+ * \param port port number
+ * \return: 0 on success
*/
int etServerSocket_construct(etServerSocket* self, short port);
/*
- * Destructs an etServerSocket
- * @param self: pointer to etServerSocket
- * @return: 0 on success
+ * Destructs an etServerSocket.
+ *
+ * \param self pointer to etServerSocket
+ * \return 0 on success
*/
int etServerSocket_destruct(etServerSocket* self);
/*
- * Accepts a new connection
- * @param self: pointer to etServerSocket
- * @param socket: pointer to the etSocket for the new connection
+ * Accepts a new connection.
+ *
+ * \param self pointer to etServerSocket
+ * \param socket pointer to the etSocket for the new connection
*/
int etServerSocket_accept(etServerSocket* self, etSocket* socket);

Back to the top