|
| 1 | +# ******************************************************************************* |
| 2 | +# Copyright (c) 2026 Contributors to the Eclipse Foundation |
| 3 | +# |
| 4 | +# See the NOTICE file(s) distributed with this work for additional |
| 5 | +# information regarding copyright ownership. |
| 6 | +# |
| 7 | +# This program and the accompanying materials are made available under the |
| 8 | +# terms of the Apache License Version 2.0 which is available at |
| 9 | +# https://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# SPDX-License-Identifier: Apache-2.0 |
| 12 | +# ******************************************************************************* |
| 13 | +# |
| 14 | +# Example: System integrator SEooC that depends on safety_software_seooc_example. |
| 15 | +# |
| 16 | +# This illustrates the full AoU forwarding chain: |
| 17 | +# |
| 18 | +# other_seooc defines AoU: OtherLibrary.TimingConstraint |
| 19 | +# ↑ (deps) |
| 20 | +# safety_software_seooc_example |
| 21 | +# - defines own AoU: SampleType.SampleAoU (auto-forwarded here) |
| 22 | +# - chain-forwards OtherLibrary.TimingConstraint via aou_forwarding.yaml |
| 23 | +# ↑ (deps) |
| 24 | +# integrator_seooc (this target) |
| 25 | +# - receives SampleType.SampleAoU (auto-forwarded from seooc) |
| 26 | +# - receives OtherLibrary.TimingConstraint (chain-forwarded through seooc) |
| 27 | +# - must handle both in its lobster traceability report |
| 28 | +# |
| 29 | + |
| 30 | +load( |
| 31 | + "//bazel/rules/rules_score:rules_score.bzl", |
| 32 | + "architectural_design", |
| 33 | + "component", |
| 34 | + "dependable_element", |
| 35 | + "unit", |
| 36 | +) |
| 37 | + |
| 38 | +cc_library( |
| 39 | + name = "integrator_lib", |
| 40 | + srcs = [], |
| 41 | + visibility = ["//visibility:public"], |
| 42 | + deps = [ |
| 43 | + "//bazel/rules/rules_score/examples/seooc:sample_library", |
| 44 | + ], |
| 45 | +) |
| 46 | + |
| 47 | +architectural_design( |
| 48 | + name = "integrator_design", |
| 49 | + static = ["static_design.puml"], |
| 50 | +) |
| 51 | + |
| 52 | +unit( |
| 53 | + name = "integrator_unit", |
| 54 | + scope = ["//bazel/rules/rules_score/examples/integrator:__pkg__"], |
| 55 | + tests = [], |
| 56 | + unit_design = [], |
| 57 | + implementation = [":integrator_lib"], |
| 58 | +) |
| 59 | + |
| 60 | +component( |
| 61 | + name = "integrator_component", |
| 62 | + components = [":integrator_unit"], |
| 63 | + requirements = [ |
| 64 | + "//bazel/rules/rules_score/examples/integrator/docs/requirements:component_requirements", |
| 65 | + ], |
| 66 | + tags = ["manual"], |
| 67 | + tests = [], |
| 68 | +) |
| 69 | + |
| 70 | +# The integrator depends on safety_software_seooc_example and therefore |
| 71 | +# receives all forwarded AoUs: |
| 72 | +# - SampleType.SampleAoU (auto-forwarded, own AoU of seooc) |
| 73 | +# - OtherLibrary.TimingConstraint (chain-forwarded from other_seooc through seooc) |
| 74 | +dependable_element( |
| 75 | + name = "integrator_seooc", |
| 76 | + architectural_design = [":integrator_design"], |
| 77 | + assumptions_of_use = [], |
| 78 | + components = [":integrator_component"], |
| 79 | + dependability_analysis = [], |
| 80 | + integrity_level = "B", |
| 81 | + requirements = [ |
| 82 | + "//bazel/rules/rules_score/examples/integrator/docs/requirements:feature_requirements", |
| 83 | + ], |
| 84 | + tests = [], |
| 85 | + deps = ["//bazel/rules/rules_score/examples/seooc:safety_software_seooc_example"], |
| 86 | +) |
0 commit comments