From a6de841644187d23fb207b1ba1b0433e6348bec3 Mon Sep 17 00:00:00 2001
From: Henrik Rentz-Reichert
Date: Sat, 22 Dec 2018 22:00:39 +0100
Subject: WIP: [doc] completed feature model
Change-Id: I6c257c7eefcc57622de3e603c16959f5702a2958
---
.../featuremodel/etrice.roomlanguage.featurizer | 377 +++++++++--
.../online-doc/content/feature-reference.md | 704 +++++++++++++++++++--
.../org.eclipse.etrice.doc/targets/contextHelp.xml | 205 +++---
.../targets/eclipse-help/Dave-Integration.html | 128 ++--
.../targets/eclipse-help/etrice-doc.html | 126 ++++
.../targets/eclipse-help/feature-reference.html | 681 ++++++++++++++++----
.../targets/eclipse-help/room-concepts.html | 36 +-
.../targets/eclipse-help/toc-topics.xml.html | 14 +
.../targets/keyword-hover/CPBranchTransition.html | 3 +
.../targets/keyword-hover/ChoicePoint.html | 31 +
.../keyword-hover/ContinuationTransition.html | 3 +
.../targets/keyword-hover/EntryPoint.html | 21 +
.../targets/keyword-hover/ExitPoint.html | 3 +
.../targets/keyword-hover/GuardedTransition.html | 3 +
.../targets/keyword-hover/InitialTransition.html | 3 +
.../targets/keyword-hover/PrimitiveType.html | 2 +-
.../targets/keyword-hover/RefinedState.html | 11 +
.../targets/keyword-hover/SimpleState.html | 33 +
.../targets/keyword-hover/TrPoint.html | 3 +
.../targets/keyword-hover/Transition.html | 9 +
.../targets/keyword-hover/TransitionPoint.html | 11 +
.../targets/keyword-hover/TriggeredTransition.html | 3 +
22 files changed, 2056 insertions(+), 354 deletions(-)
create mode 100644 plugins/org.eclipse.etrice.doc/targets/keyword-hover/CPBranchTransition.html
create mode 100644 plugins/org.eclipse.etrice.doc/targets/keyword-hover/ChoicePoint.html
create mode 100644 plugins/org.eclipse.etrice.doc/targets/keyword-hover/ContinuationTransition.html
create mode 100644 plugins/org.eclipse.etrice.doc/targets/keyword-hover/EntryPoint.html
create mode 100644 plugins/org.eclipse.etrice.doc/targets/keyword-hover/ExitPoint.html
create mode 100644 plugins/org.eclipse.etrice.doc/targets/keyword-hover/GuardedTransition.html
create mode 100644 plugins/org.eclipse.etrice.doc/targets/keyword-hover/InitialTransition.html
create mode 100644 plugins/org.eclipse.etrice.doc/targets/keyword-hover/RefinedState.html
create mode 100644 plugins/org.eclipse.etrice.doc/targets/keyword-hover/SimpleState.html
create mode 100644 plugins/org.eclipse.etrice.doc/targets/keyword-hover/TrPoint.html
create mode 100644 plugins/org.eclipse.etrice.doc/targets/keyword-hover/Transition.html
create mode 100644 plugins/org.eclipse.etrice.doc/targets/keyword-hover/TransitionPoint.html
create mode 100644 plugins/org.eclipse.etrice.doc/targets/keyword-hover/TriggeredTransition.html
(limited to 'plugins')
diff --git a/plugins/org.eclipse.etrice.doc/featuremodel/etrice.roomlanguage.featurizer b/plugins/org.eclipse.etrice.doc/featuremodel/etrice.roomlanguage.featurizer
index 411359426..fe310d75e 100644
--- a/plugins/org.eclipse.etrice.doc/featuremodel/etrice.roomlanguage.featurizer
+++ b/plugins/org.eclipse.etrice.doc/featuremodel/etrice.roomlanguage.featurizer
@@ -26,8 +26,8 @@ Package ROOMLanguage
Feature AnnotationType
description '''AnnotationTypes can be used to tag ROOM classes for further custom processing'''
text '''
- They provide the ability to associate custom properties to ROOM classes, that adjust or toogle features, like generation or the runtime behavior.
- eTrice has some built-in annotations, which can be found in Annotations.room within the eTrice modellib.
+ They provide the ability to associate custom properties to ROOM classes, that adjust or toggle features, like generation or the runtime behavior.
+ eTrice comes with predefined annotations, which can be found in Annotations.room within the eTrice modellib.
See section Annotations for further reading.
'''
@@ -44,7 +44,7 @@ stable
;
Feature Annotation
-description '''An Annotation can be attached to a ROOM classes to apply the properties of its AnnotationType'''
+description '''An Annotation can be attached to a ROOM class to specify the properties of its AnnotationType'''
text '''
It refers to an AnnotationType and may have to pass key value pairs. Its notation is similar to Java:
@@ -78,7 +78,7 @@ stable
;
Feature Inheritance
- description '''A class can specify a super class and inherits elements from the super class hierarchy'''
+ description '''A class can specify a single super class and inherits elements from the super class hierarchy'''
text '''
When a ROOM class specifies a super class, it generally inherits all elements and properties.
In several cases, it is possible, to override these inherited elements. Generally, eTrice has two semantics of overriding: refinement and replacement.
@@ -86,28 +86,28 @@ Feature Inheritance
In this case, if a sub class overrides a piece of logic from a super class, it will always be executed subsequently to the inherited.
Contrary to this, replacement is applied to overridden Operations, similar to programming languages C++ and Java.
- A formal definition of overriding is given below:
+ A formal definition of several variants of overriding is given below:
- - early or late resolve - if element is overridden, which one should super class use by default - own or override ?
- - replacing or refinement - ignore inherited code or prepend inherited code automatically ?
- - (non-)accessible - if element is overridden, is super class' original accessible from sub class ? e.g. super.foo()
- - implicit or explicit - does it use distinct model element / keyword?
+ - early or late resolve - if element is overridden, which one should the super class use by default - own or override?
+ - replacing or refining - ignore inherited code or prepend inherited code automatically?
+ - (non-)accessible - if element is overridden, is super class' original accessible from sub class? E.g. super.foo()
+ - implicit or explicit - does it use a distinct model element or keyword?
- Examples programming languages:
- c++ virtual function and java override <==> accessible explicit late replacing
- c++ function redefine <==> accessible implicit early replacing
- c++ dtor <==> late refinement\\
+ Examples from programming languages:
+ C++ virtual function and Java override <==> accessible, explicit, late, replacing
+ C++ function redefine <==> accessible, implicit, early, replacing
+ C++ destructor <==> late, refining\\
eTrice override of model elements:
- Operations (C generation) <==> non\_accessible explicit late replacing
- Operations (Java generation) <==> accessible explicit late replacing
- State and Transitions <==> non-accessible explicit late refinement
- ctor/dtor <==> non\_accessible implicit late refinement
- StateMachine <==> non-accessible implicit late refinement
- UserCode <==> non-accessible implicit late refinement
+ Operations (C generation) <==> non-accessible, explicit, late, replacing
+ Operations (Java generation) <==> accessible, explicit, late, replacing
+ State and Transitions <==> non-accessible, explicit, late, refining
+ ctor/dtor <==> non-accessible, implicit, late, refining
+ StateMachine <==> non-accessible, implicit, late, refining
+ UserCode <==> non-accessible, implicit, late, refining
'''
- example ¦¦¦
+ example |||
```room
ActorClass ActorSubClass extends ActorBaseClass {
// inherits all elements from super type hierarchy
@@ -145,7 +145,7 @@ Feature Inheritance
Attribute attribute1 : uint32
}
```
- ¦¦¦
+ |||
prototype
;
@@ -353,7 +353,7 @@ Feature ActorClass
'''
example ''''''
- help ¦¦¦
+ help |||
```room
// prefixes: abstract and (eventdriven, datadriven, async, sync)
ActorClass ActorName ["An eventdriven ActorClass by default"] {
@@ -382,7 +382,7 @@ Feature ActorClass
}
}
```
- ¦¦¦
+ |||
contains ExecutionType
contains ActorRef
@@ -430,7 +430,19 @@ Feature SubSystemClass
Feature StateMachine
description '''A StateMachine describes the state based, event driven behavior of an ActorClass'''
text '''
- In ROOM each actor class can implement its behavior using a state machine. Events occurring at the end ports of an actor will be forwarded to and processed by the state machine. Events possibly trigger state transitions.
+ In ROOM each actor class can implement its behavior using a state machine. Events occurring at the end ports of an actor will
+ be forwarded to and processed by the state machine. Events possibly trigger state transitions.
+
+ ROOM state machines are hierarchical finite state machines. That means that each state in the state graph can contain another state graph.
+ This is possible to arbitrary depth.
+
+ A state graph consists of
+
+ * states
+ * transitions
+ * transition points
+ * choice points
+ * initial point
![PingPongReceiverFSM](images/300-PingPongReceiverFSM.png)
@@ -448,8 +460,297 @@ Feature StateMachine
```
'''
uses Inheritance
+ contains StateGraphNode
+ contains Transition
stable
- ;
+;
+
+abstract Feature StateGraphNode
+ description '''A StateGraphNode is an abstract node of the state graph'''
+ text '''
+ A StateGraphNode can be a State, a TransitionPoint, a ChoicePoint or an InitialPoint.
+ '''
+ uses Inheritance
+ stable
+;
+
+abstract Feature State
+ description '''A State can be a plain State or a RefinedState'''
+ text '''
+ A State can be a plain State or a RefinedState.
+ '''
+ uses Inheritance
+ isA StateGraphNode
+ stable
+;
+
+Feature SimpleState
+ description '''A State is a node in the state graph representation of the state machine'''
+ text '''
+ A State has optional 'entry' and 'exit' codes. The entry code is executed when the state is entered, the exit code is executed
+ when it is left. In the case of an data driven (also known as polled) state machine, there also is a 'do' action code.
+ The do code is executed for the active state in each polling cycle.
+ A state can have a sub state machine. Starting at the top level state machine the states with their optional sub state machines
+ form a tree which is called a 'hierarchical state machine'.
+ A state machine always is in exactly one state which can only be a leaf state, i.e. a state which has no sub state machine.
+ '''
+ help keyword "State" |||
+ ```room
+ ActorClass Example {
+ //...
+ Behavior {
+ StateMachine {
+ Transition init: initial -> Standby
+ Transition tr0: Standby -> Running {
+ triggers {
+ Open BlinkyTutorial.room and create a new Actor called AHWAbstraction by adding the following text: An Annotation can be attached to a ROOM classes to apply the properties of its AnnotationType An Annotation can be attached to a ROOM class to specify the properties of its AnnotationType Uses: A class can specify a super class and inherits elements from the super class hierarchy A class can specify a single super class and inherits elements from the super class hierarchy Instance hierarchy of ActorRef Example (*System(System)* not shown in code snippet) An Annotation can be attached to a ROOM classes to apply the properties of its AnnotationType An Annotation can be attached to a ROOM class to specify the properties of its AnnotationType It refers to an AnnotationType and may have to pass key value pairs. Its notation is similar to Java: AnnotationTypes can be used to tag ROOM classes for further custom processing They provide the ability to associate custom properties to ROOM classes, that adjust or toogle features, like generation or the runtime behavior. They provide the ability to associate custom properties to ROOM classes, that adjust or toggle features, like generation or the runtime behavior. See section Annotations for further reading. Typecasts: An Annotation can be attached to a ROOM classes to apply the properties of its AnnotationType An Annotation can be attached to a ROOM class to specify the properties of its AnnotationType Is contained in: a choice point branch transition is an outgoing transition from a choice point and is traversed if its conditions is evaluated to true A choice point together with its outgoing transitions can be thought of as a if, else-if, else cascade in traditional Is a: A Transition is an edge in the state graph representation of the state machine a choice point is the state machine counterpart of a conditional statement A ChoicePoint in ROOM has one incoming transition and an arbitrary number of outgoing transitions. Is a: A StateGraphNode is an abstract node of the state graph Uses: the continuation transition is a transition with just an optional action code The CommunicationType defines the communication semantics of a ProtocolClass Since from ROOM models executable code can be generated, it is important to define the way the actors are executed and communicate with each other. the continuation transition is a transition with just an optional action code A continuation transition is used as default branch of a choice point or as outgoing transition of an entry point Is a: A Transition is an edge in the state graph representation of the state machine Is used by: a choice point is the state machine counterpart of a conditional statement A DataClass is a composition of Attributes Intended to model a type that primarily consists of data, which is usually grouped together in some manner. DataClasses roughly translate to Java classes without interaction or C structs. An Annotation can be attached to a ROOM classes to apply the properties of its AnnotationType An Annotation can be attached to a ROOM class to specify the properties of its AnnotationType Uses: A class can specify a super class and inherits elements from the super class hierarchy A class can specify a single super class and inherits elements from the super class hierarchy Example: ¦¦¦
[Annotation](#annotation)
- An Annotation can be attached to a ROOM classes to apply the properties of its AnnotationType
+ An Annotation can be attached to a ROOM class to specify the properties of its AnnotationType
@@ -418,7 +418,7 @@ Instance hierarchy of ActorRef Example (*System(System)* not shown in code snipp
### Annotation
-An Annotation can be attached to a ROOM classes to apply the properties of its AnnotationType
+An Annotation can be attached to a ROOM class to specify the properties of its AnnotationType
It refers to an AnnotationType and may have to pass key value pairs. Its notation is similar to Java:
@@ -513,8 +513,8 @@ ActorClass ComponentAbstraction {
### AnnotationType
AnnotationTypes can be used to tag ROOM classes for further custom processing
-They provide the ability to associate custom properties to ROOM classes, that adjust or toogle features, like generation or the runtime behavior.
-eTrice has some built-in annotations, which can be found in Annotations.room within the eTrice modellib.
+They provide the ability to associate custom properties to ROOM classes, that adjust or toggle features, like generation or the runtime behavior.
+eTrice comes with predefined annotations, which can be found in Annotations.room within the eTrice modellib.
See section Annotations for further reading.
@@ -531,7 +531,7 @@ See section Annotations for further reading.
Uses:
[Inheritance](#inheritance)
- A class can specify a super class and inherits elements from the super class hierarchy
+ A class can specify a single super class and inherits elements from the super class hierarchy
Typecasts:
[Annotation](#annotation)
- An Annotation can be attached to a ROOM classes to apply the properties of its AnnotationType
+ An Annotation can be attached to a ROOM class to specify the properties of its AnnotationType
Is contained in:
@@ -732,6 +732,73 @@ ActorClass ExampleActorClass {
+---
+
+
+### CPBranchTransition
+a choice point branch transition is an outgoing transition from a choice point and is traversed if its conditions is evaluated to true
+
+A choice point together with its outgoing transitions can be thought of as a if, else-if, else cascade in traditional
+ programming languages. The choice point branch transition corresponds to an if clause while the final else is modeled as
+ a continuation transition. Coming from a choice point, a choice point branch transition is traversed whenever its
+ condition evaluates to true. No order of evaluations is guaranteed.
+
+
+
+
+
+
+
+
+---
+
+
+### ChoicePoint
+a choice point is the state machine counterpart of a conditional statement
+
+A ChoicePoint in ROOM has one incoming transition and an arbitrary number of outgoing transitions.
+One of the outgoing transitions has no condition (a ContinuationTransition). It is the default branch that is taken
+if none of the transition conditions evaluated to true. All other transitions going out from the ChoicePoint
+are CPBranchTransitions which have a mandatory condition (keyword 'cond'). The evaluation order of the conditions
+is not deterministic.
+
+
+
+
+
+
+Features
+
+
+
+Is a:
+ [Transition](#transition)
+
+ A Transition is an edge in the state graph representation of the state machine
+
+
+
+
+
+
---
@@ -820,6 +887,48 @@ datadriven ProtocolClass DatadrivenProtocolClass {
---
+### ContinuationTransition
+the continuation transition is a transition with just an optional action code
+
+A continuation transition is used as default branch of a choice point or as outgoing transition of an entry point
+
+
+
+
+
+
+Features
+
+
+Is a:
+ [StateGraphNode](#stategraphnode)
+
+ A StateGraphNode is an abstract node of the state graph
+
+
+
+Uses:
+ [ContinuationTransition](#continuationtransition)
+
+ the continuation transition is a transition with just an optional action code
+
+
+
+
+
+
+
+
+Features
+
+
+
+Is a:
+ [Transition](#transition)
+
+ A Transition is an edge in the state graph representation of the state machine
+
+
+
+
+
+---
+
+
### DataClass
A DataClass is a composition of Attributes
@@ -860,13 +969,13 @@ DataClass TCPConnectionData {
+
+
+
+Feature Usage
+
+
+
+Is used by:
+ [ChoicePoint](#choicepoint)
+
+ a choice point is the state machine counterpart of a conditional statement
+
[Annotation](#annotation)
- An Annotation can be attached to a ROOM classes to apply the properties of its AnnotationType
+ An Annotation can be attached to a ROOM class to specify the properties of its AnnotationType
@@ -950,6 +1059,33 @@ A DataType can take 4 forms and types data elements like an Attribute or Operati
+---
+
+
+### EntryPoint
+an entry point is an explicit entry point in a sub state machine to which transitions in the parent state graph can connect
+
+text
+
+
+Uses:
[Inheritance](#inheritance)
- A class can specify a super class and inherits elements from the super class hierarchy
+ A class can specify a single super class and inherits elements from the super class hierarchy
+
+
+
+
+
---
@@ -1100,6 +1236,33 @@ async ActorClass MixedActor{
---
+### ExitPoint
+an exit point is an explicit exit point in a sub state machine from which transitions in the parent state graph can start
+
+text
+
+
+
+
+
+
+Features
+
+
+
+Is a:
+ [TrPoint](#trpoint)
+
+ a TrPoint can be an EntryPoint, an ExitPoint or a TransitionPoint
+
+
+
+
+
+
+---
+
+
### ExternalEndPort
A ExternalEndPort is an interface Port, that is made accessible to the internal interface of an ActorClass
@@ -1202,7 +1365,7 @@ ActorClass ActorClassWithExternalType{
### Inheritance
-A class can specify a super class and inherits elements from the super class hierarchy
+A class can specify a single super class and inherits elements from the super class hierarchy
When a ROOM class specifies a super class, it generally inherits all elements and properties.
In several cases, it is possible, to override these inherited elements. Generally, eTrice has two semantics of overriding: refinement and replacement.
@@ -1210,26 +1373,26 @@ Refinement is used in most cases (e.g. StateMachine) and realizes an extension o
In this case, if a sub class overrides a piece of logic from a super class, it will always be executed subsequently to the inherited.
Contrary to this, replacement is applied to overridden Operations, similar to programming languages C++ and Java.
-A formal definition of overriding is given below:
+A formal definition of several variants of overriding is given below:
-- early or late resolve - if element is overridden, which one should super class use by default - own or override ?
-- replacing or refinement - ignore inherited code or prepend inherited code automatically ?
-- (non-)accessible - if element is overridden, is super class' original accessible from sub class ? e.g. super.foo()
-- implicit or explicit - does it use distinct model element / keyword?
+- early or late resolve - if element is overridden, which one should the super class use by default - own or override?
+- replacing or refining - ignore inherited code or prepend inherited code automatically?
+- (non-)accessible - if element is overridden, is super class' original accessible from sub class? E.g. super.foo()
+- implicit or explicit - does it use a distinct model element or keyword?
-Examples programming languages:
-c++ virtual function and java override <==> accessible explicit late replacing
-c++ function redefine <==> accessible implicit early replacing
-c++ dtor <==> late refinement\\
+Examples from programming languages:
+C++ virtual function and Java override <==> accessible, explicit, late, replacing
+C++ function redefine <==> accessible, implicit, early, replacing
+C++ destructor <==> late, refining\\
eTrice override of model elements:
-Operations (C generation) <==> non\_accessible explicit late replacing
-Operations (Java generation) <==> accessible explicit late replacing
-State and Transitions <==> non-accessible explicit late refinement
-ctor/dtor <==> non\_accessible implicit late refinement
-StateMachine <==> non-accessible implicit late refinement
-UserCode <==> non-accessible implicit late refinement
+Operations (C generation) <==> non-accessible, explicit, late, replacing
+Operations (Java generation) <==> accessible, explicit, late, replacing
+State and Transitions <==> non-accessible, explicit, late, refining
+ctor/dtor <==> non-accessible, implicit, late, refining
+StateMachine <==> non-accessible, implicit, late, refining
+UserCode <==> non-accessible, implicit, late, refining
@@ -1241,7 +1404,7 @@ UserCode <==> non-accessible implicit late refinement
+
+
+
+Features
+
+
+
+Is a:
+ [TrPoint](#trpoint)
+
+ a TrPoint can be an EntryPoint, an ExitPoint or a TransitionPoint
+
-
+Is used by:
+ Is used by:
[ActorClass](#actorclass)
An actor is the basic structural building block for building systems with ROOM
@@ -1251,6 +1414,31 @@ UserCode <==> non-accessible implicit late refinement
A StateMachine describes the state based, event driven behavior of an ActorClass
+
+[StateGraphNode](#stategraphnode)
+
+ A StateGraphNode is an abstract node of the state graph
+
+
+[State](#state)
+
+ A State can be a plain State or a RefinedState
+
+
+[SimpleState](#simplestate)
+
+ A State is a node in the state graph representation of the state machine
+
+
+[RefinedState](#refinedstate)
+
+ A RefinedState refines a State of one of the Actor's base class state machines
+
+
[Transition](#transition)
+
+ A Transition is an edge in the state graph representation of the state machine
+
[ProtocolClass](#protocolclass)
@@ -1307,6 +1495,34 @@ DataClass DataBaseClass {
---
+### InitialTransition
+the initial transition is used to identify the initial state
+
+The initial transition connects the initial point to a state. There can be at most one initial transition
+ in a state machine. Under special circumstances the initial transition can be omitted.
+
+
+
+
+
+
+
+
+---
+
+
### InternalEndPort
A InternalEndPort is an local Port, that is declared in the internal interface of an ActorClass
@@ -1433,7 +1649,7 @@ It describes the logical topology of your distributed system and is composed of
+
+
+
+Features
+
+
+
+Is a:
+ [Transition](#transition)
+
+ A Transition is an edge in the state graph representation of the state machine
+
@@ -1800,13 +2016,13 @@ ProtocolClass SimpleProtocolClass {
[Annotation](#annotation)
- An Annotation can be attached to a ROOM classes to apply the properties of its AnnotationType
+ An Annotation can be attached to a ROOM class to specify the properties of its AnnotationType
[Annotation](#annotation)
- An Annotation can be attached to a ROOM classes to apply the properties of its AnnotationType
+ An Annotation can be attached to a ROOM class to specify the properties of its AnnotationType
@@ -1886,6 +2102,44 @@ datadriven ProtocolClass ProtocolClassData {
---
+### RefinedState
+A RefinedState refines a State of one of the Actor's base class state machines
+
+A State can be a plain State or a RefinedState.
+
+
+Uses:
[Inheritance](#inheritance)
- A class can specify a super class and inherits elements from the super class hierarchy
+ A class can specify a single super class and inherits elements from the super class hierarchy
+
+
+
+
+
+---
+
+
### RelayPort
A RelayPort forwards its messages without exposing them to the internal interface of the ActorClass
@@ -2135,10 +2389,176 @@ The implementation of an Service Provision Point (SPP)
---
+### SimpleState
+A State is a node in the state graph representation of the state machine
+
+A State has optional 'entry' and 'exit' codes. The entry code is executed when the state is entered, the exit code is executed
+when it is left. In the case of an data driven (also known as polled) state machine, there also is a 'do' action code.
+The do code is executed for the active state in each polling cycle.
+A state can have a sub state machine. Starting at the top level state machine the states with their optional sub state machines
+form a tree which is called a 'hierarchical state machine'.
+A state machine always is in exactly one state which can only be a leaf state, i.e. a state which has no sub state machine.
+
+
+
+
+
+
+Features
+
+
+Is a:
+ [State](#state)
+
+ A State can be a plain State or a RefinedState
+
+
+Uses:
+ [Inheritance](#inheritance)
+
+ A class can specify a single super class and inherits elements from the super class hierarchy
+
+
+
+[StateMachine](#statemachine)
+
+ A StateMachine describes the state based, event driven behavior of an ActorClass
+
+
+
+
+
+
+---
+
+
+### State
+A State can be a plain State or a RefinedState
+
+A State can be a plain State or a RefinedState.
+
+
+
+
+
+
+Features
+
+
+Is a:
+ [State](#state)
+
+ A State can be a plain State or a RefinedState
+
+
+Uses:
+ [Inheritance](#inheritance)
+
+ A class can specify a single super class and inherits elements from the super class hierarchy
+
+
+
+[StateMachine](#statemachine)
+
+ A StateMachine describes the state based, event driven behavior of an ActorClass
+
+
+
+
+
+
+
+
+Features
+
+
+Is a:
+ [StateGraphNode](#stategraphnode)
+
+ A StateGraphNode is an abstract node of the state graph
+
+
+
+Uses:
+ [Inheritance](#inheritance)
+
+ A class can specify a single super class and inherits elements from the super class hierarchy
+
+
+
+
+
+---
+
+
+### StateGraphNode
+A StateGraphNode is an abstract node of the state graph
+
+A StateGraphNode can be a State, a TransitionPoint, a ChoicePoint or an InitialPoint.
+
+
+
+
+
+
+Feature Usage
+
+
+Inheriting features:
+ [SimpleState](#simplestate)
+
+ A State is a node in the state graph representation of the state machine
+
+
+
+[RefinedState](#refinedstate)
+
+ A RefinedState refines a State of one of the Actor's base class state machines
+
+
+
+
+
+
+
+
+Features
+
+
+
+Uses:
+ [Inheritance](#inheritance)
+
+ A class can specify a single super class and inherits elements from the super class hierarchy
+
+
+
+
+
+---
+
+
### StateMachine
A StateMachine describes the state based, event driven behavior of an ActorClass
-In ROOM each actor class can implement its behavior using a state machine. Events occurring at the end ports of an actor will be forwarded to and processed by the state machine. Events possibly trigger state transitions.
+In ROOM each actor class can implement its behavior using a state machine. Events occurring at the end ports of an actor will
+be forwarded to and processed by the state machine. Events possibly trigger state transitions.
+
+ROOM state machines are hierarchical finite state machines. That means that each state in the state graph can contain another state graph.
+This is possible to arbitrary depth.
+
+A state graph consists of
+
+* states
+* transitions
+* transition points
+* choice points
+* initial point
![PingPongReceiverFSM](images/300-PingPongReceiverFSM.png)
@@ -2151,11 +2571,22 @@ In ROOM each actor class can implement its behavior using a state machine. Event
+
+
+
+
+Feature Usage
+
+
+Inheriting features:
+ [State](#state)
+
+ A State can be a plain State or a RefinedState
+
+
+[ChoicePoint](#choicepoint)
+
+ a choice point is the state machine counterpart of a conditional statement
+
+
+[TrPoint](#trpoint)
+
+ a TrPoint can be an EntryPoint, an ExitPoint or a TransitionPoint
+
+
+
+Is contained in:
+ [StateMachine](#statemachine)
+
+ A StateMachine describes the state based, event driven behavior of an ActorClass
+
+
+Contains:
+ [StateGraphNode](#stategraphnode)
+
+ A StateGraphNode is an abstract node of the state graph
+
+
[Transition](#transition)
+
+ A Transition is an edge in the state graph representation of the state machine
+
@@ -2179,6 +2610,17 @@ In ROOM each actor class can implement its behavior using a state machine. Event
Uses:
[Inheritance](#inheritance)
- A class can specify a super class and inherits elements from the super class hierarchy
+ A class can specify a single super class and inherits elements from the super class hierarchy
The GraphicalBehaviorEditor allows to edit the ActorClass' StateMachine. It is possible to create (hierarchical) states and transitions to model complex behavior in a convenient way.
+
+
+Is used by:
+ [SimpleState](#simplestate)
+
+ A State is a node in the state graph representation of the state machine
+
+
@@ -2219,7 +2661,7 @@ A SubSystemClass is the structural starting point of an ROOM application. Thus i
[RefinedState](#refinedstate)
+
+ A RefinedState refines a State of one of the Actor's base class state machines
+
@@ -2299,6 +2741,177 @@ A physical node is denoted by a NodeClass and NodeRef in the PhysicalModel. The
+---
+
+
+### TrPoint
+a TrPoint can be an EntryPoint, an ExitPoint or a TransitionPoint
+
+text
+
+
+[Annotation](#annotation)
- An Annotation can be attached to a ROOM classes to apply the properties of its AnnotationType
+ An Annotation can be attached to a ROOM class to specify the properties of its AnnotationType
+
+
+
+
+
+
+
+Features
+
+
+
+Is a:
+ [StateGraphNode](#stategraphnode)
+
+ A StateGraphNode is an abstract node of the state graph
+
+
+
+
+
+---
+
+
+### Transition
+A Transition is an edge in the state graph representation of the state machine
+
+A transition connects StateGraphNodes in a state graph. A transition is allowed to connect a state or a transition point with itself.
+Transition points can only be targets of transitions originating from the same transition point.
+The initial point is the source of exactly one transition. In the textual model it is present only in an implicit way.
+
+
+
+
+
+
+Feature Usage
+
+
+Inheriting features:
+ [TransitionPoint](#transitionpoint)
+
+ a transition point is the starting point of transitions that trigger for any state of this state machine
+
+
+[EntryPoint](#entrypoint)
+
+ an entry point is an explicit entry point in a sub state machine to which transitions in the parent state graph can connect
+
+
+
+[ExitPoint](#exitpoint)
+
+ an exit point is an explicit exit point in a sub state machine from which transitions in the parent state graph can start
+
+
+
+
+
+
+
+
+Features
+
+
+
+Uses:
+ [Inheritance](#inheritance)
+
+ A class can specify a single super class and inherits elements from the super class hierarchy
+
+
+
+
+
+---
+
+
+### TransitionPoint
+a transition point is the starting point of transitions that trigger for any state of this state machine
+
+text
+
+
+
+
+
+
+Feature Usage
+
+
+Inheriting features:
+ [InitialTransition](#initialtransition)
+
+ the initial transition is used to identify the initial state
+
+
+[ContinuationTransition](#continuationtransition)
+
+ the continuation transition is a transition with just an optional action code
+
+
+[CPBranchTransition](#cpbranchtransition)
+
+ a choice point branch transition is an outgoing transition from a choice point and is traversed if its conditions is evaluated to true
+
+
+[TriggeredTransition](#triggeredtransition)
+
+ a triggered transition is used in event driven state machines to trigger state transitions
+
+
+
+Is contained in:
+ [StateMachine](#statemachine)
+
+ A StateMachine describes the state based, event driven behavior of an ActorClass
+
+
+
+
+
+
+---
+
+
+### TriggeredTransition
+a triggered transition is used in event driven state machines to trigger state transitions
+
+text
+
+
+
+
+
+
+Features
+
+
+
+Is a:
+ [TrPoint](#trpoint)
+
+ a TrPoint can be an EntryPoint, an ExitPoint or a TransitionPoint
+
+
+
+
+
+
---
@@ -2916,7 +3529,7 @@ The built-in **Gnuplot script generator** provides a convenient way to visualize
+
+
+
+Features
+
+
+
+Is a:
+ [Transition](#transition)
+
+ A Transition is an edge in the state graph representation of the state machine
+Uses:
[Annotation](#annotation)
- An Annotation can be attached to a ROOM classes to apply the properties of its AnnotationType
+ An Annotation can be attached to a ROOM class to specify the properties of its AnnotationType
@@ -3117,6 +3730,12 @@ The MSCLogging is activated by default, but can be set manually in the [Generati
[ActorRefPropertyDialog]: #actorrefpropertydialog
[PortPropertyDialog]: #portpropertydialog
[SPPPropertyDialog]: #spppropertydialog
+[CCodeGenerator]: #ccodegenerator
+[JavaCodeGenerator]: #javacodegenerator
+[CPPCodeGenerator]: #cppcodegenerator
+[GenerationOptions]: #generationoptions
+[MSCLogging]: #msclogging
+[DataLogging]: #datalogging
[AnnotationType]: #annotationtype
[Annotation]: #annotation
[Inheritance]: #inheritance
@@ -3128,6 +3747,21 @@ The MSCLogging is activated by default, but can be set manually in the [Generati
[ActorClass]: #actorclass
[SubSystemClass]: #subsystemclass
[StateMachine]: #statemachine
+[StateGraphNode]: #stategraphnode
+[State]: #state
+[SimpleState]: #simplestate
+[RefinedState]: #refinedstate
+[ChoicePoint]: #choicepoint
+[TrPoint]: #trpoint
+[TransitionPoint]: #transitionpoint
+[EntryPoint]: #entrypoint
+[ExitPoint]: #exitpoint
+[Transition]: #transition
+[InitialTransition]: #initialtransition
+[GuardedTransition]: #guardedtransition
+[ContinuationTransition]: #continuationtransition
+[CPBranchTransition]: #cpbranchtransition
+[TriggeredTransition]: #triggeredtransition
[SubSystemRef]: #subsystemref
[Replication]: #replication
[ActorRef]: #actorref
@@ -3150,9 +3784,3 @@ The MSCLogging is activated by default, but can be set manually in the [Generati
[SAP]: #sap
[ServiceImplementation]: #serviceimplementation
[SPP]: #spp
-[CCodeGenerator]: #ccodegenerator
-[JavaCodeGenerator]: #javacodegenerator
-[CPPCodeGenerator]: #cppcodegenerator
-[GenerationOptions]: #generationoptions
-[MSCLogging]: #msclogging
-[DataLogging]: #datalogging
diff --git a/plugins/org.eclipse.etrice.doc/targets/contextHelp.xml b/plugins/org.eclipse.etrice.doc/targets/contextHelp.xml
index ad2eb274b..d106a8eea 100644
--- a/plugins/org.eclipse.etrice.doc/targets/contextHelp.xml
+++ b/plugins/org.eclipse.etrice.doc/targets/contextHelp.xml
@@ -57,6 +57,44 @@
@@ -130,9 +130,9 @@
Port LED1: POnOff
}
Structure {
- usercode1 '''
- #include "Dave.h"
- '''
+ usercode1 '''
+ #include "Dave.h"
+ '''
external Port LED1
}
Behavior {
@@ -143,17 +143,17 @@
triggers {
<on: LED1>
}
- action '''
+ action '''
DIGITAL_IO_SetOutputHigh(&LED1_P5_9);
- '''
+ '''
}
Transition tr1: state0 -> state0 {
triggers {
<off: LED1>
}
- action '''
+ action '''
DIGITAL_IO_SetOutputLow(&LED1_P5_9);
- '''
+ '''
}
}
}
@@ -186,25 +186,25 @@
State state0
State state1
Transition init: initial -> state0 {
- action '''
+ action '''
timer.startTimer(300);
- '''
+ '''
}
Transition tr0: state0 -> state1 {
triggers {
<timeout: timer>
}
- action '''
+ action '''
out.on();
- '''
+ '''
}
Transition tr1: state1 -> state0 {
triggers {
<timeout: timer>
}
- action '''
+ action '''
out.off();
- '''
+ '''
}
}
}
@@ -243,25 +243,25 @@
State state0
State state1
Transition init: initial -> state0 {
- action '''
+ action '''
timer.startTimer(300);
- '''
+ '''
}
Transition tr0: state0 -> state1 {
triggers {
<timeout: timer>
}
- action '''
+ action '''
out.on();
- '''
+ '''
}
Transition tr1: state1 -> state0 {
triggers {
<timeout: timer>
}
- action '''
+ action '''
out.off();
- '''
+ '''
}
}
}
@@ -272,9 +272,9 @@
Port LED1: POnOff
}
Structure {
- usercode1 '''
- #include "Dave.h"
- '''
+ usercode1 '''
+ #include "Dave.h"
+ '''
external Port LED1
}
Behavior {
@@ -285,17 +285,17 @@
triggers {
<on: LED1>
}
- action '''
+ action '''
DIGITAL_IO_SetOutputHigh(&LED1_P5_9);
- '''
+ '''
}
Transition tr1: state0 -> state0 {
triggers {
<off: LED1>
}
- action '''
+ action '''
DIGITAL_IO_SetOutputLow(&LED1_P5_9);
- '''
+ '''
}
}
}
@@ -378,14 +378,14 @@
State blinking {
subgraph {
State on {
- entry '''
+ entry '''
out.on();
- '''
+ '''
}
State off {
- entry '''
+ entry '''
out.off();
- '''
+ '''
}
EntryPoint tp0
Transition tr0: on -> off {
@@ -399,9 +399,9 @@
}
}
Transition tr2: my tp0 -> on {
- action '''
+ action '''
timer.startTimer(300);
- '''
+ '''
}
}
}
@@ -417,10 +417,10 @@
triggers {
<off: ctrl>
}
- action '''
+ action '''
timer.kill();
out.off();
- '''
+ '''
}
}
}
@@ -434,9 +434,9 @@
conjugated Port BUTTON2: POnOff
}
Structure {
- usercode1 '''
- #include "Dave.h"
- '''
+ usercode1 '''
+ #include "Dave.h"
+ '''
SAP timer: PTimer
external Port LED1
external Port LED2
@@ -449,77 +449,77 @@
StateMachine {
State state0
Transition init: initial -> state0 {
- action '''
+ action '''
timer.startTimer(50);
- '''
+ '''
}
Transition tr0: state0 -> state0 {
triggers {
<on: LED1>
}
- action '''
+ action '''
DIGITAL_IO_SetOutputHigh(&LED1_P5_9);
- '''
+ '''
}
Transition tr1: state0 -> state0 {
triggers {
<off: LED1>
}
- action '''
+ action '''
DIGITAL_IO_SetOutputLow(&LED1_P5_9);
- '''
+ '''
}
Transition tr2: state0 -> state0 {
triggers {
<on: LED2>
}
- action '''
+ action '''
DIGITAL_IO_SetOutputHigh(&LED2_P5_8);
- '''
+ '''
}
Transition tr3: state0 -> state0 {
triggers {
<off: LED2>
}
- action '''
+ action '''
DIGITAL_IO_SetOutputLow(&LED2_P5_8);
- '''
+ '''
}
Transition tr4: state0 -> state0 {
triggers {
<timeout: timer>
}
- action '''
+ action '''
if (DIGITAL_IO_GetInput(&BUTTON1_P15_13) == 0) {
if (b1Status == 0) {
- // input changed
- b1Status = 1;
+ // input changed
+ b1Status = 1;
BUTTON1.on();
}
}
else {
if (b1Status == 1) {
- // input changed
- b1Status = 0;
+ // input changed
+ b1Status = 0;
BUTTON1.off();
}
}
if (DIGITAL_IO_GetInput(&BUTTON2_P15_12) == 0) {
if (b2Status == 0){
- // input changed
- b2Status = 1;
+ // input changed
+ b2Status = 1;
BUTTON2.on();
}
}
else {
if (b2Status == 1) {
- // input changed
- b2Status = 0;
+ // input changed
+ b2Status = 0;
BUTTON2.off();
}
}
- '''
+ '''
}
}
}
@@ -550,17 +550,17 @@
triggers {
<on: ctrl>
}
- action '''
+ action '''
out.on();
- '''
+ '''
}
Transition tr1: on -> off {
triggers {
<on: ctrl>
}
- action '''
+ action '''
out.off();
- '''
+ '''
}
}
}
diff --git a/plugins/org.eclipse.etrice.doc/targets/eclipse-help/etrice-doc.html b/plugins/org.eclipse.etrice.doc/targets/eclipse-help/etrice-doc.html
index f9d3225d4..29f4204a4 100644
--- a/plugins/org.eclipse.etrice.doc/targets/eclipse-help/etrice-doc.html
+++ b/plugins/org.eclipse.etrice.doc/targets/eclipse-help/etrice-doc.html
@@ -743,6 +743,24 @@
+ActorClass AHWAbstraction {
Structure {
- usercode1 '''
- #include "Dave.h"
- '''
+ usercode1 '''
+ #include "Dave.h"
+ '''
}
}
-
+
@@ -347,7 +347,7 @@
-
+
Annotation
-@AnnotationType1
@AnnotationType2(key1="STRING", key2=3, ...)
@@ -421,7 +421,7 @@
AnnotationType
eTrice has some built-in annotations, which can be found in Annotations.room within the eTrice modellib.
eTrice comes with predefined annotations, which can be found in Annotations.room within the eTrice modellib.
@@ -433,7 +433,7 @@
-
+
@@ -600,6 +600,47 @@
+CPBranchTransition
+
programming languages. The choice point branch transition corresponds to an if clause while the final else is modeled as
a continuation transition. Coming from a choice point, a choice point branch transition is traversed whenever its
condition evaluates to true. No order of evaluations is guaranteed.
+
+
+
+
+
+
+Features
+
+
+
+
+
+
+
+ChoicePoint
+
One of the outgoing transitions has no condition (a ContinuationTransition). It is the default branch that is taken
if none of the transition conditions evaluated to true. All other transitions going out from the ChoicePoint
are CPBranchTransitions which have a mandatory condition (keyword ‘cond’). The evaluation order of the conditions
is not deterministic.
+
+
+
+
+
+
+Features
+
+
+
+
+
+
+
+
+
+
+
+
CommunicationType
The combination of communication and execution is called the execution model. Therefore the ExecutionType of an actor and the CommunicationType of the ports has to be considered.
+ContinuationTransition
+
+
+
+
+
+
+
+Features
+
+
+
+
+
+
+
+
+
+
+
+
+
+Feature Usage
+
+
+
+
+
+
+
DataClass
-
+
-
+
```room<br/> DataClass SimpleDataClass {<br/> Attribute attribute1: uint16<br/> Attribute attribute2: uint32<br/> }</p>
-<pre><code> DataClass DataClassExample {
- Attribute attribute1: uint32
- Attribute attribute2: SimpleDataClass
- Attribute attribute3: voidType ref
-
- Operation operation1(param1: uint32, param2: uint16): boolean '''
- return true;
- '''
- }
- ```
-¦¦¦
+DataClass SimpleDataClass {
+ Attribute attribute1: uint16
+ Attribute attribute2: uint32
+}
-
A DataType can take 4 forms and types data elements like an Attribute or Operation argument
an entry point is an explicit entry point in a sub state machine to which transitions in the parent state graph can connect
+text
+Features | +||
---|---|---|
Is a: |
+ + | a TrPoint can be an EntryPoint, an ExitPoint or a TransitionPoint |
+
An EnumerationType declares an enumeration similar to most well-known languages
Example:
-¦¦¦
```room<br/> // Include is needed when used (e.g. in ActorClassWithExternalType)<br/> ExternalType someStructType -> “struct FILE_HANDLE”</p>
-<pre><code> ActorClass ActorClassWithExternalType{
- Structure {
- usercode1 '''
- // #include <___.h> /* User includes here*/
- '''
- Attribute someHandle : someStructType ref // needs include
- }
- Behavior {
- Operation operation1(param1: charPtr) '''
- // external calls or casts may need includes
- write(someHandle, param1);
- '''
- }
- }
- ```
-¦¦¦
+
// Include is needed when used (e.g. in ActorClassWithExternalType)
+ExternalType someStructType -> "struct FILE_HANDLE"
-
+ActorClass ActorClassWithExternalType{
+ Structure {
+ usercode1 '''
+ // #include <___.h> /* User includes here*/
+ '''
+ Attribute someHandle : someStructType ref // needs include
+ }
+ Behavior {
+ Operation operation1(param1: charPtr) '''
+ // external calls or casts may need includes
+ write(someHandle, param1);
+ '''
+ }
+}
+
+A class can specify a super class and inherits elements from the super class hierarchy
+A class can specify a single super class and inherits elements from the super class hierarchy
When a ROOM class specifies a super class, it generally inherits all elements and properties.
In several cases, it is possible, to override these inherited elements. Generally, eTrice has two semantics of overriding: refinement and replacement.
Refinement is used in most cases (e.g. StateMachine) and realizes an extension of the overridden elements.
In this case, if a sub class overrides a piece of logic from a super class, it will always be executed subsequently to the inherited.
Contrary to this, replacement is applied to overridden Operations, similar to programming languages C++ and Java.
A formal definition of overriding is given below:
+A formal definition of several variants of overriding is given below:
Examples programming languages:
c++ virtual function and java override <==> accessible explicit late replacing
c++ function redefine <==> accessible implicit early replacing
c++ dtor <==> late refinement\
eTrice override of model elements:
Operations (C generation) <==> non_accessible explicit late replacing
Operations (Java generation) <==> accessible explicit late replacing
State and Transitions <==> non-accessible explicit late refinement
ctor/dtor <==> non_accessible implicit late refinement
StateMachine <==> non-accessible implicit late refinement
UserCode <==> non-accessible implicit late refinement
Examples from programming languages:
C++ virtual function and Java override <==> accessible, explicit, late, replacing
C++ function redefine <==> accessible, implicit, early, replacing
C++ destructor <==> late, refining\
eTrice override of model elements:
Operations (C generation) <==> non-accessible, explicit, late, replacing
Operations (Java generation) <==> accessible, explicit, late, replacing
State and Transitions <==> non-accessible, explicit, late, refining
ctor/dtor <==> non-accessible, implicit, late, refining
StateMachine <==> non-accessible, implicit, late, refining
UserCode <==> non-accessible, implicit, late, refining
Is used by: |
+ Is used by: |
An actor is the basic structural building block for building systems with ROOM |
A StateMachine describes the state based, event driven behavior of an ActorClass |
+
+ | A StateGraphNode is an abstract node of the state graph |
+||
+ | A State can be a plain State or a RefinedState |
+||
+ | A State is a node in the state graph representation of the state machine |
+||
+ | A RefinedState refines a State of one of the Actor’s base class state machines |
+||
+ | A Transition is an edge in the state graph representation of the state machine |
+||
A ProtocolClass defines messages and is the interface specification for a Port |
@@ -1006,42 +1137,61 @@
Example:
-¦¦¦
```room<br/> ActorClass ActorSubClass extends ActorBaseClass {<br/> // inherits all elements from super type hierarchy<br/> }</p>
-<pre><code> ActorClass ActorBaseClass {
- Interface {
- Port port1 : ProtocolBaseClass
- }
- Structure {
- Attribute attribute1 : uint32
- }
- Behavior {
- Operation operation1() '''
- return;
- '''
- }
- }
+
ActorClass ActorSubClass extends ActorBaseClass {
+ // inherits all elements from super type hierarchy
+}
- ProtocolClass ProtocolSubClass extends ProtocolBaseClass {
- // inherits all elements from super type hierarchy
- }
+ActorClass ActorBaseClass {
+ Interface {
+ Port port1 : ProtocolBaseClass
+ }
+ Structure {
+ Attribute attribute1 : uint32
+ }
+ Behavior {
+ Operation operation1() '''
+ return;
+ '''
+ }
+}
- ProtocolClass ProtocolBaseClass {
- incoming {
- Message message1()
- }
- }
+ProtocolClass ProtocolSubClass extends ProtocolBaseClass {
+ // inherits all elements from super type hierarchy
+}
- DataClass DataSubClass extends DataBaseClass {
- // inherits all elements from super type hierarchy
- }
+ProtocolClass ProtocolBaseClass {
+ incoming {
+ Message message1()
+ }
+}
- DataClass DataBaseClass {
- Attribute attribute1 : uint32
- }
- ```
- ¦¦¦
+DataClass DataSubClass extends DataBaseClass {
+ // inherits all elements from super type hierarchy
+}
-
+DataClass DataBaseClass {
+ Attribute attribute1 : uint32
+}
+
+the initial transition is used to identify the initial state
+The initial transition connects the initial point to a state. There can be at most one initial transition
in a state machine. Under special circumstances the initial transition can be omitted.
Features | +||
---|---|---|
Is a: |
+ + | A Transition is an edge in the state graph representation of the state machine |
+
A InternalEndPort is an local Port, that is declared in the internal interface of an ActorClass
ActorClass InternalEndPortExample {
@@ -1140,7 +1290,7 @@
- An Annotation can be attached to a ROOM classes to apply the properties of its AnnotationType
+ An Annotation can be attached to a ROOM class to specify the properties of its AnnotationType
@@ -1228,44 +1378,43 @@
Example:
-¦¦¦
```room<br/> import room.basic.types.* from “../../../org.eclipse.etrice.modellib.c/model/Types.room”</p>
-<pre><code> DataClass DataClassWithOperation {
- Attribute attribute1 : uint32
-
- Operation operation1(param1: uint32, param2: int32): boolean '''
- return attribute1 > (param1 - param2);
- '''
- }
+
import room.basic.types.* from "../../../org.eclipse.etrice.modellib.c/model/Types.room"
- ActorClass ActorClassWithOperation {
- Structure {
- Attribute attribute1 : uint32
- }
- Behavior {
- Operation operation1(param1: uint32, param2: int32): boolean '''
- return attribute1 > (param1 - param2);
- '''
- }
- }
+DataClass DataClassWithOperation {
+ Attribute attribute1 : uint32
+
+ Operation operation1(param1: uint32, param2: int32): boolean '''
+ return attribute1 > (param1 - param2);
+ '''
+}
- ActorClass ActorClassWithOperation2 {
- Structure {
- usercode1 '''
- // #include <___.h> /* User includes here */
- '''
- Attribute someHandle : voidType ref
- }
- Behavior {
- Operation operation1(param1: charPtr) '''
- // external calls or casts may need includes
- write(someHandle, param1);
- '''
- }
- }
- ```
-¦¦¦
+ActorClass ActorClassWithOperation {
+ Structure {
+ Attribute attribute1 : uint32
+ }
+ Behavior {
+ Operation operation1(param1: uint32, param2: int32): boolean '''
+ return attribute1 > (param1 - param2);
+ '''
+ }
+}
-
+ActorClass ActorClassWithOperation2 {
+ Structure {
+ usercode1 '''
+ // #include <___.h> /* User includes here */
+ '''
+ Attribute someHandle : voidType ref
+ }
+ Behavior {
+ Operation operation1(param1: charPtr) '''
+ // external calls or casts may need includes
+ write(someHandle, param1);
+ '''
+ }
+}
+
+
Port
A Port is an instance of a ProtocolClass and the interface for an ActorClass
Once a ProtocolClass has been created, it can be used to define actor interfaces. This is accomplished by means of Ports.
A Port is a declaration that the set of messages defined by its ProtocolClass is now part of the actor’s interface.
It provides strong decoupling of ActorClasses from each other, thus enabling easy testability, reusability and deployment of actors to different threads or nodes.
@@ -1435,12 +1584,12 @@
- An Annotation can be attached to a ROOM classes to apply the properties of its AnnotationType
+ An Annotation can be attached to a ROOM class to specify the properties of its AnnotationType
Uses:
- A class can specify a super class and inherits elements from the super class hierarchy
+ A class can specify a single super class and inherits elements from the super class hierarchy
@@ -1509,6 +1658,33 @@
}
A RefinedState refines a State of one of the Actor’s base class state machines
+A State can be a plain State or a RefinedState.
+Features | +||
---|---|---|
Is a: |
+ + | A State can be a plain State or a RefinedState |
+
Uses: |
+ + | A class can specify a single super class and inherits elements from the super class hierarchy |
+
+ | A StateMachine describes the state based, event driven behavior of an ActorClass |
+
A RelayPort forwards its messages without exposing them to the internal interface of the ActorClass
ActorClass RelayPortExample{
@@ -1700,9 +1876,131 @@
+SimpleState
+A State is a node in the state graph representation of the state machine
+A State has optional ‘entry’ and ‘exit’ codes. The entry code is executed when the state is entered, the exit code is executed
when it is left. In the case of an data driven (also known as polled) state machine, there also is a ‘do’ action code.
The do code is executed for the active state in each polling cycle.
A state can have a sub state machine. Starting at the top level state machine the states with their optional sub state machines
form a tree which is called a ‘hierarchical state machine’.
A state machine always is in exactly one state which can only be a leaf state, i.e. a state which has no sub state machine.
+
+
+
+ Features
+
+
+
+
+ Is a:
+
+ A State can be a plain State or a RefinedState
+
+
+ Uses:
+
+ A class can specify a single super class and inherits elements from the super class hierarchy
+
+
+
+ A StateMachine describes the state based, event driven behavior of an ActorClass
+
+
+
+
+State
+A State can be a plain State or a RefinedState
+A State can be a plain State or a RefinedState.
+
+
+
+ Features
+
+
+
+
+ Is a:
+
+ A StateGraphNode is an abstract node of the state graph
+
+
+ Uses:
+
+ A class can specify a single super class and inherits elements from the super class hierarchy
+
+
+
+
+
+
+ Feature Usage
+
+
+
+
+ Inheriting features:
+
+ A State is a node in the state graph representation of the state machine
+
+
+
+ A RefinedState refines a State of one of the Actor’s base class state machines
+
+
+
+
+StateGraphNode
+A StateGraphNode is an abstract node of the state graph
+A StateGraphNode can be a State, a TransitionPoint, a ChoicePoint or an InitialPoint.
+
+
+
+ Features
+
+
+
+
+ Uses:
+
+ A class can specify a single super class and inherits elements from the super class hierarchy
+
+
+
+
+
+
+ Feature Usage
+
+
+
+
+ Inheriting features:
+
+ A State can be a plain State or a RefinedState
+
+
+
+ a choice point is the state machine counterpart of a conditional statement
+
+
+
+ a TrPoint can be an EntryPoint, an ExitPoint or a TransitionPoint
+
+
+ Is contained in:
+
+ A StateMachine describes the state based, event driven behavior of an ActorClass
+
+
+
+
StateMachine
A StateMachine describes the state based, event driven behavior of an ActorClass
-In ROOM each actor class can implement its behavior using a state machine. Events occurring at the end ports of an actor will be forwarded to and processed by the state machine. Events possibly trigger state transitions.
+In ROOM each actor class can implement its behavior using a state machine. Events occurring at the end ports of an actor will
be forwarded to and processed by the state machine. Events possibly trigger state transitions.
+ROOM state machines are hierarchical finite state machines. That means that each state in the state graph can contain another state graph.
This is possible to arbitrary depth.
+A state graph consists of
+
+ - states
+ - transitions
+ - transition points
+ - choice points
+ - initial point
+
@@ -1711,10 +2009,19 @@
+
+ Contains:
+
+ A StateGraphNode is an abstract node of the state graph
+
+
+
+ A Transition is an edge in the state graph representation of the state machine
+
Uses:
- A class can specify a super class and inherits elements from the super class hierarchy
+ A class can specify a single super class and inherits elements from the super class hierarchy
@@ -1735,6 +2042,15 @@
The GraphicalBehaviorEditor allows to edit the ActorClass’ StateMachine. It is possible to create (hierarchical) states and transitions to model complex behavior in a convenient way.
+
+ Is used by:
+
+ A State is a node in the state graph representation of the state machine
+
+
+
+ A RefinedState refines a State of one of the Actor’s base class state machines
+
@@ -1763,7 +2079,7 @@
- An Annotation can be attached to a ROOM classes to apply the properties of its AnnotationType
+ An Annotation can be attached to a ROOM class to specify the properties of its AnnotationType
@@ -1825,6 +2141,131 @@
+TrPoint
+a TrPoint can be an EntryPoint, an ExitPoint or a TransitionPoint
+text
+
+
+
+ Features
+
+
+
+
+ Is a:
+
+ A StateGraphNode is an abstract node of the state graph
+
+
+
+
+
+
+ Feature Usage
+
+
+
+
+ Inheriting features:
+
+ a transition point is the starting point of transitions that trigger for any state of this state machine
+
+
+
+ an entry point is an explicit entry point in a sub state machine to which transitions in the parent state graph can connect
+
+
+
+ an exit point is an explicit exit point in a sub state machine from which transitions in the parent state graph can start
+
+
+
+
+Transition
+A Transition is an edge in the state graph representation of the state machine
+A transition connects StateGraphNodes in a state graph. A transition is allowed to connect a state or a transition point with itself.
Transition points can only be targets of transitions originating from the same transition point.
The initial point is the source of exactly one transition. In the textual model it is present only in an implicit way.
+
+
+
+ Features
+
+
+
+
+ Uses:
+
+ A class can specify a single super class and inherits elements from the super class hierarchy
+
+
+
+
+
+
+ Feature Usage
+
+
+
+
+ Inheriting features:
+
+ the initial transition is used to identify the initial state
+
+
+
+ the continuation transition is a transition with just an optional action code
+
+
+
+ a choice point branch transition is an outgoing transition from a choice point and is traversed if its conditions is evaluated to true
+
+
+
+ a triggered transition is used in event driven state machines to trigger state transitions
+
+
+ Is contained in:
+
+ A StateMachine describes the state based, event driven behavior of an ActorClass
+
+
+
+
+TransitionPoint
+a transition point is the starting point of transitions that trigger for any state of this state machine
+text
+
+
+
+ Features
+
+
+
+
+ Is a:
+
+ a TrPoint can be an EntryPoint, an ExitPoint or a TransitionPoint
+
+
+
+
+TriggeredTransition
+a triggered transition is used in event driven state machines to trigger state transitions
+text
+
+
+
+ Features
+
+
+
+
+ Is a:
+
+ A Transition is an edge in the state graph representation of the state machine
+
+
+
+
MappingModel
The MappingModel describes the mapping of elements of the LogicalModel to elements of the PhysicalModel
It enables the complete decoupling of the LogicalModel and the PhysicalModel, thus providing a maximum flexibility and reuse for the models.
@@ -2279,7 +2720,7 @@
Uses:
- An Annotation can be attached to a ROOM classes to apply the properties of its AnnotationType
+ An Annotation can be attached to a ROOM class to specify the properties of its AnnotationType
diff --git a/plugins/org.eclipse.etrice.doc/targets/eclipse-help/room-concepts.html b/plugins/org.eclipse.etrice.doc/targets/eclipse-help/room-concepts.html
index 383434f5f..e6ec50cc0 100644
--- a/plugins/org.eclipse.etrice.doc/targets/eclipse-help/room-concepts.html
+++ b/plugins/org.eclipse.etrice.doc/targets/eclipse-help/room-concepts.html
@@ -120,21 +120,21 @@
ActorClass ActorClass4 {
Behavior {
// no arguments, no return value
- Operation operation1(): void '''
+ Operation operation1(): void '''
user code
- '''
+ '''
// argument of primitive type, return value of primitive type
- Operation operation2(Param1: int32, Param2: float64): uint16 '''
+ Operation operation2(Param1: int32, Param2: float64): uint16 '''
user code
- '''
+ '''
// arguments and return value by value
- Operation operation3(Param1: int32, Param2: DataClass1): DataClass1 '''
+ Operation operation3(Param1: int32, Param2: DataClass1): DataClass1 '''
user code
- '''
+ '''
// arguments and return value by reference except for primitive types
- Operation operation4(Param1: int32, Param2: DataClass1 ref): DataClass1 ref '''
+ Operation operation4(Param1: int32, Param2: DataClass1 ref): DataClass1 ref '''
user code
- '''
+ '''
}
}
@@ -376,17 +376,17 @@
Attribute attribute2: float32 // attribute of another primitive type
// no arguments, no return value
- Operation operation1(): void '''
+ Operation operation1(): void '''
user code
- '''
+ '''
// argument of primitive type, no return value
- Operation operation2(Param1: int32): void '''
+ Operation operation2(Param1: int32): void '''
user code
- '''
+ '''
// argument of primitive type, return value of primitive type
- Operation operation3(Param1: int32): float64 '''
+ Operation operation3(Param1: int32): float64 '''
user code
- '''
+ '''
}
Example: DataClass using other DataClasses:
@@ -395,13 +395,13 @@ Attribute attribute2: DataClass1 // attribute of DataClass // arguments and return value by value - Operation operation1(Param1: int32, Param2: DataClass1): DataClass1 ''' + Operation operation1(Param1: int32, Param2: DataClass1): DataClass1 ''' user code - ''' + ''' // arguments and return value by reference except for primitive types - Operation operation2(Param1: int32, Param2: DataClass1 ref): DataClass1 ref ''' + Operation operation2(Param1: int32, Param2: DataClass1 ref): DataClass1 ref ''' user code - ''' + ''' }a choice point branch transition is an outgoing transition from a choice point and is traversed if its conditions is evaluated to true
+Transition tr3: cp cp0 -> state1 {
cond ’‘‘0<=counter && counter<3’’’
}
a choice point is the state machine counterpart of a conditional statement
+ StateMachine {
+ State state0
+ State state1
+ State state2
+ State state3
+ TransitionPoint tr4
+ ChoicePoint cp0
+ Transition init0: initial -> state0
+ Transition tr0: state0 -> state1 {
+ triggers {
+ <in1: p0>
+ }
+ }
+ Transition tr1: state1 -> cp cp0 {
+ triggers {
+ <in1: p0>
+ }
+ }
+ Transition tr2: cp cp0 -> state3
+ Transition tr3: cp cp0 -> state2 {
+ cond '''true'''
+ }
+ Transition tr5: my tr4 -> state0 {
+ triggers {
+ <in2: p0>
+ }
+ }
+ }
+
\ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.doc/targets/keyword-hover/ContinuationTransition.html b/plugins/org.eclipse.etrice.doc/targets/keyword-hover/ContinuationTransition.html
new file mode 100644
index 000000000..85175b1e3
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/targets/keyword-hover/ContinuationTransition.html
@@ -0,0 +1,3 @@
+
+the continuation transition is a transition with just an optional action code
+State running {
subgraph {
EntryPoint ep0
State active
Transition tr0: my ep0 -> active
}
}
an entry point is an explicit entry point in a sub state machine to which transitions in the parent state graph can connect
+ StateMachine {
+ State state0 {
+ subgraph {
+ State state0
+ EntryPoint ep0
+ ExitPoint ep1
+ Transition tr0: my ep0 -> state0
+ Transition tr1: state0 -> my ep1 {
+ triggers {
+ <in1: p0>
+ }
+ }
+ }
+ }
+ State state1
+ Transition init0: initial -> ep0 of state0
+ Transition tr0: ep1 of state0 -> state1
+ }
+
\ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.doc/targets/keyword-hover/ExitPoint.html b/plugins/org.eclipse.etrice.doc/targets/keyword-hover/ExitPoint.html
new file mode 100644
index 000000000..4b7a6254c
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/targets/keyword-hover/ExitPoint.html
@@ -0,0 +1,3 @@
+
+an exit point is an explicit exit point in a sub state machine from which transitions in the parent state graph can start
+help
\ No newline at end of file diff --git a/plugins/org.eclipse.etrice.doc/targets/keyword-hover/GuardedTransition.html b/plugins/org.eclipse.etrice.doc/targets/keyword-hover/GuardedTransition.html new file mode 100644 index 000000000..6d2f2e7dc --- /dev/null +++ b/plugins/org.eclipse.etrice.doc/targets/keyword-hover/GuardedTransition.html @@ -0,0 +1,3 @@ + +the guarded transition is used by data driven state machines to trigger state transitions
+Transition tr: running -> running {
guard ’‘‘data_counter_finish.finish == true && data_finish_flag == false’’‘
action ’’‘++counter;’’’
}
the initial transition is used to identify the initial state
+Transition init: initial -> state0
\ No newline at end of file diff --git a/plugins/org.eclipse.etrice.doc/targets/keyword-hover/PrimitiveType.html b/plugins/org.eclipse.etrice.doc/targets/keyword-hover/PrimitiveType.html index 482f17025..db0a7c739 100644 --- a/plugins/org.eclipse.etrice.doc/targets/keyword-hover/PrimitiveType.html +++ b/plugins/org.eclipse.etrice.doc/targets/keyword-hover/PrimitiveType.html @@ -1,6 +1,6 @@A PrimitiveType is an abstraction of a target language’s basic type (e.g. integer or boolean)
-// java
+// Java
PrimitiveType boolean: ptBoolean -> boolean (Boolean) default "false"
PrimitiveType int16: ptInteger -> short (Short) default "0"
diff --git a/plugins/org.eclipse.etrice.doc/targets/keyword-hover/RefinedState.html b/plugins/org.eclipse.etrice.doc/targets/keyword-hover/RefinedState.html
new file mode 100644
index 000000000..c8cd2ce86
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/targets/keyword-hover/RefinedState.html
@@ -0,0 +1,11 @@
+
+A RefinedState refines a State of one of the Actor’s base class state machines
+ RefinedState BaseState {
+ exit '''// this is derived exit code'''
+ subgraph {
+ // add a sub state machine
+ Transition init: initial -> state0 { }
+ State state0
+ }
+ }
+
\ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.doc/targets/keyword-hover/SimpleState.html b/plugins/org.eclipse.etrice.doc/targets/keyword-hover/SimpleState.html
new file mode 100644
index 000000000..d032d034d
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/targets/keyword-hover/SimpleState.html
@@ -0,0 +1,33 @@
+
+A State is a node in the state graph representation of the state machine
+ActorClass Example {
+ //...
+ Behavior {
+ StateMachine {
+ Transition init: initial -> Standby
+ Transition tr0: Standby -> Running {
+ triggers {
+ <timeout: to>
+ }
+ }
+ Transition tr1: Running -> Stopped {
+ triggers {
+ <timeout: to>
+ }
+ }
+ State Standby {
+ entry '''
+ to.startTimeout(200*10);'''
+ }
+ State Running {
+ entry '''
+ controllers.start();
+ to.startTimeout(200*10);'''
+ }
+ State Stopped {
+ entry '''controllers.stop();'''
+ }
+ }
+ }
+}
+
\ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.doc/targets/keyword-hover/TrPoint.html b/plugins/org.eclipse.etrice.doc/targets/keyword-hover/TrPoint.html
new file mode 100644
index 000000000..d508117e0
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/targets/keyword-hover/TrPoint.html
@@ -0,0 +1,3 @@
+
+a TrPoint can be an EntryPoint, an ExitPoint or a TransitionPoint
+a TrPoint is an abstract element
\ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.doc/targets/keyword-hover/Transition.html b/plugins/org.eclipse.etrice.doc/targets/keyword-hover/Transition.html
new file mode 100644
index 000000000..dc7ac5abc
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/targets/keyword-hover/Transition.html
@@ -0,0 +1,9 @@
+
+A Transition is an edge in the state graph representation of the state machine
+ Transition init: initial -> Standby
+ Transition tr0: Standby -> Running {
+ triggers {
+ <timeout: to>
+ }
+ }
+
\ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.doc/targets/keyword-hover/TransitionPoint.html b/plugins/org.eclipse.etrice.doc/targets/keyword-hover/TransitionPoint.html
new file mode 100644
index 000000000..ddcc4f441
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/targets/keyword-hover/TransitionPoint.html
@@ -0,0 +1,11 @@
+
+a transition point is the starting point of transitions that trigger for any state of this state machine
+ StateMachine {
+ TransitionPoint tp1
+ Transition tr1: my tp1 -> my tp1 {
+ triggers {
+ <msg: port>
+ }
+ }
+ }
+
\ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.doc/targets/keyword-hover/TriggeredTransition.html b/plugins/org.eclipse.etrice.doc/targets/keyword-hover/TriggeredTransition.html
new file mode 100644
index 000000000..927701086
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/targets/keyword-hover/TriggeredTransition.html
@@ -0,0 +1,3 @@
+
+a triggered transition is used in event driven state machines to trigger state transitions
+help
\ No newline at end of file
--
cgit v1.2.3