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 { + + } + } + Transition tr1: Running -> Stopped { + triggers { + + } + } + State Standby { + entry ''' + to.startTimeout(200*10);''' + } + State Running { + entry ''' + controllers.start(); + to.startTimeout(200*10);''' + } + State Stopped { + entry '''controllers.stop();''' + } + } + } + } + ``` + ||| + uses Inheritance + uses StateMachine + isA State + stable +; + +Feature RefinedState + description '''A RefinedState refines a State of one of the Actor's base class state machines''' + text ''' + A State can be a plain State or a RefinedState. + ''' + help ||| + ```room + RefinedState BaseState { + exit '''// this is derived exit code''' + subgraph { + // add a sub state machine + Transition init: initial -> state0 { } + State state0 + } + } + ``` + ||| + uses Inheritance + uses StateMachine + isA State + stable +; + +Feature ChoicePoint + description '''a choice point is the state machine counterpart of a conditional statement''' + text ''' + 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. + ''' + help ||| + ```room + StateMachine { + State state0 + State state1 + State state2 + State state3 + TransitionPoint tr4 + ChoicePoint cp0 + Transition init0: initial -> state0 + Transition tr0: state0 -> state1 { + triggers { + + } + } + Transition tr1: state1 -> cp cp0 { + triggers { + + } + } + Transition tr2: cp cp0 -> state3 + Transition tr3: cp cp0 -> state2 { + cond '''true''' + } + Transition tr5: my tr4 -> state0 { + triggers { + + } + } + } + ``` + ||| + isA StateGraphNode + uses ContinuationTransition + stable +; + +abstract Feature TrPoint + description '''a TrPoint can be an EntryPoint, an ExitPoint or a TransitionPoint''' + text '''text''' + help |||a TrPoint is an abstract element||| + isA StateGraphNode + stable +; + +Feature TransitionPoint + description '''a transition point is the starting point of transitions that trigger for any state of this state machine''' + text '''text''' + help ||| + ```room + StateMachine { + TransitionPoint tp1 + Transition tr1: my tp1 -> my tp1 { + triggers { + + } + } + } + ``` + ||| + isA TrPoint + stable +; + +Feature EntryPoint + description '''an entry point is an explicit entry point in a sub state machine to which transitions in the parent state graph can connect''' + text '''text''' + help ||| + ```room + StateMachine { + State state0 { + subgraph { + State state0 + EntryPoint ep0 + ExitPoint ep1 + Transition tr0: my ep0 -> state0 + Transition tr1: state0 -> my ep1 { + triggers { + + } + } + } + } + State state1 + Transition init0: initial -> ep0 of state0 + Transition tr0: ep1 of state0 -> state1 + } + ``` + ||| + isA TrPoint + stable +; + +Feature ExitPoint + description '''an exit point is an explicit exit point in a sub state machine from which transitions in the parent state graph can start''' + text '''text''' + help |||help||| + isA TrPoint + stable +; + +Feature Transition + description '''A Transition is an edge in the state graph representation of the state machine''' + text ''' + 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. + ''' + help ||| + ```room + Transition init: initial -> Standby + Transition tr0: Standby -> Running { + triggers { + + } + } + ``` + ||| + uses Inheritance + stable +; + +Feature InitialTransition + description '''the initial transition is used to identify the initial state''' + text '''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. + ''' + help |||Transition init: initial -> state0||| + isA Transition + stable +; + +Feature GuardedTransition + description '''the guarded transition is used by data driven state machines to trigger state transitions''' + text '''In data driven state machines guarded transitions fire whenever the guard condition evaluates to true. + The evaluation is performed in each polling cycle. + ''' + help ||| + Transition tr: running -> running { + guard '''data_counter_finish.finish == true && data_finish_flag == false''' + action '''++counter;''' + } + ||| + idea +; + +Feature ContinuationTransition + description '''the continuation transition is a transition with just an optional action code''' + text '''A continuation transition is used as default branch of a choice point or as outgoing transition of an entry point''' + help ''' + State running { + subgraph { + EntryPoint ep0 + State active + Transition tr0: my ep0 -> active + } + } + ''' + isA Transition + idea +; + +Feature CPBranchTransition + description '''a choice point branch transition is an outgoing transition from a choice point and is traversed if its conditions is evaluated to true''' + text '''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. + ''' + help ||| + Transition tr3: cp cp0 -> state1 { + cond '''0<=counter && counter<3''' + } + ||| + isA Transition + idea +; + +Feature TriggeredTransition + description '''a triggered transition is used in event driven state machines to trigger state transitions''' + text '''text''' + help |||help||| + isA Transition + stable +; Feature SubSystemRef description '''A Sub System Reference is an instance of an SubSystemClass''' @@ -746,7 +1047,7 @@ Feature ProtocolClass } ``` ''' - help ¦¦¦ + help ||| ```room // prefixes: (eventdriven, datadriven, sync) ProtocolClass ProtocolName ["An eventdriven ProtocolClass by default"] { @@ -774,7 +1075,7 @@ Feature ProtocolClass // inherits all elements from super class } ``` - ¦¦¦ + ||| contains CommunicationType contains Attribute contains Operation @@ -801,7 +1102,7 @@ Feature PrimitiveType ''' help ''' ```room - // java + // Java PrimitiveType boolean: ptBoolean -> boolean (Boolean) default "false" PrimitiveType int16: ptInteger -> short (Short) default "0" @@ -870,7 +1171,7 @@ Feature DataClass } ``` ''' - example ¦¦¦ + example ||| ```room DataClass SimpleDataClass { Attribute attribute1: uint16 @@ -887,8 +1188,8 @@ Feature DataClass ''' } ``` - ¦¦¦ - help ¦¦¦ + ||| + help ||| ```room DataClass DataClassName ["Documentation"] { Attribute ... // nested DataClasses possible @@ -902,7 +1203,7 @@ Feature DataClass ... } ``` - ¦¦¦ + ||| isA DataType contains Attribute contains Operation @@ -912,7 +1213,7 @@ Feature DataClass Feature ExternalType description '''An ExternalType is used to make an target language type accessible in ROOM''' - example ¦¦¦ + example ||| ```room // Include is needed when used (e.g. in ActorClassWithExternalType) ExternalType someStructType -> "struct FILE_HANDLE" @@ -932,7 +1233,7 @@ Feature ExternalType } } ``` - ¦¦¦ + ||| help ''' ```room ExternalType voidType -> "void" default "NULL" @@ -1015,7 +1316,7 @@ Feature Operation - 'override' keyword, replaces the logic of the inherited operation having the same signature ''' - example ¦¦¦ + example ||| ```room import room.basic.types.* from "../../../org.eclipse.etrice.modellib.c/model/Types.room" @@ -1053,8 +1354,8 @@ Feature Operation } } ``` - ¦¦¦ - help ¦¦¦ + ||| + help ||| ```room Operation operationName() ["A void operation"] ''' user code here; @@ -1070,7 +1371,7 @@ Feature Operation // becomes effective in entire inheritance hierarchy override Operation operationName(param: int32) : boolean ''' ''' ``` - ¦¦¦ + ||| uses DataType property returnType values { "DataType" } property arguments values { "name : DataType" } diff --git a/plugins/org.eclipse.etrice.doc/online-doc/content/feature-reference.md b/plugins/org.eclipse.etrice.doc/online-doc/content/feature-reference.md index 6e4a804c4..0d23476ec 100644 --- a/plugins/org.eclipse.etrice.doc/online-doc/content/feature-reference.md +++ b/plugins/org.eclipse.etrice.doc/online-doc/content/feature-reference.md @@ -255,13 +255,13 @@ An ActorClass consists of three main parts: [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 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 @@ -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. 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. + + + + + + + + + + + + + + + +
Features
Is a:[Transition](#transition) + A Transition is an edge in the state graph representation of the state machine
+ + + +--- + + +### 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:[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
+ + + --- @@ -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:[Transition](#transition) + A Transition is an edge in the state graph representation of the state machine
+ + + + + + + + + + + + + + +
Feature Usage
Is used by:[ChoicePoint](#choicepoint) + a choice point is the state machine counterpart of a conditional statement
+ + +--- + + ### DataClass A DataClass is a composition of Attributes @@ -860,13 +969,13 @@ DataClass TCPConnectionData { [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 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 @@ -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 + + + + + + + + + + + + + + + +
Features
Is a:[TrPoint](#trpoint) + a TrPoint can be an EntryPoint, an ExitPoint or a TransitionPoint
+ + + --- @@ -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 - 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. + + + + + + + + + + + + + + + +
Features
Is a:[Transition](#transition) + A Transition is an edge in the state graph representation of the state machine
+ + + +--- + + ### 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 [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 @@ -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 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 @@ -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. + + + + + + + + + + + + + + + + + + + + + + + + +
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
+ + + +--- + + ### 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:[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
+ + + + + + + + + + + + + + + + + + +
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
+ + +--- + + +### 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:[Inheritance](#inheritance) + A class can specify a single super class and inherits elements from the super class hierarchy
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
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
+ + +--- + + ### 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 + + 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 + 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 @@ -2179,6 +2610,17 @@ In ROOM each actor class can implement its behavior using a state machine. Event 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 + + + [RefinedState](#refinedstate) + + A RefinedState refines a State of one of the Actor's base class state machines + @@ -2219,7 +2661,7 @@ A SubSystemClass is the structural starting point of an ROOM application. Thus i [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 @@ -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 + + + + + + + + + + + + + + + +
Features
Is a:[StateGraphNode](#stategraphnode) + A StateGraphNode is an abstract node of the state graph
+ + + + + + + + + + + + + + + + + + + + + + +
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
+ + +--- + + +### 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:[Inheritance](#inheritance) + A class can specify a single super class and inherits elements from the super class hierarchy
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
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
+ + +--- + + +### TransitionPoint +a transition point is the starting point of transitions that trigger for any state of this state machine + +text + + + + + + + + + + + + + + + +
Features
Is a:[TrPoint](#trpoint) + 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:[Transition](#transition) + A Transition is an edge in the state graph representation of the state machine
+ + + --- @@ -2916,7 +3529,7 @@ The built-in **Gnuplot script generator** provides a convenient way to visualize 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 @@ + + + + + + + + + + + + + + + + +Mechanism to adjust the generation. + + + + + + + +Runtime logger for event-driven Messages, represented as a Message Sequence Chart. + + + + + + + +Runtime logger for data-driven Messages with primitive data. + + + + + AnnotationTypes can be used to tag ROOM classes for further custom processing @@ -65,22 +103,27 @@ -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 + - -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 + + + + + @@ -139,6 +182,90 @@ + + + + + +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 choice point is the state machine counterpart of a conditional statement + + + + + + +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 + + + + + +A Transition is an edge in the state graph representation of the state machine + + + + + + + + + + +the initial transition is used to identify the initial state + + + + + +the guarded transition is used by data driven state machines to trigger state transitions + + + + +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 + + @@ -149,13 +276,6 @@ - -Replication is mechanism for multi-instantiation for ActorRefs and Ports - - - - - An ActorRef is an instance of an ActorClass @@ -211,18 +331,6 @@ - -A DataType can take 4 forms and types data elements like an Attribute or Operation argument - - - - - - - - - - A PrimitiveType is an abstraction of a target language's basic type (e.g. integer or boolean) @@ -267,21 +375,6 @@ - -A Port is an instance of a ProtocolClass and the interface for an ActorClass - - - - - - - - - - - - - A RelayPort forwards its messages without exposing them to the internal interface of the ActorClass @@ -325,42 +418,4 @@ - - - - - - - - - - - - - - - - - -Mechanism to adjust the generation. - - - - - - - -Runtime logger for event-driven Messages, represented as a Message Sequence Chart. - - - - - - - -Runtime logger for data-driven Messages with primitive data. - - - - diff --git a/plugins/org.eclipse.etrice.doc/targets/eclipse-help/Dave-Integration.html b/plugins/org.eclipse.etrice.doc/targets/eclipse-help/Dave-Integration.html index 3c17cae69..b04dbbfe5 100644 --- a/plugins/org.eclipse.etrice.doc/targets/eclipse-help/Dave-Integration.html +++ b/plugins/org.eclipse.etrice.doc/targets/eclipse-help/Dave-Integration.html @@ -96,9 +96,9 @@

Open BlinkyTutorial.room and create a new Actor called AHWAbstraction by adding the following text:

ActorClass AHWAbstraction {
     Structure {
-        usercode1 '''
-            #include "Dave.h"
-        '''
+        usercode1 '''
+            #include "Dave.h"
+        '''
     }
 }
 
@@ -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 @@ +
  • CPBranchTransition
  • + + + + + + + + +
  • ChoicePoint
  • + + + + + + + +
  • CommunicationType
  • @@ -752,6 +770,15 @@ +
  • ContinuationTransition
  • + + + + + + + +
  • DataClass
  • @@ -770,6 +797,15 @@ +
  • EntryPoint
  • + + + + + + + +
  • Enumeration
  • @@ -788,6 +824,15 @@ +
  • ExitPoint
  • + + + + + + + +
  • ExternalEndPort
  • @@ -815,6 +860,15 @@ +
  • InitialTransition
  • + + + + + + + +
  • InternalEndPort
  • @@ -878,6 +932,15 @@ +
  • RefinedState
  • + + + + + + + +
  • RelayPort
  • @@ -923,6 +986,33 @@ +
  • SimpleState
  • + + + + + + + + +
  • State
  • + + + + + + + + +
  • StateGraphNode
  • + + + + + + + +
  • StateMachine
  • @@ -950,6 +1040,42 @@ +
  • TrPoint
  • + + + + + + + + +
  • Transition
  • + + + + + + + + +
  • TransitionPoint
  • + + + + + + + + +
  • TriggeredTransition
  • + + + + + + + + diff --git a/plugins/org.eclipse.etrice.doc/targets/eclipse-help/feature-reference.html b/plugins/org.eclipse.etrice.doc/targets/eclipse-help/feature-reference.html index 57997975a..0aa8fab51 100644 --- a/plugins/org.eclipse.etrice.doc/targets/eclipse-help/feature-reference.html +++ b/plugins/org.eclipse.etrice.doc/targets/eclipse-help/feature-reference.html @@ -210,12 +210,12 @@

    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

    Uses:

    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

    @@ -347,7 +347,7 @@

    Instance hierarchy of ActorRef Example (*System(System)* not shown in code snippet)


    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:

    @AnnotationType1
     @AnnotationType2(key1="STRING", key2=3, ...)
    @@ -421,7 +421,7 @@
     

    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.

    @@ -433,7 +433,7 @@ - + @@ -600,6 +600,47 @@

    Typecasts:

    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:


    +

    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.

    + + + + + + + + + + + + + +
    Features

    Is a:

    Transition

    A Transition is an edge in the state graph representation of the state machine

    +
    +

    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:

    StateGraphNode

    A StateGraphNode is an abstract node of the state graph

    Uses:

    ContinuationTransition

    the continuation transition is a transition with just an optional action code

    +

    CommunicationType

    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 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.

    @@ -671,6 +712,38 @@ // }

    +

    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:

    Transition

    A Transition is an edge in the state graph representation of the state machine

    + + + + + + + + + + + + + +
    Feature Usage

    Is used by:

    ChoicePoint

    a choice point is the state machine counterpart of a conditional statement

    +

    DataClass

    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.

    @@ -702,30 +775,32 @@

    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

    Uses:

    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

    Example:

    -

    ¦¦¦
    ```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 &#39;&#39;&#39; - return true; - &#39;&#39;&#39; - } - ``` -¦¦¦ +

    DataClass SimpleDataClass {
    +	Attribute attribute1: uint16
    +	Attribute attribute2: uint32
    +}
     
    -


    +DataClass DataClassExample { + Attribute attribute1: uint32 + Attribute attribute2: SimpleDataClass + Attribute attribute3: voidType ref + + Operation operation1(param1: uint32, param2: uint16): boolean ''' + return true; + ''' +} +
    +

    DataType

    A DataType can take 4 forms and types data elements like an Attribute or Operation argument

    @@ -770,6 +845,24 @@

    +

    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

    + + + + + + + + + + + + + +
    Features

    Is a:

    TrPoint

    a TrPoint can be an EntryPoint, an ExitPoint or a TransitionPoint

    +

    Enumeration

    An EnumerationType declares an enumeration similar to most well-known languages

    @@ -887,6 +980,24 @@ }
    +

    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

    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

    ActorClass ExternalEndPortExample {
    @@ -948,37 +1059,37 @@
     
     
     

    Example:

    -

    ¦¦¦
    ```room<br/> // Include is needed when used (e.g. in ActorClassWithExternalType)<br/> ExternalType someStructType -&gt; &ldquo;struct FILE_HANDLE&rdquo;</p> -<pre><code> ActorClass ActorClassWithExternalType{ - Structure { - usercode1 &#39;&#39;&#39; - // #include &lt;___.h&gt; /* User includes here*/ - &#39;&#39;&#39; - Attribute someHandle : someStructType ref // needs include - } - Behavior { - Operation operation1(param1: charPtr) &#39;&#39;&#39; - // external calls or casts may need includes - write(someHandle, param1); - &#39;&#39;&#39; - } - } - ``` -¦¦¦ +

    // 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); + ''' + } +} +
    +

    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.
    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:

      -
    • 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\

    -

    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

    @@ -987,7 +1098,7 @@ - + @@ -995,6 +1106,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -1006,42 +1137,61 @@

    Is used by:

    Is used by:

    ActorClass

    An actor is the basic structural building block for building systems with ROOM

    StateMachine

    A StateMachine describes the state based, event driven behavior of an ActorClass

    StateGraphNode

    A StateGraphNode is an abstract node of the state graph

    State

    A State can be a plain State or a RefinedState

    SimpleState

    A State is a node in the state graph representation of the state machine

    RefinedState

    A RefinedState refines a State of one of the Actor’s base class state machines

    Transition

    A Transition is an edge in the state graph representation of the state machine

    ProtocolClass

    A ProtocolClass defines messages and is the interface specification for a Port

    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() &#39;&#39;&#39; - return; - &#39;&#39;&#39; - } - } +

    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 +} +
    +
    +

    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.

    + + + + + + + + + + + + + +
    Features

    Is a:

    Transition

    A Transition is an edge in the state graph representation of the state machine

    +

    InternalEndPort

    A InternalEndPort is an local Port, that is declared in the internal interface of an ActorClass

    ActorClass InternalEndPortExample {
    @@ -1140,7 +1290,7 @@
     
     
     	

    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

    @@ -1228,44 +1378,43 @@

    Example:

    -

    ¦¦¦
    ```room<br/> import room.basic.types.* from &ldquo;../../../org.eclipse.etrice.modellib.c/model/Types.room&rdquo;</p> -<pre><code> DataClass DataClassWithOperation { - Attribute attribute1 : uint32 - - Operation operation1(param1: uint32, param2: int32): boolean &#39;&#39;&#39; - return attribute1 &gt; (param1 - param2); - &#39;&#39;&#39; - } +

    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 &#39;&#39;&#39;
    -          return attribute1 &gt; (param1 - param2);
    -         &#39;&#39;&#39;
    -       }
    -    }
    +DataClass DataClassWithOperation {
    +	Attribute attribute1 : uint32
    +	
    +	Operation operation1(param1: uint32, param2: int32): boolean '''
    +		return attribute1 > (param1 - param2);
    +	'''
    +}
     
    -    ActorClass ActorClassWithOperation2 {
    -       Structure {
    -         usercode1 &#39;&#39;&#39;
    -          // #include &lt;___.h&gt; /* User includes here */
    -         &#39;&#39;&#39;
    -         Attribute someHandle : voidType ref
    -       }
    -       Behavior {
    -         Operation operation1(param1: charPtr) &#39;&#39;&#39;
    -          // external calls or casts may need includes
    -          write(someHandle, param1);
    -         &#39;&#39;&#39;
    -       }
    -    }
    -    ```
    -¦¦¦
    +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 @@

    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

    Uses:

    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

    @@ -1509,6 +1658,33 @@ }

    +

    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.

    + + + + + + + + + + + + + + + + + + + + + + +
    Features

    Is a:

    State

    A State can be a plain State or a RefinedState

    Uses:

    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

    +

    RelayPort

    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:

    State

    A State can be a plain State or a RefinedState

    Uses:

    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

    +
    +

    State

    +

    A State can be a plain State or a RefinedState

    +

    A State can be a plain State or a RefinedState.

    + + + + + + + + + + + + + + + + + + +
    Features

    Is a:

    StateGraphNode

    A StateGraphNode is an abstract node of the state graph

    Uses:

    Inheritance

    A class can specify a single super class and inherits elements from the super class hierarchy

    + + + + + + + + + + + + + + + + + +
    Feature Usage

    Inheriting features:

    SimpleState

    A State is a node in the state graph representation of the state machine

    RefinedState

    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:

    Inheritance

    A class can specify a single super class and inherits elements from the super class hierarchy

    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Feature Usage

    Inheriting features:

    State

    A State can be a plain State or a RefinedState

    ChoicePoint

    a choice point is the state machine counterpart of a conditional statement

    TrPoint

    a TrPoint can be an EntryPoint, an ExitPoint or a TransitionPoint

    Is contained in:

    StateMachine

    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
    • +

    PingPongReceiverFSM

    @@ -1711,10 +2009,19 @@ + + + + + + + + + - +

    Contains:

    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

    Uses:

    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

    @@ -1735,6 +2042,15 @@

    GraphicalBehaviorEditor

    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

    +

    A State is a node in the state graph representation of the state machine

    + + +

    RefinedState

    +

    A RefinedState refines a State of one of the Actor’s base class state machines

    +
    @@ -1763,7 +2079,7 @@

    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

    @@ -1825,6 +2141,131 @@
    +

    TrPoint

    +

    a TrPoint can be an EntryPoint, an ExitPoint or a TransitionPoint

    +

    text

    + + + + + + + + + + + + + +
    Features

    Is a:

    StateGraphNode

    A StateGraphNode is an abstract node of the state graph

    + + + + + + + + + + + + + + + + + + + + + +
    Feature Usage

    Inheriting features:

    TransitionPoint

    a transition point is the starting point of transitions that trigger for any state of this state machine

    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

    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:

    Inheritance

    A class can specify a single super class and inherits elements from the super class hierarchy

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Feature Usage

    Inheriting features:

    InitialTransition

    the initial transition is used to identify the initial state

    ContinuationTransition

    the continuation transition is a transition with just an optional action code

    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

    a triggered transition is used in event driven state machines to trigger state transitions

    Is contained in:

    StateMachine

    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:

    TrPoint

    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:

    Transition

    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:

    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

    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 - ''' + ''' }

    Layering

    diff --git a/plugins/org.eclipse.etrice.doc/targets/eclipse-help/toc-topics.xml.html b/plugins/org.eclipse.etrice.doc/targets/eclipse-help/toc-topics.xml.html index df79d8ddd..57f009c26 100644 --- a/plugins/org.eclipse.etrice.doc/targets/eclipse-help/toc-topics.xml.html +++ b/plugins/org.eclipse.etrice.doc/targets/eclipse-help/toc-topics.xml.html @@ -95,14 +95,20 @@
    + + + + + + @@ -110,14 +116,22 @@ + + + + + + + +
    diff --git a/plugins/org.eclipse.etrice.doc/targets/keyword-hover/CPBranchTransition.html b/plugins/org.eclipse.etrice.doc/targets/keyword-hover/CPBranchTransition.html new file mode 100644 index 000000000..c00599a38 --- /dev/null +++ b/plugins/org.eclipse.etrice.doc/targets/keyword-hover/CPBranchTransition.html @@ -0,0 +1,3 @@ + +

    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’’’
    }

    \ No newline at end of file diff --git a/plugins/org.eclipse.etrice.doc/targets/keyword-hover/ChoicePoint.html b/plugins/org.eclipse.etrice.doc/targets/keyword-hover/ChoicePoint.html new file mode 100644 index 000000000..77265f187 --- /dev/null +++ b/plugins/org.eclipse.etrice.doc/targets/keyword-hover/ChoicePoint.html @@ -0,0 +1,31 @@ + +

    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
    }
    }

    \ No newline at end of file diff --git a/plugins/org.eclipse.etrice.doc/targets/keyword-hover/EntryPoint.html b/plugins/org.eclipse.etrice.doc/targets/keyword-hover/EntryPoint.html new file mode 100644 index 000000000..3ab8d464f --- /dev/null +++ b/plugins/org.eclipse.etrice.doc/targets/keyword-hover/EntryPoint.html @@ -0,0 +1,21 @@ + +

    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;’’’
    }

    \ No newline at end of file diff --git a/plugins/org.eclipse.etrice.doc/targets/keyword-hover/InitialTransition.html b/plugins/org.eclipse.etrice.doc/targets/keyword-hover/InitialTransition.html new file mode 100644 index 000000000..192c2443a --- /dev/null +++ b/plugins/org.eclipse.etrice.doc/targets/keyword-hover/InitialTransition.html @@ -0,0 +1,3 @@ + +

    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