blob: 957005535aabfe1d6bf53c9fe70b6cd008a74c58 [file] [log] [blame]
h2. Components Model
The AMALTHEA component model is central accessible through the __ComponentsModel__ element.
It holds the following types:
* *Components* / *Composites*
* *Systems*
* *Interfaces*
* *Structures*
!(scale)../pictures/model_components.png!
h3. Component Interfaces
!(scale)../pictures/model_components_interface.png!
h3. 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.
!(scale)../pictures/model_components_composition.png!
h3. Components Model Elements
The elements of the Components Model inherit several capabilities from common elements.
!(scale)../pictures/model_components_common.png!
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.
h4. 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.
!(scale)../pictures/model_components_component_references.png!
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.
h4. 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.
!../pictures/model_components_isystem.png!
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'.
h4. 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'.
!(scale)../pictures/model_components_connector.png!
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.
h4. 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.
h4. 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.
h4. 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.
h3. Example
h4. 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.
!../pictures/model_components_example.png!
h4. Model Editor
The same example is shown in the standard AMALTHEA editor.
!../pictures/model_components_example_treeview.png!