Composite Components

Creating Composite Components

To create a composite component, first select more than one component. Then select Create Composite Component from the context menu.

Creating a composite component


New Composite Component dialog


New Composite Component dialog items

Dialog name Description
Manager Select a manager from those displayed in the name service view. The composite component will be created in that manager.
Name Instance name of the composite component.
Type Set the type of the component. The following types are available:
PeriodicECShared
All RTCs will only share the execution context. The individual RTCs will have separate state, allowing multiple states to exist within a single composite component.
PeriodicStateShared
As well as sharing an execution context, the components will also share state.
Grouping
Nothing will be shared betweeen child components.
Path Path setting for the composite component.
Port Select which ports of the child components will be proxied to the composite component, making them accessible from outside the composite component.
- Select or deselect all ports.


When creating a composite component, the child components that were selected in the system editor will disappear and a new composite component will take their place. Double-click on this new component, or right-click on it and select Open with System Diagram Editor to open the component's internals in a new system editor.

Opening a composite component in a new system editor


fig65ViewCompositeComponent_en.png
Composite component internals displayed in a system editor


When saving the system structure, only one component diagram can be saved. Because of this, when displaying the internals of a composite component, any changes to the component diagram will not be saved.

Add Child Component

Open the composite component in a system editor and drag components from the name server view into it to add them as child components. Newly-added components start with all their ports private.

Adding a child component


Delete Child Component

Open the composite component in a system editor and delete the unwanted child component. The child component will be removed from the composite component and displayed in the system diagram in which the composite component itself is displayed.

Deleting a child component


fig68ChildComponent_en.png
The system diagram in which the composite component is displayed.


Deleting a Composite Component

Right-click on the composite component and select Delete to remove the composite component from the diagram. If the component is open in another system diagram, a warning dialog will be displayed.

Deleting a composite component


Warning displayed when deleting a composite component open elsewhere


Decomposing a Composite Component

Right-click on the composite component and select Decompose Composite Component. exit() will be sent to the component and the component will terminate. If the component is open in another system diagram, a warning will be displayed. The child components will be displayed in the system diagram in which the composite component was displayed.

Decomposing a Composite Component


Warning displayed when decomposing a composite component open elsewhere.


Changing ports between public and private

When editing the internals of a composite component, the public ports of child components will be displayed using the following symbols.

name image
InPort
IconInPort.png
OutPort
IconOutPort.png
ServicePort
IconServicePort.png

To make a port private, right-click on it and select Unexport. To make a port public, right-click on it and select Export.

Making ports public and private


If a port is connected to another component, it cannot be made private until it is disconnected.

fig74Export_en.png
A connected port