Skip to content

score/mw/diag: Add C++ API for DID & RoutineControl - #4

Open
MonikaKumari26 wants to merge 8 commits into
eclipse-score:mainfrom
MonikaKumari26:cpp_api_implementation_for_diag_lib
Open

score/mw/diag: Add C++ API for DID & RoutineControl#4
MonikaKumari26 wants to merge 8 commits into
eclipse-score:mainfrom
MonikaKumari26:cpp_api_implementation_for_diag_lib

Conversation

@MonikaKumari26

Copy link
Copy Markdown
Contributor

Description

This PR introduces a C++ implementation of the diagnostics API, mirroring the design and implementation provided in the Rust version.

References

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
2026/07/31 10:37:16 Downloading https://releases.bazel.build/8.6.0/release/bazel-8.6.0-linux-x86_64...
Extracting Bazel installation...
Starting local Bazel server (8.6.0) and connecting to it...
INFO: Invocation ID: cba9c7b5-a31c-449b-acbe-b0a810264837
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
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: 
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 (1 packages loaded, 0 targets configured)

Analyzing: target //:license-check (15 packages loaded, 14 targets configured)

Analyzing: target //:license-check (27 packages loaded, 14 targets configured)

Analyzing: target //:license-check (73 packages loaded, 14 targets configured)

Analyzing: target //:license-check (74 packages loaded, 14 targets configured)

Analyzing: target //:license-check (92 packages loaded, 14 targets configured)

Analyzing: target //:license-check (92 packages loaded, 14 targets configured)

Analyzing: target //:license-check (150 packages loaded, 3204 targets configured)

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

Analyzing: target //:license-check (166 packages loaded, 9536 targets configured)

Analyzing: target //:license-check (166 packages loaded, 9536 targets configured)

Analyzing: target //:license-check (166 packages loaded, 9536 targets configured)

Analyzing: target //:license-check (166 packages loaded, 9536 targets configured)

Analyzing: target //:license-check (166 packages loaded, 9536 targets configured)

Analyzing: target //:license-check (173 packages loaded, 11550 targets configured)

