secure-dev-ops/code-realtime
@@ -218,13 +229,18 @@
+
+
+
+
+
+
+
+ Home
-
-
-
- Home
-
-
+
+
+
@@ -232,14 +248,35 @@
+
+
+
+
+
+
+
+
+
+ Documentation
+
+
+
+
+
+
-
- Documentation
+
+
+
+
+
+ Samples
+
@@ -248,37 +285,35 @@
-
-
-
-
- Samples
-
-
-
-
+
+
+
+
+ Forum
-
-
-
- Forum
-
-
+
+
+
+
+
+
+
+
+
+
+ Videos
-
-
-
- Videos
-
-
+
+
+
@@ -297,6 +332,7 @@
+
Calling Code from an Inherited Transition
+
Guard and effect code for a transition that redefines an inherited transition can call the guard and effect code snippet from that inherited transition. For this purpose two C++ macros are available:
+
+- CALLSUPER Calls the inherited code snippet with the same
rtdata
and rtport
arguments.
+- SUPERMETHOD Calls the inherited code snippet with custom values for
rtdata
and rtport
.
+
+
That is, CALLSUPER
is equivalent to SUPERMETHOD(rtdata, rtport)
.
+
+
Example
+
You can find a sample application where these macros are used here.
+
+
Note that these macros are just a convenience and you can accomplish the same thing if you place the code of the transition code snippet in a virtual capsule member function, which then can be overridden in the sub capsule.
Class Inheritance
A class with state machine can inherit from other classes with state machines, or from C++ classes (or structs). Multiple inheritance is supported.
Contrary to capsule inheritance, class inheritance does not imply inheritance between the state machines in the derived and base classes. This means it's not possible to redefine or exclude states and transitions in an inherited class state machine. Nor is it possible to redefine trigger operations. In fact, the derived class will have two state machines (its own, plus the one inherited from the base class) and these two state machines will execute independently of each other. That is, class inheritance is more a way of aggregating state machines rather than reusing and redefining them. Because of this, it's rather unusual to let two classes with state machines inherit each other. It's more useful to let a class with state machine inherit from other C++ classes.
@@ -2650,59 +3117,59 @@
Property
Art Elements |
-Property |
-Type |
-Default |
+Property |
+Type |
+Default |
Capsule |
-generate_file_header |
-Boolean |
-true |
+generate_file_header |
+Boolean |
+true |
Capsule |
-generate_file_impl |
-Boolean |
-true |
+generate_file_impl |
+Boolean |
+true |
Capsule, Protocol, Port, Initial transition, Triggered transition Trigger |
-rule_config |
-String |
-"" |
+rule_config |
+String |
+"" |
Protocol |
-version |
-Integer |
-0 |
+version |
+Integer |
+0 |
Port |
-registration |
-Enumeration (automatic, automatic_locked, application) |
-automatic |
+registration |
+Enumeration (automatic, automatic_locked, application) |
+automatic |
Port |
-registration_name |
-String |
-"" |
+registration_name |
+String |
+"" |
Initial transition, Triggered transition |
-const_rtdata |
-Boolean |
-true |
+const_rtdata |
+Boolean |
+true |
Transition, State, Choice, Junction, Entry Point, Exit Point, Port, Part, Capsule, Class |
-color |
-String |
-"" |
+color |
+String |
+"" |
@@ -2741,17 +3208,26 @@
color
+
+
+
+
+
+
+
+