Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ setup manually.

Additional information can be found in the components' corresponding subfolders.

## Diagnostics Forwarding

A parallel diagnostics pipeline is available alongside the existing rFMS/VehicleStatus flow.
See [docs/diagnostics-forwarding.md](docs/diagnostics-forwarding.md) for the full architecture,
data path, VSS paths, REST API endpoints, and Grafana dashboard usage.

# Contributing

We are looking forward to your ideas and PRs. Each PRs triggers a GitHub action which checks the formating, performs
Expand Down
48 changes: 48 additions & 0 deletions components/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions components/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@

[workspace]
members = [
"diagnostic-source-simulator",
"fms-consumer",
"fms-diagnostics-consumer",
"fms-diagnostics-forwarder",
"fms-forwarder",
"fms-proto",
"fms-server",
"fms-zenoh",
"influx-client",
Expand All @@ -42,13 +46,15 @@ async-trait = { version = "0.1.89" }
bytes = { version = "1.11.0" }
chrono = { version = "0.4.42", default-features = false }
clap = { version = "4.5.53", default-features = false }
duration-str = { version = "0.12.0", default-features = false, features = ["time"] }
env_logger = { version = "0.11.8", default-features = false, features = [
"humantime",
] }
fms-proto = { path = "fms-proto" }
fms-zenoh = { path = "fms-zenoh" }
influx-client = { path = "influx-client", default-features = false }
influxrs = { version = "3.0.1", default-features = false }
kuksa-rust-sdk = { version = "0.2.1" }
log = { version = "0.4.28" }
protobuf = { version = "3.7.2" }
# tokio does not enable features by default
Expand Down
55 changes: 55 additions & 0 deletions components/Dockerfile.diagnostic-source-simulator
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# SPDX-FileCopyrightText: 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

FROM ghcr.io/rust-cross/rust-musl-cross:x86_64-musl AS builder-amd64
ENV BUILDTARGET="x86_64-unknown-linux-musl"


FROM ghcr.io/rust-cross/rust-musl-cross:aarch64-musl AS builder-arm64
ENV BUILDTARGET="aarch64-unknown-linux-musl"

FROM builder-$TARGETARCH AS builder
ARG TARGETARCH
RUN apt-get update && apt-get install -y ca-certificates \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# This will speed up fetching the crate.io index in the future, see
# https://blog.rust-lang.org/2022/06/22/sparse-registry-testing.html
ENV CARGO_UNSTABLE_SPARSE_REGISTRY=true
# This is supposedly required for successfully building for arm64 using buildx with QEMU
# see https://github.com/rust-lang/cargo/issues/10583
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
RUN cargo install cargo-about

RUN echo "Building for $TARGETARCH"
RUN mkdir components
COPY . components/
WORKDIR /home/rust/src/components/diagnostic-source-simulator

RUN cargo about generate -o /home/rust/licenses.html ../about.hbs
RUN cargo build --release --target $BUILDTARGET
RUN mv ../target/${BUILDTARGET}/release/diagnostic-source-simulator /home/rust

FROM scratch

COPY --from=builder /home/rust/diagnostic-source-simulator /app/diagnostic-source-simulator
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /home/rust/licenses.html /app/

ENTRYPOINT [ "/app/diagnostic-source-simulator" ]
55 changes: 55 additions & 0 deletions components/Dockerfile.fms-diagnostics-consumer
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# SPDX-FileCopyrightText: 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

FROM ghcr.io/rust-cross/rust-musl-cross:x86_64-musl AS builder-amd64
ENV BUILDTARGET="x86_64-unknown-linux-musl"


FROM ghcr.io/rust-cross/rust-musl-cross:aarch64-musl AS builder-arm64
ENV BUILDTARGET="aarch64-unknown-linux-musl"

FROM builder-$TARGETARCH AS builder
ARG TARGETARCH
RUN apt-get update && apt-get install -y ca-certificates \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# This will speed up fetching the crate.io index in the future, see
# https://blog.rust-lang.org/2022/06/22/sparse-registry-testing.html
ENV CARGO_UNSTABLE_SPARSE_REGISTRY=true
# This is supposedly required for successfully building for arm64 using buildx with QEMU
# see https://github.com/rust-lang/cargo/issues/10583
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
RUN cargo install cargo-about

RUN echo "Building for $TARGETARCH"
RUN mkdir components
COPY . components/
WORKDIR /home/rust/src/components/fms-diagnostics-consumer

RUN cargo about generate -o /home/rust/licenses.html ../about.hbs
RUN cargo build --release --target $BUILDTARGET
RUN mv ../target/${BUILDTARGET}/release/fms-diagnostics-consumer /home/rust

FROM scratch

COPY --from=builder /home/rust/fms-diagnostics-consumer /app/fms-diagnostics-consumer
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /home/rust/licenses.html /app/

ENTRYPOINT [ "/app/fms-diagnostics-consumer" ]
55 changes: 55 additions & 0 deletions components/Dockerfile.fms-diagnostics-forwarder
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# SPDX-FileCopyrightText: 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

FROM ghcr.io/rust-cross/rust-musl-cross:x86_64-musl AS builder-amd64
ENV BUILDTARGET="x86_64-unknown-linux-musl"


FROM ghcr.io/rust-cross/rust-musl-cross:aarch64-musl AS builder-arm64
ENV BUILDTARGET="aarch64-unknown-linux-musl"

FROM builder-$TARGETARCH AS builder
ARG TARGETARCH
RUN apt-get update && apt-get install -y ca-certificates \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# This will speed up fetching the crate.io index in the future, see
# https://blog.rust-lang.org/2022/06/22/sparse-registry-testing.html
ENV CARGO_UNSTABLE_SPARSE_REGISTRY=true
# This is supposedly required for successfully building for arm64 using buildx with QEMU
# see https://github.com/rust-lang/cargo/issues/10583
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
RUN cargo install cargo-about

RUN echo "Building for $TARGETARCH"
RUN mkdir components
COPY . components/
WORKDIR /home/rust/src/components/fms-diagnostics-forwarder

RUN cargo about generate -o /home/rust/licenses.html ../about.hbs
RUN cargo build --release --target $BUILDTARGET
RUN mv ../target/${BUILDTARGET}/release/fms-diagnostics-forwarder /home/rust

FROM scratch

COPY --from=builder /home/rust/fms-diagnostics-forwarder /app/fms-diagnostics-forwarder
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /home/rust/licenses.html /app/

ENTRYPOINT [ "/app/fms-diagnostics-forwarder" ]
45 changes: 45 additions & 0 deletions components/diagnostic-source-simulator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# SPDX-FileCopyrightText: 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

[package]
name = "diagnostic-source-simulator"
publish = false
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
documentation.workspace = true
readme.workspace = true

[dependencies]
clap = { workspace = true, features = [
"std",
"derive",
"env",
"color",
"help",
"usage",
"error-context",
"suggestions",
] }
env_logger = { workspace = true }
http = { version = "0.2" }
kuksa-rust-sdk = { workspace = true }
log = { workspace = true }
tokio = { workspace = true, features = ["macros", "rt-multi-thread", "time"] }
Loading