INFO: Analyzed target //:license-check (175 packages loaded, 15774 targets configured).
[9 / 16] Creating runfiles tree bazel-out/k8-opt-exec-ST-db392155ee03/bin/external/score_tooling+/dash/tool/formatters/dash_format_converter.runfiles [for tool]; 0s local ... ( 1 action running)
INFO: From Generating Dash formatted dependency file ...:
INFO: Successfully converted 2 packages from Cargo.lock to bazel-out/k8-fastbuild/bin/formatted.txt
[14 / 16] [Prepa] JavaToolchainCompileBootClasspath external/rules_java+/toolchains/platformclasspath.jar
[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: 78.690s, Critical Path: 2.49s
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

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

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

@rpreddyhv rpreddyhv left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

initial review findings

Comment thread score/mw/diag/api_cpp/BUILD Outdated
Comment thread score/mw/diag/api_cpp/BUILD Outdated
Comment thread score/mw/diag/api_cpp/BUILD Outdated
Comment thread score/mw/diag/api_cpp/result.h Outdated
Comment thread score/mw/diag/api_cpp/result.h Outdated
Comment thread score/mw/diag/api_cpp/data_resource.h Outdated
Comment thread score/mw/diag/api_cpp/data_resource.h Outdated
Comment thread score/mw/diag/api_cpp/data_resource.h Outdated
Comment thread score/mw/diag/api_cpp/data_resource.h Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

issue: In general, use more DSL for all types like std::string. For Example:

std::string                     id;
std::string                     name;
std::optional<std::string>      translation_id;
std::optional<std::vector<std::string>> groups;

can be written as

struct StringLike { constexpr static std::string value };
using Id = StringLike;
using Name = StringLike;
using Group = StringLike;
using TransactionId = StringLike;

struct OptionalTransactionId { constexpr static std::optional<TransactionId> value };
struct OptionalGroups { constexpr static std::optional<std::vector<Group>> value };

Id id;
Name name;
OptionalTransactionId transaction_id;
OptionalGroups groups

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.

Aliases added... however the proposed struct StringLike { constexpr static std::string value } pattern seems not viable here, requires C++20

Comment thread score/mw/diag/api_cpp/data_resource.h Outdated
@FScholPer

Copy link
Copy Markdown
Contributor

Toolchain setup required to compile this PR

The C++ API introduced in this PR depends on @score_baselibs types (score/language/futurecpp, score/result) which require the S-CORE certified toolchains to build correctly.

I've opened #5 (build: adopt baselibs-style toolchain settings) which aligns .bazelrc and MODULE.bazel with the configuration used in eclipse-score/baselibs.

What was blocking the build

  • bazel build //... failed with: score_process@1.3.2 depends on score_docs_as_code@2.0.3 with compatibility level 2, but <root> depends on score_docs_as_code@1.2.0 with compatibility level 1
  • No GCC 12.2.0 or Ferrocene toolchains were registered, so there was no platform that could satisfy the score_baselibs constraint requirements

After applying #5

bazel build --config=bl-x86_64-linux //score/...
# INFO: Found 19 targets...
# INFO: Build completed successfully, 77 total actions

Also noted: two test files without BUILD entries

simple_operation_test.cpp and uds_adapters_test.cpp exist in score/mw/diag/api_cpp/ but have no corresponding cc_test targets in the BUILD file — those tests won't run. Please add the missing targets to the BUILD file in this PR.

Comment thread score/mw/diag/api_cpp/result.h Outdated
@FScholPer

Copy link
Copy Markdown
Contributor

High-priority validation update after reproducing locally:

  1. Build blocker (resolved by toolchain setup)
  • Reproduced on PR head: bazel build //... failed because @score_baselibs was not resolvable from MODULE/.bazelrc settings.
  • After applying the same toolchain/module setup used in PR build: adopt baselibs-style toolchain settings #5 (bl-x86_64-linux + score_baselibs deps), Bazel analysis/build progressed correctly.
  1. Test coverage gap in BUILD (new tests not wired)
  • New files exist:
    • score/mw/diag/api_cpp/simple_operation_test.cpp
    • score/mw/diag/api_cpp/uds_adapters_test.cpp
  • Added missing cc_test targets locally to execute them.
  1. Next true code-level blocker after wiring tests
  • //score/mw/diag/api_cpp:uds_adapters_test fails at link time with undefined references to:
    • DataResourceAdapter::{with_rdbi,with_wdbi,read,write}
    • RoutineControlAdapter::{RoutineControlAdapter,start,stop,completion_percentage}
  • Root cause: score/mw/diag/api_cpp/uds_adapters.h declares non-inline methods, but no corresponding implementation translation unit is present (uds_adapters.cpp missing).

Recommended unblock order:

  1. Land/apply toolchain + MODULE/.bazelrc setup from PR build: adopt baselibs-style toolchain settings #5.
  2. Add missing cc_test targets for simple_operation_test and uds_adapters_test in score/mw/diag/api_cpp/BUILD.
  3. Add implementations for adapter methods (either inline in header or in a new uds_adapters.cpp and add srcs to the uds_adapters library target).
  4. Re-run:
    • bazel build --config=bl-x86_64-linux //score/mw/diag/api_cpp:all
    • bazel test --config=bl-x86_64-linux //score/mw/diag/api_cpp:all

@MonikaKumari26
MonikaKumari26 force-pushed the cpp_api_implementation_for_diag_lib branch 2 times, most recently from 96ac096 to aa23688 Compare June 29, 2026 12:44
Comment thread score/mw/diag/api_cpp/uds/negative_response_code.h Outdated
Comment thread score/mw/diag/uds/BUILD Outdated
Comment thread score/mw/diag/api_cpp/uds/generic_data_identifier.cpp Outdated
Comment thread score/mw/diag/api_cpp/uds/generic_data_identifier_mock.h Outdated
Comment thread score/mw/diag/api_cpp/uds/generic_service.h Outdated
Comment thread score/mw/diag/api_cpp/uds/generic_service.cpp Outdated
Comment thread score/mw/diag/api_cpp/uds/negative_response_code.h Outdated
Comment thread score/mw/diag/uds/negative_response_code.h Outdated
Comment thread score/mw/diag/api_cpp/uds/negative_response_code.h Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

thought: This can be better done using standalone types for Startable & Stoppable routine:

class StartableRoutine {
    [[no_discard]] virtual auto Start() -> Result<StoppableRoutine>;
};

class StoppableRoutine {
    [[no_discard]] virtual auto Stop() -> Result<StartableRoutine>;
    [[no_discard]] virtual auto CompletionPercentage() const noexcept -> std::uint8_t;
    [[no_discard]] virtual auto GetResult() const noexcept -> Result<ByteVector>;
};

std::unique_ptr<StartableRoutine> CreateRoutine() {
    std::make_unique<StartableRoutine>();
}

User application flow:

auto routine = CreateRoutine();
auto routine_running = routine.Start();
auto progress = routine_running.CompletionPercentage()
auto data = routine_running.GetResult()
auto can_restrat_routine = routine_running.Stop();
  1. This eliminates the accidental stopping of Routine which hasn't started.
  2. This also eliminates un-necessary std::optional from the API surface and thus avoiding optional.has_value() checks in the user application code.
  3. Types are stateless and thus the objects created out of them.
  4. Can be easily adapted to async as it is stateless.

Note: Naming can be better. I may have simplified/generalized/deviated the Routine than how it's used in the domain.

@MonikaKumari26 MonikaKumari26 changed the title score/mw/diag: added C++ API for diag-lib score/mw/diag: Add C++ API for DID & RoutineControl Jul 2, 2026
@MonikaKumari26
MonikaKumari26 requested a review from rpreddyhv July 3, 2026 12:12
Comment thread score/mw/diag/uds/generic_service.cpp Outdated
Comment thread score/mw/diag/uds/BUILD
Comment thread score/mw/diag/uds/negative_response_code_test.cpp Outdated
@MonikaKumari26
MonikaKumari26 requested a review from rpreddyhv July 6, 2026 09:14

@rpreddyhv rpreddyhv left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

findings from our call

Comment thread score/mw/diag/uds/negative_response_code.h Outdated
Comment thread score/mw/diag/uds/negative_response_code.h Outdated
@MonikaKumari26
MonikaKumari26 requested a review from rpreddyhv July 6, 2026 15:39
@MonikaKumari26
MonikaKumari26 marked this pull request as draft July 7, 2026 08:52
Comment thread score/mw/diag/uds/BUILD Outdated
Comment thread score/mw/diag/uds/BUILD
Comment thread score/mw/diag/uds/generic_service_test.cpp Outdated
Comment thread score/mw/diag/uds/generic_data_identifier.h Outdated
Comment thread score/mw/diag/uds/generic_service_mock.h Outdated
Comment thread score/mw/diag/uds/negative_response_code.h Outdated
Comment thread score/mw/diag/uds/negative_response_code.h Outdated
Comment thread score/mw/diag/uds/negative_response_code.h
Comment thread score/mw/diag/uds/negative_response_code.h Outdated
Comment thread score/mw/diag/uds/negative_response_code.h Outdated
Comment thread score/mw/diag/uds/routine_control.h
@MonikaKumari26
MonikaKumari26 requested a review from stmuench July 7, 2026 13:26
Comment thread score/mw/diag/uds/BUILD
Comment thread score/mw/diag/uds/BUILD Outdated
Comment thread score/mw/diag/uds/generic_data_identifier.h Outdated
Comment thread score/mw/diag/uds/generic_service.h Outdated
Comment thread score/mw/diag/uds/write_data_by_identifier.h Outdated
Comment thread score/mw/diag/BUILD Outdated
Comment thread score/mw/diag/diag_result.h Outdated
Comment thread score/mw/diag/uds/routine_control.h Outdated
@MonikaKumari26
MonikaKumari26 requested a review from stmuench July 8, 2026 07:00
@MonikaKumari26
MonikaKumari26 force-pushed the cpp_api_implementation_for_diag_lib branch 2 times, most recently from 9e33ecf to d6ab1d3 Compare July 9, 2026 09:55

@stmuench stmuench left a comment

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.

Oh wait, I missed one thing: we should already prepare these new API for the upcoming design to support CancellationHandlers. But please wait with incorporating my comments until we finished the design [dicussions] for that.

Comment thread score/mw/diag/uds/read_data_by_identifier.h
Comment thread score/mw/diag/uds/generic_data_identifier.h
Comment thread score/mw/diag/uds/routine_control.h
Comment thread score/mw/diag/uds/write_data_by_identifier.h
virtual ~ReadDataByIdentifier() noexcept = default;
};

} // namespace score::mw::diag::uds

