Skip to content

Support Reporting Running State and Alive Notifications for applications written in C#270

Open
NicolasFussberger wants to merge 2 commits into
eclipse-score:mainfrom
etas-contrib:feature/support-c-apps
Open

Support Reporting Running State and Alive Notifications for applications written in C#270
NicolasFussberger wants to merge 2 commits into
eclipse-score:mainfrom
etas-contrib:feature/support-c-apps

Conversation

@NicolasFussberger

Copy link
Copy Markdown
Contributor

Previously, we removed the C-prototypes as they were not necessary for C++/rust interaction (rust code has their own function prototypes).

However, this also removed the support for applications written in C, which we otherwise get for free.

This PR adds back the function prototypes and adds an example application written in C that invokes the functions for reporting Running state and Alive Notifications.

@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run --lockfile_mode=error //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.4.2) and connecting to it...
INFO: Invocation ID: 149053bc-4b37-4c98-b09f-a4f11ddf6afc
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)

Analyzing: target //:license-check (16 packages loaded, 10 targets configured)

Analyzing: target //:license-check (16 packages loaded, 10 targets configured)

Analyzing: target //:license-check (68 packages loaded, 10 targets configured)

Analyzing: target //:license-check (127 packages loaded, 387 targets configured)

Analyzing: target //:license-check (146 packages loaded, 6118 targets configured)

Analyzing: target //:license-check (147 packages loaded, 7789 targets configured)

Analyzing: target //:license-check (158 packages loaded, 8130 targets configured)

Analyzing: target //:license-check (158 packages loaded, 8130 targets configured)

Analyzing: target //:license-check (158 packages loaded, 8130 targets configured)

Analyzing: target //:license-check (158 packages loaded, 8130 targets configured)

Analyzing: target //:license-check (162 packages loaded, 10142 targets configured)

INFO: Analyzed target //:license-check (163 packages loaded, 10268 targets configured).
[12 / 16] JavaToolchainCompileClasses external/rules_java+/toolchains/platformclasspath_classes; 0s disk-cache, processwrapper-sandbox ... (2 actions running)
[14 / 16] JavaToolchainCompileBootClasspath external/rules_java+/toolchains/platformclasspath.jar; 0s disk-cache, processwrapper-sandbox
[15 / 16] Building license.check.license_check.jar (); 0s disk-cache, multiplex-worker
INFO: Found 1 target...
Target //:license.check.license_check up-to-date:
  bazel-bin/license.check.license_check
  bazel-bin/license.check.license_check.jar
INFO: Elapsed time: 29.036s, Critical Path: 2.66s
INFO: 16 processes: 12 internal, 3 processwrapper-sandbox, 1 worker.
INFO: Build completed successfully, 16 total actions
INFO: Running command line: bazel-bin/license.check.license_check ./formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

@github-actions

Copy link
Copy Markdown

The created documentation from the pull request is available at: docu-html


void* score_lcm_alive_initialize(const char* instanceSpecifier) noexcept {
if(instanceSpecifier == nullptr) {
void* score_lcm_alive_initialize(const char* instanceSpecifier)

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.

Is there a reason we removed the noexcept?

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.

Its a C-interface, so the noexcept was not valid in C.

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.

Of course stupid question, sorry.

}

void score_lcm_alive_deinitialize(void* instance) noexcept {
void score_lcm_alive_deinitialize(void* instance)

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.

Is there a reason we removed the noexcept?

This also applies to other functions in this file. Most of them were not even reformatted beyond noexcept removal.

/// it executes the configured recovery action.
///
/// Each process may only use a single Alive instance.
class Alive

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.

Suggested change
class Alive
class Alive final

Alive& operator=(Alive&& se) noexcept;

/// @brief Destructor of an Alive
virtual ~Alive() noexcept;

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.

is the virtual needed?


/// @brief Signals to the Launch Manager that this process has finished initialization and is now running.
/// @return 0 on success, -1 on failure
int8_t score_lcm_ReportRunning(void);

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.

Suggested change
int8_t score_lcm_ReportRunning(void);
int8_t score_lcm_report_running(void);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

3 participants