Skip to content

Commit 4113b7f

Browse files
kalu-ancastler
authored andcommitted
mw/com: migrate_umlet_to_plantuml__configuration
Closes #43 Issue: SWP-208704 GIT_ORIGIN_SPP_REV_ID: 0f50b53e87c559de062371a0c3fbd6231e543985
1 parent faa7609 commit 4113b7f

File tree

7 files changed

+357
-1571
lines changed

7 files changed

+357
-1571
lines changed

score/mw/com/design/configuration/README.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Configuration
22

3-
The main configuration items we have to deal with in `mw::com` are mappings from "logical" service instances to real
3+
The main configuration items we have to deal with in `mw::com` are mappings from "logical" service instances to real
44
existing service instances with their concrete used technical binding.
55
Currently, we prepare our configuration to support the following technical bindings:
66
- SOME/IP
@@ -22,7 +22,7 @@ So our implementation of `score::mw::com::ServiceIdentifierType` contains the fu
2222
of its short-name-path as its identifying name member.
2323

2424
_Important_: `score::mw::com::ServiceIdentifierType` is a fully binding independent identification of a service type.
25-
The technical bindings might use complete different data types for identification of a specific service type.
25+
The technical bindings might use complete different data types for identification of a specific service type.
2626
Service versioning is still a very immature topic in AUTOSAR and especially in the SWS Communication Management. So
2727
right now our implementation of `score::mw::com::ServiceVersionType` fulfills the minimal requirements by providing a major
2828
and minor part each typed as `std::uint32_t` to fulfill minimal model compatibility.
@@ -34,7 +34,7 @@ We have to clearly separate those two notions within our configuration.
3434
The `ServiceTypeDeployment` aka `Service Interface Deployment` in AUTOSAR speech, maps a binding independent
3535
`ServiceType` to a concrete technical implementation.
3636
The binding independent `ServiceType` is defined within AUTOSAR metamodel by its Service Interface and its
37-
corresponding [service type identification](#service-type-identification).
37+
corresponding [service type identification](#service-type-identification).
3838
So within the configuration we might need to express, how a certain abstract `ServiceType` shall be represented in a
3939
`SOME/IP` or a `LoLa` binding. For instance, both bindings might use their own, distinct service ID
4040
for identification and also the embedded service parts (events, fields, methods) might have different identification and
@@ -54,7 +54,7 @@ specific properties are:
5454

5555
### Deployment time decisions
5656
While AUTOSAR generally foresees, that `ServiceTypeDeployment` aka `Service Interface Deployment` is a
57-
generation, i.e. pre-compile step, this is **not** true for our implementation! The amount of code, which is affected at
57+
generation, i.e. pre-compile step, this is **not** true for our implementation! The amount of code, which is affected at
5858
generation time is kept minimal and only applies to binding independent parts of `mw::com`. As this is required by the
5959
`ara::com` specification.
6060

@@ -63,20 +63,20 @@ Our technical binding implementation is configured during runtime, when both art
6363

6464
### Responsibility for `ServiceTypeDeployment` and `ServiceInstanceDeployment`
6565

66-
The responsibility for `ServiceInstanceDeployment` is clearly assigned to the integrator of the ECU. The knowledge
66+
The responsibility for `ServiceInstanceDeployment` is clearly assigned to the integrator of the ECU. The knowledge
6767
about processes and applications is needed, in addition to the knowledge on how to package the `ServiceInstanceDeployment`
6868
config artifacts with the applications.
6969

70-
For `ServiceTypeDeployment` this is not so clear. In case of `ServiceTypeDeployments` for local only communication,
71-
which is the case of our `LoLa` binding, it is also the job of the ECU integrator, as it is only a local ECU
72-
optimization. Without any effect to the boardnet. In case of `SOME/IP` `ServiceTypeDeployments`, it might be expected
70+
For `ServiceTypeDeployment` this is not so clear. In case of `ServiceTypeDeployments` for local only communication,
71+
which is the case of our `LoLa` binding, it is also the job of the ECU integrator, as it is only a local ECU
72+
optimization. Without any effect to the boardnet. In case of `SOME/IP` `ServiceTypeDeployments`, it might be expected
7373
for the future, that parts of `ServiceTypeDeployment` come from central toolchains (Symphony).
7474

7575
## Instance Specifiers
7676

7777
`InstanceSpecifier` is an AUTOSAR AP mechanism to specify some instance of a service type in a binding or deployment
7878
independent way **within the source code**!
79-
If you look at the underlying (`ARXML`) model of your software component, you express the provision of a specific
79+
If you look at the underlying (`ARXML`) model of your software component, you express the provision of a specific
8080
service instance or the requirement of a specific service instance with a P-port or R-port respectively, which is typed
8181
by the service interface, from which the [service type identification](#service-type-identification) is deduced.
8282
Such a port instance also has (like a service interface) a fully qualified name (expressed via a short-name-path),
@@ -160,7 +160,7 @@ part and a `ServiceInstanceDeployment` (`service_instances`) in the lower part.
160160

161161
As you see in this example, we map the `InstanceSpecifier` (i.e. port) `"abc/abc/TirePressurePort"` to concrete service
162162
instances.
163-
What is **not** visible here: Whether `"abc/abc/TirePressurePort"` is a provided or required service instance. Both
163+
What is **not** visible here: Whether `"abc/abc/TirePressurePort"` is a provided or required service instance. Both
164164
could be possible, since we do support 1 to n mappings in both cases.
165165
Here we have a mapping of `"abc/abc/TirePressurePort"` to two different concrete technical instances: The first one is a
166166
SOME/IP based instance (so it is most likely used for inter ECU, network communication) and the second is a concrete
@@ -173,7 +173,7 @@ initialization from a default manifest or configuration path, an explicit user p
173173
a directly handed over JSON.
174174
The sequence during startup would look like this:
175175

176-
<img src="broken_link_k/swh/ddad_score/mw/com/design/configuration/sequence_startup_view.uxf?ref=18c835c8d7b01056dd48f257c14f435795a48b7d" />
176+
![SEQUENCE_STARTUP_VIEW]("broken_link_k/swh/safe-posix-platform/score/mw/com/design/configuration/sequence_startup_view.puml")
177177

178178
During this call a singleton instance of `score::mw::com::impl::Runtime` gets created, which gets the parsed/validated
179179
configuration in the form of `score::mw::com::detail::Configuration`.
@@ -182,7 +182,6 @@ configuration in the form of `score::mw::com::detail::Configuration`.
182182
* one (`instanceInstances`), which holds the `ServiceInstanceDeployment`s, where the key is the `InstanceSpecifier`. The
183183
`ServiceInstanceDeployment`s refer to/depend on the `ServiceTypeDeployment`s.
184184

185-
Details can
186-
be seen in the following class diagram:
185+
Details can be seen in the following class diagram:
187186

188-
<img src="broken_link_k/swh/ddad_score/mw/com/design/configuration/structural_view.uxf?ref=18c835c8d7b01056dd48f257c14f435795a48b7d" />
187+
![STRUCTURAL_VIEW]("broken_link_k/swh/safe-posix-platform/score/mw/com/design/configuration/structural_view.puml")
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
@startuml sequence_startup_view
2+
title "Sequence Startup View"
3+
hide footbox
4+
5+
participant "<u>:OS" as OS
6+
participant "<u>:Process</u>\nara::com User" as Process
7+
participant "<u>impl::Runtime:static:</u>" as Runtime
8+
participant "<u>impl::Runtime:SingletonInstance</u>" as RuntimeInstance
9+
participant "<u>:Configuration</u>" as Configuration
10+
participant "<u>:ConfigParser</u>" as ConfigParser
11+
12+
activate OS
13+
create Process
14+
OS -> Process : create
15+
16+
activate Runtime
17+
activate ConfigParser
18+
19+
opt user wants to specify non-default manifest path
20+
Process -> Runtime : Initialize(int argc, char** argv)
21+
activate Process
22+
deactivate OS
23+
24+
group config creation
25+
note over Runtime, ConfigParser: sequence see below
26+
end group
27+
28+
Runtime --> Process : return: void
29+
end opt
30+
31+
Process -> Runtime : getInstance()
32+
33+
opt config creation if singleton instance not yet created
34+
Runtime -> Runtime : Initialize() //with default manifest path
35+
Runtime -> ConfigParser : parse(path, const serviceTypeRegistry*)
36+
create Configuration
37+
ConfigParser -> Configuration : create()
38+
39+
ConfigParser --> Runtime : return: Configuration
40+
deactivate ConfigParser
41+
42+
create RuntimeInstance
43+
Runtime -> RuntimeInstance : create(configuration)
44+
end opt
45+
46+
Runtime --> Process : return: singleton instance
47+
deactivate Runtime
48+
49+
Process -> RuntimeInstance : resolve(InstanceSpecifier)
50+
activate RuntimeInstance
51+
RuntimeInstance -> Configuration : serviceInstances_.find(InstanceSpecifier)
52+
activate Configuration
53+
Configuration --> RuntimeInstance : return: Iter
54+
deactivate Configuration
55+
56+
RuntimeInstance --> Process : return: InstanceIdentifierContainer
57+
deactivate RuntimeInstance
58+
deactivate Process
59+
60+
@enduml

0 commit comments

Comments
 (0)