## Components Model

The AMALTHEA component model is central accessible through the ComponentsModel element.

It holds the following types:

- Components / Composites
- Systems
- Interfaces
- Structures

### Component Interfaces

### Architecture of Systems / Composites

The inner architecture of a System or a Composite is defined with the ISystem interface. Both elements contain component instances and connectors. The ports of the instances and the containing architecture can be identified as QualifiedPort.

### Components Model Elements

The elements of the Components Model inherit several capabilities from common elements.

Ports, Components, Composites and ComponentInstances are referable by unique names.
A Connector also has a name but the name is optional and does not have to be unique.

#### Component

The ‘Component’ class represents a component. Components could be created directly within the ‘ComponentModel’ and are used as a type for a component instance.

It contains several ports of type ‘Port’. A component refers the classes ‘OsEvent’, ‘Label’, ‘Runnable’ and ‘AbstractProcess’ from the software model and the class ‘Semaphore’ from the OS model.

#### System and Composite

Systems are defined as top level elements within a component model. A system contains several Component- and
Connection-instances and is used to define the architecture of a technical system.

A ‘Composite’ is a special component type to aggregate Component- and Connection-instances compositely.
So it could be used to create hierarchical component architectures.

System and Composite implement the interface ‘ISystem’.
The following diagram shows the main elements to represent the hierarchical architecture.

In general each inner port should be connected. If a port is intentionally left unconnected it has to be added to the list of ‘groundedPorts’.

#### ComponentInstance and Connector

The ‘ComponentInstance’ and the ‘Connector’ can be created within a ‘System’ or a ‘Composite’. ‘ComponentInstances’ are used to represent instances of component- or composite-types. The ‘Connector’ class is used to connect the component instances to each other via their Ports. The connector contains a source and target ‘QualifiedPort’.

To specfiy the implementation details of a connection between ports it is possible to specify an interface/channel pair for each connector. This links additional information from the channel implementation like the access behavior to the connector. The connector can contain multiple interface/channel pairs since an interface can contain multiple sub-interfaces realized by multiple data types implemented by multiple channels.

#### QualifiedPort

A ‘qualified’ port refers a ‘ComponentInstance’ and a ‘ComponentPort’.
If the ‘instance’ link is null then the QualifiedPort refers to a port of the enclosing composite.

#### ComponentPort

The ‘ComponentPort’ class contains the attribute ‘kind’ to set the port direction.
The attribute ‘interface name’ can be used to refer to an external definition, e.g. described in detail with the Franca IDL.

#### Structures

Structures enables structuring/ordering of components, composites and interfaces. In contrasts to namespaces the structure does not add to the qualified name but supports the design of a hierarchical structure to order the elements in a package/folder like scheme.

### Example

#### Diagram

The diagram of the example shows a composite ‘A’ that contains two component instances ‘X’ and ‘Y’ of type ‘B’. The connections between the ports are named ‘c1’ to ‘c4’. The grounded port ‘in_3’ of instance ‘X’ (intentionally left unconnected) is marked green. The second unconnected port ‘in_2’ of instance ‘Y’ is unspecified. It is marked red and has to be changed, either declared as grounded or connected to another port.

#### Model Editor

The same example is shown in the standard AMALTHEA editor.