@stmuench stmuench Jul 15, 2026

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.

@MonikaKumari26 as discussed, please roll out the following pattern to RDBI, WDBI, GDI, RoutineControl as well as GenericService (the mw::diag::uds::MetaData type should be but into meta_data.h and can remain an empty struct for the time being):

< ... add include for score::cpp::stop_token ... >

namespace score::mw::diag::uds
{

/// UDS ReadDataByIdentifier service (See ISO 14229-1:2020, Service 0x22).
class ReadDataByIdentifier
{
  public:
    /// Read raw bytes for the data identifier.
    /// < ... ADD param docstrings here ... >
    /// @return < ... ADD result docstring here ... >
    [[nodiscard]] virtual std::future<ByteVector> Read(const MetaData& meta_data,
                                                       score::cpp::stop_token stop_token) = 0;

    virtual ~ReadDataByIdentifier() noexcept = default;
};

/// Simplified and synchronous version of the above `ReadDataByIdentifier` (must be non-blocking!)
class SimpleReadDataByIdentifier : public ReadDataByIdentifier
{
  public:
    /// Read raw bytes for the data identifier in a fast and non-blocking manner.
    /// @return Result<ByteVector> on success, NegativeResponseCode on failure.
    [[nodiscard]] virtual Result<ByteVector> Read(const MetaData& meta_data) = 0;

