Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Digital Twin Graph #110

Merged
merged 115 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
48d8c10
Digital Twin Graph
ashbeitz Mar 24, 2024
2f2a748
Improved seat massager sample
ashbeitz Mar 25, 2024
eebe5bd
Digital Twin Graph
ashbeitz Mar 25, 2024
42a3230
Digital Twin Graph
ashbeitz Mar 25, 2024
9fa461d
Digital Twin Graph
ashbeitz Mar 25, 2024
41f3e7f
Digital Twin Graph
ashbeitz Mar 26, 2024
6a448bb
Digital Twin Graph
ashbeitz Apr 18, 2024
3144fec
Digital Twin Graph
ashbeitz Apr 18, 2024
2cdc650
Digital Twin Graph
ashbeitz Apr 21, 2024
084f896
Digital Twin Graph
ashbeitz Apr 21, 2024
bbab189
Digital Twin Graph
ashbeitz Apr 22, 2024
30bdb56
Digital Twin Graph
ashbeitz Apr 22, 2024
ace163d
Digital Twin Graph
ashbeitz Apr 22, 2024
2852951
Digital Twin Graph
ashbeitz Apr 23, 2024
0e267fb
Digital Twin Graph
ashbeitz Apr 23, 2024
1bfd6f9
Digital Twin Graph
ashbeitz Apr 23, 2024
5baf3ce
Digital Twin Graph
ashbeitz Apr 23, 2024
3001f7e
Digital Twin Graph
ashbeitz Apr 23, 2024
ec8b1bb
Digital Twin Graph
ashbeitz Apr 24, 2024
30c43e3
Digital Twin Graph
ashbeitz Apr 24, 2024
0f104dd
Digital Twin Graph
ashbeitz Apr 24, 2024
e1bcafb
Digital Twin Graph
ashbeitz Apr 24, 2024
0ba7580
Digital Twin Graph
ashbeitz Apr 24, 2024
788f4d0
Digital Twin Graph
ashbeitz Apr 25, 2024
1950d82
Digital Twin Graph
ashbeitz Apr 25, 2024
f02a537
Digital Twin Graph
ashbeitz Apr 26, 2024
2d8f2da
Generate PlantUML Diagrams
eclipse-ibeji-bot Apr 26, 2024
4390681
Digital Twin Graph
ashbeitz Apr 26, 2024
565a983
Merge branch 'ashbeitz/digitalTwinGraph' of https://github.com/eclips…
ashbeitz Apr 26, 2024
1581377
Generate PlantUML Diagrams
eclipse-ibeji-bot Apr 26, 2024
b304cd0
Digital Twin Graph
ashbeitz Apr 26, 2024
a7652e5
Merge branch 'ashbeitz/digitalTwinGraph' of https://github.com/eclips…
ashbeitz Apr 26, 2024
282012c
Digital Twin Graph
ashbeitz Apr 29, 2024
0b9bc6a
Generate PlantUML Diagrams
eclipse-ibeji-bot Apr 29, 2024
72067f7
Digital Twin Graph
ashbeitz Apr 29, 2024
07ca7c0
Merge branch 'ashbeitz/digitalTwinGraph' of https://github.com/eclips…
ashbeitz Apr 29, 2024
80c53c5
Digital Twin Graph
ashbeitz Apr 29, 2024
efea9e8
Digital Twin Graph
ashbeitz Apr 29, 2024
57942c5
Digital Twin Graph
ashbeitz Apr 29, 2024
3881c10
Digital Twin Graph
ashbeitz Apr 29, 2024
9d5404d
Digital Twin Graph
ashbeitz Apr 29, 2024
2aed358
Digital Twin Graph
ashbeitz Apr 30, 2024
0a881d4
Generate PlantUML Diagrams
eclipse-ibeji-bot Apr 30, 2024
8c60c7c
Digital Twin Graph
ashbeitz Apr 30, 2024
23cdfc3
Generate PlantUML Diagrams
eclipse-ibeji-bot Apr 30, 2024
243e057
Digital Twin Graph
ashbeitz Apr 30, 2024
a2d05f8
Generate PlantUML Diagrams
eclipse-ibeji-bot Apr 30, 2024
26088cb
Digital Twin Graph
ashbeitz Apr 30, 2024
6a5cab1
Merge branch 'ashbeitz/digitalTwinGraph' of https://github.com/eclips…
ashbeitz Apr 30, 2024
66693e2
Digital Twin Graph
ashbeitz Apr 30, 2024
a51723d
Digital Twin Graph
ashbeitz Apr 30, 2024
3b3f331
Digital Twin Graph
ashbeitz May 1, 2024
0aa2baf
Digital Twin Graph
ashbeitz May 1, 2024
c663f87
Digital Twin Graph
ashbeitz May 1, 2024
de66a57
Digital Twin Graph
ashbeitz May 1, 2024
7b2bb16
Digital Twin Graph
ashbeitz May 1, 2024
8afdd76
Digital Twin Graph
ashbeitz May 1, 2024
68f1124
Digital Twin Graph
ashbeitz May 1, 2024
7b9b4d6
Digital Twin Graph
ashbeitz May 2, 2024
05345ab
Digital Twin Graph
ashbeitz May 2, 2024
1807489
Digital Twin Graph
ashbeitz May 2, 2024
5ae74c4
Digital Twin Graph
ashbeitz May 2, 2024
22a6f4c
Digital Twin Graph
ashbeitz May 2, 2024
4a590fb
Digital Twin Graph
ashbeitz May 3, 2024
532a84e
Digital Twin Graph
ashbeitz May 3, 2024
f3b11fd
Digital Twin Graph
ashbeitz May 3, 2024
1f132a8
Digital Twin Graph
ashbeitz May 4, 2024
cc4a5be
Digital Twin Graph
ashbeitz May 4, 2024
21735bf
Digital Twin Graph
ashbeitz May 5, 2024
84369e9
Digital Twin Graph
ashbeitz May 5, 2024
dba0a31
Digital Twin Graph
ashbeitz May 5, 2024
4506ec0
Digital Twin Graph
ashbeitz May 5, 2024
ef9ced4
Digital Twin Graph
ashbeitz May 5, 2024
ce9f992
Digital Twin Graph
ashbeitz May 6, 2024
66f2c0f
Digital Twin Graph
ashbeitz May 6, 2024
d10a7dd
Digital Twin Graph
ashbeitz May 6, 2024
4608cf2
Digital Twin Graph
ashbeitz May 6, 2024
837c383
Digital Twin Graph
ashbeitz May 6, 2024
bdb67ac
Digital Twin Graph
ashbeitz May 6, 2024
7fc6ff1
Digital Twin Graph
ashbeitz May 6, 2024
7a97fc3
Digital Twin Graph
ashbeitz May 6, 2024
f5bfaee
Digital Twin Graph
ashbeitz May 6, 2024
f502fac
Digital Twin Graph
ashbeitz May 6, 2024
40293c0
Digital Twin Graph
ashbeitz May 6, 2024
57b2534
Digital Twin Graph
ashbeitz May 6, 2024
edde513
Digital Twin Graph
ashbeitz May 7, 2024
2ad820e
Generate PlantUML Diagrams
eclipse-ibeji-bot May 7, 2024
61de269
Digital Twin Graph
ashbeitz May 7, 2024
11bda50
Digital Twin Graph
ashbeitz May 7, 2024
2cb4bce
Digital Twin Graph
ashbeitz May 7, 2024
7e637c3
Digital Twin Graph
ashbeitz May 7, 2024
07d51b2
Digital Twin Graph
ashbeitz May 7, 2024
0b5b675
Digital Twin Graph
ashbeitz May 8, 2024
56ab4b9
Digital Twin Graph
ashbeitz May 8, 2024
b116968
Digital Twin Graph
ashbeitz May 9, 2024
ca47575
Digital Twin Graph
ashbeitz May 9, 2024
a0ce789
Digital Twin Graph
ashbeitz May 9, 2024
e32c6d7
Digital Twin Graph
ashbeitz May 9, 2024
8b12825
Digital Twin Graph
ashbeitz May 9, 2024
1a17ea6
Digital Twin Graph
ashbeitz May 9, 2024
0043b28
Digital Twin Graph
ashbeitz May 10, 2024
e0eb9b8
Generate PlantUML Diagrams
eclipse-ibeji-bot May 10, 2024
9bd59df
Digital Twin Graph
ashbeitz May 10, 2024
984c072
Digital Twin Graph
ashbeitz May 10, 2024
8138699
Generate PlantUML Diagrams
eclipse-ibeji-bot May 10, 2024
4d14d0e
Digital Twin Graph
ashbeitz May 10, 2024
98541b6
Merge branch 'ashbeitz/digitalTwinGraph' of https://github.com/eclips…
ashbeitz May 10, 2024
a0568fe
Digital Twin Graph
ashbeitz May 10, 2024
d0ca2ce
Generate PlantUML Diagrams
eclipse-ibeji-bot May 10, 2024
9dca7ff
Digital Twin Graph
ashbeitz May 10, 2024
6e90503
Merge branch 'ashbeitz/digitalTwinGraph' of https://github.com/eclips…
ashbeitz May 10, 2024
7ed2c96
Digital Twin Graph
ashbeitz May 10, 2024
b7a4580
Generate PlantUML Diagrams
eclipse-ibeji-bot May 10, 2024
951fa26
Digital Twin Graph
ashbeitz May 10, 2024
d0d1161
Digital Twin Graph
ashbeitz May 10, 2024
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: 4 additions & 2 deletions .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ jobs:
- name: Cache Dependencies
uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build
# Build the project with the `managed_subscribe` and `digital_twin_graph` features enabled.
run: cargo build --features "managed_subscribe,digital_twin_graph,digital_twin_registry"
- name: Test
run: cargo test
# Test the project with the `managed_subscribe` and `digital_twin_graph` features enabled.
run: cargo test --features "managed_subscribe,digital_twin_graph,digital_twin_registry"
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ members = [

# extension
"core/module/managed_subscribe",
"core/module/digital_twin_graph",
"core/module/digital_twin_registry",

# DTDL tools
"dtdl-tools",
Expand All @@ -27,6 +29,7 @@ members = [
"samples/common",
"samples/protobuf_data_access",
"samples/command",
"samples/graph",
"samples/managed_subscribe",
"samples/mixed",
"samples/property",
Expand Down Expand Up @@ -67,6 +70,7 @@ strum = "0.26.1"
strum_macros = "0.26.1"
tokio = "1.29.1"
tokio-console-subscriber = { version = "0.2.0", package = "console-subscriber" }
tokio-retry = "0.3"
tokio-stream = "0.1.14"
tonic = "0.11.0"
tonic-build = "0.11.0"
Expand Down
4 changes: 4 additions & 0 deletions core/invehicle-digital-twin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ http = { workspace = true }
iref = { workspace = true }
log = { workspace = true }
common = { path = "../common" }
digital_twin_graph = { path = "../module/digital_twin_graph", optional = true }
digital_twin_registry = { path = "../module/digital_twin_registry", optional = true }
managed_subscribe = { path = "../module/managed_subscribe", optional = true }
parking_lot = { workspace = true }
prost = { workspace = true }
Expand All @@ -38,5 +40,7 @@ yaml-rust = { workspace = true }
tonic-build = { workspace = true }

[features]
digital_twin_graph = ["dep:digital_twin_graph"]
digital_twin_registry = ["dep:digital_twin_registry"]
managed_subscribe = ["dep:managed_subscribe"]
tokio_console = ["dep:tokio-console-subscriber", "tokio/tracing"]
38 changes: 37 additions & 1 deletion core/invehicle-digital-twin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
#[cfg(feature = "managed_subscribe")]
use managed_subscribe::managed_subscribe_module::ManagedSubscribeModule;

#[cfg(feature = "digital_twin_graph")]
use digital_twin_graph::digital_twin_graph_module::DigitalTwinGraphModule;

#[cfg(feature = "digital_twin_registry")]
use digital_twin_registry::digital_twin_registry_module::DigitalTwinRegistryModule;

// End: Module references.

#[allow(unused_imports)]
Expand Down Expand Up @@ -108,7 +114,7 @@ where

#[cfg(feature = "managed_subscribe")]
// (1) Adds the Managed Subscribe module to the service.
let server = {
let mut server = {
// (2) Initialize the Managed Subscribe module, which implements GrpcModule.
let managed_subscribe_module = ManagedSubscribeModule::new().await.map_err(|error| {
error!("Unable to create Managed Subscribe module.");
Expand All @@ -129,6 +135,36 @@ where
server.add_module(new_middleware, Box::new(managed_subscribe_module))
};

#[cfg(feature = "digital_twin_graph")]
// (1) Adds the Managed Subscribe module to the service.
let mut server = {
// (2) Initialize the Digital Twin Graph module, which implements GrpcModule.
let digital_twin_graph_module = DigitalTwinGraphModule::new().await.map_err(|error| {
error!("Unable to create Digital Twin Graph module.");
error
})?;

info!("Initialized Digital Twin Graph module.");

// (3) Add the module with the updated middleware stack to the server.
server.add_module(server.middleware.clone(), Box::new(digital_twin_graph_module))
};

#[cfg(feature = "digital_twin_registry")]
// (1) Adds the Managed Subscribe module to the service.
let mut server = {
// (2) Initialize the Digital Twin Registry module, which implements GrpcModule.
let digital_twin_registry_module = DigitalTwinRegistryModule::new().await.map_err(|error| {
error!("Unable to create Digital Twin Registry module.");
error
})?;

info!("Initialized Digital Twin Registry module.");

// (3) Add the module with the updated middleware stack to the server.
server.add_module(server.middleware.clone(), Box::new(digital_twin_registry_module))
};

// Construct the server.
let builder = server.construct_server().add_service(base_service);

Expand Down
25 changes: 25 additions & 0 deletions core/module/digital_twin_graph/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
# SPDX-License-Identifier: MIT

[package]
name = "digital_twin_graph"
version = "0.1.0"
edition = "2021"
license = "MIT"

[dependencies]
common = { path = "../../common" }
core-protobuf-data-access = { path = "../../protobuf_data_access" }
log = { workspace = true }
serde = { workspace = true }
serde_derive = { workspace = true }
serde_json = { workspace = true }
tokio = { workspace = true , features = ["full"] }
tonic = { workspace = true }
tower = { workspace = true }
yaml-rust = { workspace = true }
uuid = { workspace = true }

[build-dependencies]
tonic-build = { workspace = true }
Loading
Loading