feat: add QNX process configuration, schema, docs for TimeSlave reference Integration - #158
feat: add QNX process configuration, schema, docs for TimeSlave reference Integration#158gordon9901 wants to merge 5 commits into
Conversation
License Check Results🚀 The license check job ran with the Bazel command: bazel run //:license-checkStatus: Click to expand output |
|
The created documentation from the pull request is available at: docu-html |
8a7b319 to
d30c777
Compare
| @@ -0,0 +1,94 @@ | |||
| { | |||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |||
| "$id": "https://eclipse-score.github.io/score_inc_time/time_slave_config_schema.json", | |||
There was a problem hiding this comment.
| "$id": "https://eclipse-score.github.io/score_inc_time/time_slave_config_schema.json", | |
| "$id": "https://eclipse-score.github.io/score_time/time_slave_config_schema.json", |
| "default": 0, | ||
| "description": "gPTP domain number." | ||
| }, | ||
| "pdelay_interval_ms": { |
There was a problem hiding this comment.
Should we use the logarithmic values instead - as defined in the IEEE documents?
At least we should rename to:
| "pdelay_interval_ms": { | |
| "pdelay_req_interval_ms": { |
There was a problem hiding this comment.
Renamed to pdelay_req_interval_ms across the schema, parser, engine and all configs to match IEEE 1588 terminology. Kept the unit in milliseconds rather than switching to the log2 encoding — ms is far more intuitive for a user-facing config field; we can add a log2 variant later if strict IEEE parity is needed.
| ParseOptionalBool(phc_obj, "enabled", cfg.enabled); | ||
| ParseOptionalString(phc_obj, "device", cfg.device); | ||
| ParseOptionalInt(phc_obj, "step_threshold_ns", cfg.step_threshold_ns); | ||
| } |
There was a problem hiding this comment.
Are such kind of parsing functions not already avaliable in the json parser?
There was a problem hiding this comment.
I first tried using score::json::GetAttribute + Result::value_or(), but hit two issues: GetAttribute's SFINAE only accepts reference_wrapper / Result<...> (not raw Object&), and value_or() collapses "key missing" and "wrong type" into the same path — so a type error would silently fall back to the default instead of failing fast. Our wrappers exist solely to draw that distinction; dropped the unused IsKeyNotFound helper while at it.
There was a problem hiding this comment.
Could you - maybe - create a ticket for the S-CORE json parser describing that issue? I guess, other will have the same issue ...
There was a problem hiding this comment.
Ok, I will create an issue to explain this problem.
43e1a02 to
17581fd
Compare
17581fd to
08d0eeb
Compare
08d0eeb to
1559010
Compare
| @@ -0,0 +1,57 @@ | |||
| """ | |||
| Creates "validate_json_schema_test" test rule which validates the input "json" file against its "schema" | |||
There was a problem hiding this comment.
shall we put it to the https://github.com/eclipse-score/time/tree/main/tools ?
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
|
|
||
| package(default_visibility = ["//visibility:public"]) |
There was a problem hiding this comment.
I don't think the default public visibility is a good idea. we should know, which of targets are public and which are not
| .. code-block:: shell | ||
|
|
||
| # (Once) Source the setup helper to register QNX and toolchain paths. | ||
| source tools/setup_toolchain.sh |
There was a problem hiding this comment.
where this script is present?
This PR adds the configuration required to build and run the TimeSlave process on QNX:
Closes #141
#test QNX