    virtual ~SimpleReadDataByIdentifier() noexcept = default;

  private:
    std::future<ByteVector> Read(const MetaData& meta_data, score::cpp::stop_token) final
    {
        std::promise<ByteVector> promise{};
        if (auto result = Read(meta_data); result.has_value())
        {
            promise.set_value(std::move(result).value());
        }
        else
        {
            promise.set_error(result.error());
        }
        return promise.get_future();
    }
};

}  // namespace score::mw::diag::uds

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.

All requested UDS service interfaces have been refactored to match the dual-interface pattern supporting MetaData and stop_token and respective mocks & Bazel build targets have been updated as well.

@MonikaKumari26
MonikaKumari26 requested a review from stmuench July 16, 2026 09:15
@MonikaKumari26
MonikaKumari26 force-pushed the cpp_api_implementation_for_diag_lib branch from e198a1a to 38b12dd Compare July 17, 2026 10:49
Comment thread score/mw/diag/uds/generic_data_identifier.h Outdated
Comment thread score/mw/diag/uds/generic_service.h Outdated
Comment thread score/mw/diag/uds/generic_service.h Outdated
const MetaData& /*meta_data*/,
score::cpp::stop_token /*stop_token*/) final
{
return HandleMessage(input);

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.

it seems you missed the part with the std::promise and std::future that I added

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.

Fixed !! Added the std::promise / std::future async bridge pattern to all simple adapters.

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.

I do not see them. Did you upload the respective commit in which you adjusted them?

Comment thread score/mw/diag/uds/read_data_by_identifier.h Outdated
Comment thread score/mw/diag/uds/routine_control.h Outdated
Comment thread score/mw/diag/uds/routine_control.h Outdated
Comment thread score/mw/diag/uds/routine_control.h Outdated
Comment thread score/mw/diag/uds/write_data_by_identifier.h Outdated
@MonikaKumari26
MonikaKumari26 force-pushed the cpp_api_implementation_for_diag_lib branch 2 times, most recently from 8859412 to c1bf452 Compare July 20, 2026 10:37
@MonikaKumari26
MonikaKumari26 requested a review from stmuench July 20, 2026 10:37
@MonikaKumari26
MonikaKumari26 force-pushed the cpp_api_implementation_for_diag_lib branch from 9bd3811 to 38b12dd Compare July 20, 2026 11:09
/// @param meta_data Context provided by the diagnostic runtime for this request.
/// @param stop_token Token that becomes stopped if the runtime cancels the request.
/// @return std::future<std::Result<score::cpp::blank>> on success, NegativeResponseCode on failure.
[[nodiscard]] virtual std::future<Result<score::cpp::blank>> Write(ByteView input,

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.

Afaik, using score::cpp::blank is discouraged. Could you please double-check that? Since I would expect

Suggested change
[[nodiscard]] virtual std::future<Result<score::cpp::blank>> Write(ByteView input,
[[nodiscard]] virtual std::future<Result<void>> Write(ByteView input,

instead here ...

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.

I intentionally used score::cpp::blank, because SCORE already provides this type as the equivalent of a successful result without return value. My understanding was that Resultscore::cpp::blank makes the success semantics explicit while still allowing error propagation through Result.

That said, if the current guideline is to prefer Result over Resultscore::cpp::blank, I'm happy to align with that recommendation. Please let me know..

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.

Replaced deprecated score::cpp::blank with Result

@MonikaKumari26
MonikaKumari26 requested a review from stmuench July 23, 2026 11:13
@MonikaKumari26
MonikaKumari26 force-pushed the cpp_api_implementation_for_diag_lib branch from 579b452 to 4fe766f Compare July 24, 2026 09:53

/// Result type: either a value T or a UDS NegativeResponseCode.
template <typename T>
using Result = score::Result<T>;

@stmuench stmuench Jul 27, 2026

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.

where is the part <...> or a UDS NegativeResponseCode specified? I do not see any reference to our uds::NegativeResponseCode here!

@MonikaKumari26 MonikaKumari26 Jul 27, 2026

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.

score::cpp::expected<T, NegativeResponseCode> was lacking void specialization in score_baselib. score::Result<T> was only to valid to use Result<<void>>. Now with this it is required to convert NegativeResponseCode to score::result::Error using score::MakeUnexpected(..)

Other option is keep score::cpp::expected<T, NegativeResponseCode> and add void specialization in our diag_result.h until base-lib has this.

@stmuench stmuench Jul 27, 2026

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.

I see. But do we have any unit tests which verify that error construction actually works in conjunction with uds::NegativeResponseCode ? If not, please add them. Since I am really wondering how this actually works technically since score::Result requires users to implement a free function named MakeError for their custom error code types. And we do not provide any such method, if I have seen correctly.

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.

You are right... I have added the MakeError implementation for NegativeResponseCode along with the UDS error domain and Unit tests covering score::MakeUnexpected(NegativeResponseCode) & Result error handling are now included in the latest commit...

Comment thread score/mw/diag/uds/negative_response_code.h Outdated
Comment thread score/mw/diag/uds/negative_response_code.h Outdated
"RangedNrc upper bound exceeds NegativeResponseCode range");
static_assert(kRangeMin >= static_cast<std::uint8_t>(NegativeResponseCode::GeneralReject),
"RangedNrc lower bound is below NegativeResponseCode range");
return static_cast<NegativeResponseCode>(value_);

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.

wouldn't

Suggested change
return static_cast<NegativeResponseCode>(value_);
return NegativeResponseCode{value_};

also work? it's the more clean approach


/// Result type: either a value T or a UDS NegativeResponseCode.
template <typename T>
using Result = score::Result<T>;

@stmuench stmuench Jul 27, 2026

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.

I see. But do we have any unit tests which verify that error construction actually works in conjunction with uds::NegativeResponseCode ? If not, please add them. Since I am really wondering how this actually works technically since score::Result requires users to implement a free function named MakeError for their custom error code types. And we do not provide any such method, if I have seen correctly.

public:
/// Read raw bytes for the data identifier in a fast and non-blocking manner.
/// @return Result<ByteVector> on success, NegativeResponseCode on failure.
[[nodiscard]] virtual Result<ByteVector> Read() = 0;

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.

@MonikaKumari26 I guess it would be a good idea to always pass Metadata also to all our simplified synchronous APIs so that users have to choice to either consume it or just ignore it, what do you think?

Suggested change
[[nodiscard]] virtual Result<ByteVector> Read() = 0;
[[nodiscard]] virtual Result<ByteVector> Read(const MetaData& meta_data) = 0;

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.

Makes total sense!! I have updated all simplified APIs (ReadDataByIdentifier, WriteDataByIdentifier, RoutineControl, and GenericService) and their corresponding mocks to pass MetaData through...

@MonikaKumari26
MonikaKumari26 force-pushed the cpp_api_implementation_for_diag_lib branch from 10037d1 to 2c9f056 Compare July 31, 2026 10:37
@MonikaKumari26
MonikaKumari26 requested a review from stmuench July 31, 2026 10:38

@stmuench stmuench left a comment

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.

btw, is there any CI job for performing clang-format checks in the inc_diagnostics repo?

Comment on lines +75 to 76
const MetaData& meta_data,
score::cpp::stop_token /*stop_token*/) final

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.

formatting seems to be misaligned


const auto raw_val = static_cast<std::uint8_t>(code);

switch (static_cast<NegativeResponseCode>(raw_val))

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.

wo do we need two of such large if statements? from my POV, these can and shall be merged into just one!

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.

6 participants