Support for multi-cast connections [patch]
Summary
- The IConnection base element type in AF3 currently can only model point-to-point connections from a single source to a single target.
- The patch provided with this ticket provides support for multi-cast
connections, i.e.
IConnections
with a single source and 1 or more targets
Motivation
- More natural modeling of multi-cast messages in a real-time system using a single message object (e.g., see Herman Kopetz. Real-Time Systems: Design Principles for Distributed Embedded Applications, Springer, 2011.)
- Counter argument to alternative solution “use demultiplexer component” that is connected using single-cast connections: First, this is not a natural way of modeling multi-cast connections (the user needs to add this intermediate component). While the addition of that component could be automated by the GUI, the resulting meta-model is inconvenient / unnatural for algorithms to walk the component model (e.g., to build a data-dependency graph).
- Counter argument to alternative solution “group single cast connections using dedicated specification / annotation”. While this approach would not distinguishable from the true multi-cast approach provided in this patch, the second counter argument from above (use by algorithms) also holds here.
Implementation details
Basic support in org.fortiss.tooling.base[.ui]
Meta-model
- Introduced
targets
field to @ org.fortiss.tooling.base.model.element.IConnection@ (multiplicity –1) - Kept
target
field in order to maintain syntactic backward compatibility of project files - Disabled code generation of
getTarget()
/setTarget()
methods generated fortarget
- Instead, add
getTarget()
/setTarget()
eOperations that maintain API backward compatibility by manipulating the first element in thetargets
list -
ConnectionMultiCastMigrationProviderBase
for migrating single-cast into multi-cast connections
GUI
- Add
useMultiCastConnections()
predicate method toorg.fortiss.tooling.base.ui.compose.ConnectionCompositorBase
(returningfalse
), and basic UI support for multi-cast connections. - Since many concrete connection compositors do not inherit from this
base class, but directly implement
IConnectionCompositor
, the method cannot be defined inIConnectionCompositor
without the need to touch a lot of plugins
Exemplary instantiation in org.fortiss.af3.component[.ui]
- Definition and registration of
ChannelMultiCastMigrationProvider
- Have
ComponentPortConnectionCompositor
,PortComponentConnectionCompositor
andPortConnectionCompositor
return true foruseMultiCastConnections()
.
(from redmine: issue id 2139, created on 2014-10-09, closed on 2017-01-16)
- Uploads:
- 2014-10-09-connection-multicast.patch Patch providing multi-cast connection support in the kernel, as well as an exemplary instantiation for logical components.