eclipse-score / eclipse-score/lifecycle

Support mw::com "Addon" configuration

Open
#510 0 comments 0 reactions 0 assignees View on GitHub
com
Dominant language
C++
Stars
6
Forks
34
Avg merge
2d 3h
Merged PRs (30d)
80

Description

### What

# Background

mw::com recently introduced better support for using mw::com within libraries by introducing ["Addon Configurations"](https://github.com/eclipse-score/communication/pull/930).

The Addon config allows having a dedicated mw::com config only for control API communication - thus removing the need for manual merging a snipped with the overall StateManager mw::com config.
It further adds the possibility to add a mw::com Addon config at runtime as a json object. This allows to hardcode a default config for easier integration.

Example for a minimal Addon Config could look like this:
```json
{
"serviceTypes": [
{
"serviceTypeName": "/score/mw/lifecycle/LmControlService",
"version": { "major": 1, "minor": 0 },
"bindings": [
{
"binding": "SHM",
"serviceId": 7101,
"events": [
{ "eventName": "ActivationResult", "eventId": 1 }
],
"methods": [
{ "methodName": "ActivateRunTarget", "methodId": 2 },
{ "methodName": "GetActiveRunTarget", "methodId": 3 }
]
}
]
}
],
"serviceInstances": [
{
"instanceSpecifier": "StateManager/LaunchManager/Instance",
"serviceTypeName": "/score/mw/lifecycle/LmControlService",
"version": { "major": 1, "minor": 0 },
"instances": [
{ "asil-level": "QM", "binding": "SHM" }
]
}
]
}
```
Notes:
* Config above does not have a check for the uid of the service provider (this uid is deployment specific)
* Config above does not define an instance id, so it will accept any instance offered (the instanceId may be deployment specific)
* Config above does not force ASIL-B quality, instead with "asil-level":"QM" it accepts any service instance
* Config has a hardcoded service-id (this is required, although deployment specific)

# Idea

* Add the possibility to the integrator to supply a custom addon config
- Example: If env var is set LIFECYCLE_CONTROL_ADDON_CFG_PATH=/abc/abc.json then load this addon config
* If not configured, then the service definitions are expected as part of the regular mw::com config
* Decide if we want to hardcode a default json configuration in the library and provide a way to overwrite this

### Acceptance Criteria (DoD)

* lmcontrol library supports an Addon mw::com configuration

### How

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in the lmcontrol library and trace how the regular mw::com configuration is supplied and consumed. Check the configuration entry point for a possible LIFECYCLE_CONTROL_ADDON_CFG_PATH override, then review the Addon Configurations referenced in the issue. Done means the library supports a custom Addon configuration while retaining regular configuration behavior when none is supplied.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.