Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 8 additions & 27 deletions score/mw/com/design/configuration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

The main configuration items we have to deal with in `mw::com` are mappings from "logical" service instances to real
existing service instances with their concrete used technical binding.
Currently, we prepare our configuration to support the following technical bindings:
- SOME/IP
Currently, our configuration supports the following technical bindings:
- Shared Memory IPC

Of course, we do foresee arbitrary extensions.
Expand Down Expand Up @@ -36,13 +35,12 @@ The `ServiceTypeDeployment` aka `Service Interface Deployment` in AUTOSAR speech
The binding independent `ServiceType` is defined within AUTOSAR metamodel by its Service Interface and its
corresponding [service type identification](#service-type-identification).
So within the configuration we might need to express, how a certain abstract `ServiceType` shall be represented in a
`SOME/IP` or a `LoLa` binding. For instance, both bindings might use their own, distinct service ID
for identification and also the embedded service parts (events, fields, methods) might have different identification and
properties between a `SOME/IP` and a `LoLa` binding.
`LoLa` binding. For instance, the binding uses its own distinct service ID
for identification and also configuration of the embedded service parts (events, fields, methods).

Note here, that these `ServiceTypeDeployment`s are independent of their concrete instances! E.g. an AUTOSAR service
`/a/b/c/InterfaceName` will be once mapped to a `SOME/IP` service id **_SIDn_** and this applies then to ALL instances of
this `/a/b/c/InterfaceName` service with a `SOME/IP` mapping!
`/a/b/c/InterfaceName` will be once mapped to a `LoLa` service id **_SIDn_** and this applies then to ALL instances of
this `/a/b/c/InterfaceName` service with a `LoLa` mapping!

### `ServiceInstanceDeployment`
The `ServiceInstanceDeployment` maps concrete instances (identified by an [Instance Specifier](#instance-specifiers)) of
Expand All @@ -69,8 +67,7 @@ config artifacts with the applications.

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

## Instance Specifiers

Expand Down Expand Up @@ -120,17 +117,6 @@ An example of such a mapping is shown here:
"minor": 34
},
"bindings": [
{
"binding": "SOME/IP",
"serviceId": 1234,
"events": [
{
"eventName": "CurrentPressureFrontLeft",
"eventId": 633
}
],
"fields": []
},
{
"binding": "SHM",
"serviceId": 1234,
Expand All @@ -150,11 +136,6 @@ An example of such a mapping is shown here:
"instanceSpecifier": "abc/abc/TirePressurePort",
"serviceTypeName": "/score/ncar/services/TirePressureService",
"instances": [
{
"instanceId": 1234,
"asil-level": "QM",
"binding": "SOME/IP"
},
{
"instanceId": 62,
"asil-level": "ASIL-B",
Expand Down Expand Up @@ -184,8 +165,8 @@ instances.
What is **not** visible here: Whether `"abc/abc/TirePressurePort"` is a provided or required service instance. Both
could be possible, since we do support 1 to n mappings in both cases.
Here we have a mapping of `"abc/abc/TirePressurePort"` to two different concrete technical instances: The first one is a
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here (and only here) I would keep the SOME/IP part. Why, because it shows, which general flexibility we do foresee within our config. So keep the old text - maybe with a slight adaption:

SOME/IP based instance (so ...

hypothetic SOME/IP based instance (so ...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

SOME/IP based instance (so it is most likely used for inter ECU, network communication) and the second is a concrete
instance based on our shared memory IPC for ECU local communication.
hypothetical SOME/IP based instance (so it is most likely used for inter-ECU network communication) and the second is a
concrete instance based on our shared-memory IPC for ECU-local communication.

#### C++ representation of configuration and mappings
The JSON representation of the configuration shown above gets read and parsed at application startup within call to one
Expand Down
8 changes: 1 addition & 7 deletions score/mw/com/design/configuration/structural_view.puml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ package "configuration" {
+ ToString() : std::string const&
}

class "score::mw::com::impl::SomeIpServiceInstanceDeployment" {
+ instanceId: score::cpp::optional<std::uint16_t> const
+ ToString() const : std::string
}

class "score::mw::com::impl::LolaServiceInstanceDeployment" {
+ events : std::unordered_map<std::string, LolaEventInstanceDeployment> const
+ fields : std::unordered_map<std::string, LolaFieldInstanceDeployment> const
Expand All @@ -47,7 +42,7 @@ package "configuration" {
class "score::mw::com::impl::ServiceInstanceDeployment" {
+ service: ServiceIdentifierType
+ asilLevel: QualityType
+ bindingInfo_ : std::variant<LolaServiceInstanceDeployment, SomeIpServiceInstanceDeployment, FakeBindingInformation, score::cpp::blank> const
+ bindingInfo_ : std::variant<LolaServiceInstanceDeployment, FakeBindingInformation, score::cpp::blank> const
+ ServiceInstanceDeployment(service : ServiceIdentifierType const, binding : BindingInformation, asil_level: QualityType const)
+ ToString() : std::string const
}
Expand Down Expand Up @@ -224,7 +219,6 @@ class "score::mw::com::impl::Runtime" {
"score::mw::com::impl::ServiceInstanceDeployment" *-- "QualityType"
"score::mw::com::impl::ServiceInstanceDeployment" *-- "score::mw::com::ServiceIdentifierType"
"score::mw::com::impl::ServiceInstanceDeployment" *-- "score::mw::com::impl::LolaServiceInstanceDeployment"
"score::mw::com::impl::ServiceInstanceDeployment" *-- "score::mw::com::impl::SomeIpServiceInstanceDeployment"
"score::mw::com::impl::LolaServiceInstanceDeployment" *-- "score::mw::com::impl::LolaEventInstanceDeployment" : 0..1
"score::mw::com::impl::LolaServiceInstanceDeployment" *-- "score::mw::com::impl::LolaFieldInstanceDeployment" : 0..1
"score::mw::com::impl::LolaServiceInstanceDeployment" *-- "score::mw::com::impl::LolaMethodInstanceDeployment" : 0..1
Expand Down
90 changes: 0 additions & 90 deletions score/mw/com/impl/configuration/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ cc_library(
":lola_service_instance_deployment",
":quality_type",
":service_type_deployment",
":someip_service_instance_deployment",
"@score_baselibs//score/mw/log",
"@score_baselibs//score/quality/compiler_warnings",
],
Expand Down Expand Up @@ -151,18 +150,6 @@ cc_library(
],
)

cc_library(
name = "someip_event_instance_deployment",
srcs = ["someip_event_instance_deployment.cpp"],
hdrs = ["someip_event_instance_deployment.h"],
features = COMPILER_WARNING_FEATURES,
tags = ["FFI"],
visibility = [
"//score/mw/com/impl/configuration:__subpackages__",
],
deps = ["@score_baselibs//score/json"],
)

cc_library(
name = "lola_event_id",
srcs = ["lola_event_id.cpp"],
Expand Down Expand Up @@ -218,15 +205,6 @@ cc_library(
deps = [":lola_event_instance_deployment"],
)

cc_library(
name = "someip_field_instance_deployment",
srcs = ["someip_field_instance_deployment.cpp"],
hdrs = ["someip_field_instance_deployment.h"],
features = COMPILER_WARNING_FEATURES,
tags = ["FFI"],
deps = ["@score_baselibs//score/json"],
)

cc_library(
name = "lola_method_instance_deployment",
srcs = ["lola_method_instance_deployment.cpp"],
Expand Down Expand Up @@ -282,16 +260,6 @@ cc_library(
deps = ["@score_baselibs//score/json"],
)

cc_library(
name = "someip_service_instance_id",
srcs = ["someip_service_instance_id.cpp"],
hdrs = ["someip_service_instance_id.h"],
features = COMPILER_WARNING_FEATURES,
implementation_deps = [":configuration_common_resources"],
tags = ["FFI"],
deps = ["@score_baselibs//score/json"],
)

cc_library(
name = "service_identifier_type",
srcs = ["service_identifier_type.cpp"],
Expand All @@ -317,7 +285,6 @@ cc_library(
":lola_service_instance_deployment",
":quality_type",
":service_identifier_type",
":someip_service_instance_deployment",
"//score/mw/com/impl:binding_type",
"//score/mw/com/impl:error",
"//score/mw/com/impl:instance_specifier",
Expand All @@ -335,7 +302,6 @@ cc_library(
deps = [
":configuration_common_resources",
":lola_service_instance_id",
":someip_service_instance_id",
"@score_baselibs//score/json",
"@score_baselibs//score/language/futurecpp",
],
Expand Down Expand Up @@ -368,23 +334,6 @@ cc_library(
],
)

cc_library(
name = "someip_service_instance_deployment",
srcs = ["someip_service_instance_deployment.cpp"],
hdrs = ["someip_service_instance_deployment.h"],
features = COMPILER_WARNING_FEATURES,
tags = ["FFI"],
deps = [
":configuration_common_resources",
":someip_event_instance_deployment",
":someip_field_instance_deployment",
":someip_service_instance_id",
"@score_baselibs//score/json",
"@score_baselibs//score/language/futurecpp",
"@score_baselibs//score/result",
],
)

cc_library(
name = "binding_service_type_deployment",
srcs = ["binding_service_type_deployment.cpp"],
Expand Down Expand Up @@ -443,7 +392,6 @@ cc_library(
":service_type_deployment",
":service_version_type",
":shm_size_calc_mode",
":someip_service_instance_deployment",
],
)

Expand Down Expand Up @@ -600,16 +548,6 @@ cc_gtest_unit_test(
],
)

cc_gtest_unit_test(
name = "someip_service_instance_deployment_test",
srcs = ["someip_service_instance_deployment_test.cpp"],
features = COMPILER_WARNING_FEATURES,
deps = [
":someip_service_instance_deployment",
"//score/mw/com/impl/configuration/test:configuration_test_resources",
],
)

cc_gtest_unit_test(
name = "lola_service_type_deployment_test",
srcs = ["lola_service_type_deployment_test.cpp"],
Expand Down Expand Up @@ -640,16 +578,6 @@ cc_gtest_unit_test(
],
)

cc_gtest_unit_test(
name = "someip_service_instance_id_test",
srcs = ["someip_service_instance_id_test.cpp"],
features = COMPILER_WARNING_FEATURES,
deps = [
":someip_service_instance_deployment",
"//score/mw/com/impl/configuration/test:configuration_test_resources",
],
)

cc_gtest_unit_test(
name = "global_configuration_test",
srcs = ["global_configuration_test.cpp"],
Expand All @@ -668,20 +596,6 @@ cc_gtest_unit_test(
],
)

cc_gtest_unit_test(
name = "someip_field_instance_deployment_test",
srcs = ["someip_field_instance_deployment_test.cpp"],
features = COMPILER_WARNING_FEATURES,
deps = [":someip_field_instance_deployment"],
)

cc_gtest_unit_test(
name = "someip_event_instance_deployment_test",
srcs = ["someip_event_instance_deployment_test.cpp"],
features = COMPILER_WARNING_FEATURES,
deps = [":someip_event_instance_deployment"],
)

cc_gtest_unit_test(
name = "shm_size_calc_mode_test",
srcs = ["shm_size_calc_mode_test.cpp"],
Expand Down Expand Up @@ -711,10 +625,6 @@ cc_unit_test_suites_for_host_and_qnx(
":service_instance_id_test",
":service_type_deployment_test",
":service_version_type_test",
":someip_event_instance_deployment_test",
":someip_field_instance_deployment_test",
":someip_service_instance_deployment_test",
":someip_service_instance_id_test",
":tracing_configuration_test",
],
visibility = ["//score/mw/com/impl:__pkg__"],
Expand Down
3 changes: 1 addition & 2 deletions score/mw/com/impl/configuration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,13 @@ exist, but has no functional effect yet!
Our `mw::com` architecture foresees, that a `service-type` might be provided via several technical transport mechanisms,
which we call a `binding`. The decision, which technical transport mechanisms to be used is finally taken by the
`service-instances`. I.e. a `service-instance` might be configured to support an ECU local
transport mechanism, like our shared-memory based mechanism, and also a network based mechanism (like `SOME/IP`) to
transport mechanism, like our shared-memory based mechanism, and also a network based mechanism to
support cross-ECU communication.

However, the `service-type` on which the `service-instance` is based on, needs to support the technical transport
mechanism (`binding`) and needs to configure the instance `independent` parts of the binding.

Currently, the only supported binding is the shared-memory binding, which is represented as `SHM` in the json.
The other binding `SOME/IP`, which the schema allows, is only a placeholder right now.
In the corresponding snippet from our example configuration:

"bindings": [
Expand Down
12 changes: 1 addition & 11 deletions score/mw/com/impl/configuration/config_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ constexpr auto kNumberOfIpcTracingSlotsDefault = static_cast<NumberOfIpcTracingS

constexpr auto kPermissionChecksKey = "permission-checks"sv;

constexpr auto kSomeIpBinding = "SOME/IP"sv;
constexpr auto kShmBinding = "SHM"sv;
constexpr auto kShmSizeCalcModeSimulation = "SIMULATION"sv;

Expand Down Expand Up @@ -705,12 +704,7 @@ auto ParseServiceInstanceDeployments(const score::json::Object& json_map,
SCORE_LANGUAGE_FUTURECPP_PRECONDITION_PRD_MESSAGE(bindingValue_result.has_value(),
"Configuration corrupted, check with json schema");
const auto& bindingValue = bindingValue_result.value().get();
if (bindingValue == kSomeIpBinding)
{
score::mw::log::LogFatal("lola") << "Provided SOME/IP binding, which can not be parsed.";
SCORE_LANGUAGE_FUTURECPP_ASSERT_PRD(false);
}
else if (bindingValue == kShmBinding)
if (bindingValue == kShmBinding)
{
// Return Value not needed in this context
score::cpp::ignore = deployments.emplace_back(service,
Expand Down Expand Up @@ -1025,10 +1019,6 @@ auto ParseServiceTypeDeployment(const score::json::Object& json_map) -> ServiceT
LolaServiceTypeDeployment lola_deployment = ParseLoLaServiceTypeDeployments(binding_map);
return ServiceTypeDeployment{lola_deployment};
}
else if (value == kSomeIpBinding)
{
// we skip this, because we don't support SOME/IP right now.
}
else
{
score::mw::log::LogFatal("lola") << "No unknown binding provided. Required argument.";
Expand Down
Loading