3.6 Dynamic Actors 6
This example is contained in org.eclipse.etrice.examples.dynamicactors6.
3.6.1 Purpose
The example demonstrates the use of nested dynamic actors.
3.6.2 Details
In this example the dynamically created actor Optional2 has again an optional reference two levels down in its hierarchy. On
creation it immediately creates a nested dynamic actor of class Optional1 which is sending hello() back to the outer
Container.
3.6.3 Noteworthy
- the generated MSC main_Async.seq is a good illustration of the dynamic changes in the system structure
- when a dynamic actor is created its structure is there immediately and all ports are connected. But the initial
transition is executed asynchronously. So after the outer dynamic actor is created the port of the Container
is not yet connected because the initial transition which is responsible for the creation of the inner dynamic
actor wasn’t executed yet. So a message sent from this port directly after creation of the outer dynamic actor
would get lost.