Skip to content

Commit

Permalink
Added seat massage demo (eclipse-ibeji#35)
Browse files Browse the repository at this point in the history
* Added seat massage demo

* Add seat massage demo

* Add seat massage demo

* Add seat massage demo

* Add seat massage demo

* Add seat massage demo

* Render PlantUML files

* Add seat massage demo

* Add seat massage demo

* Add seat massage demo

* Add seat massage demo

* Add seat massage demo

* Add seat massage demo

* Add seat massage demo

* Add seat massage demo

* Add seat massage demo

* Add seat massage demo

* Add seat massage demo

* Render PlantUML files

* Add seat massage demo

* Add seat massage demo

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
ashbeitz and github-actions[bot] authored Jul 20, 2023
1 parent 125b6d5 commit c3b6374
Show file tree
Hide file tree
Showing 46 changed files with 1,336 additions and 456 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ members = [
"samples/command",
"samples/mixed",
"samples/property",
"samples/seat_massager",
]

[workspace.dependencies]
Expand Down
2 changes: 2 additions & 0 deletions digital-twin-model/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ edition = "2021"
license = "MIT"

[dependencies]
serde = { workspace = true }
serde_derive = { workspace = true }

[lib]
path = "src/lib.rs"
Expand Down
60 changes: 0 additions & 60 deletions digital-twin-model/dtdl/v2/content/sdv/vehicle.json

This file was deleted.

20 changes: 20 additions & 0 deletions digital-twin-model/dtdl/v3/content/sdv/airbag_seat_massager.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"@context": ["dtmi:dtdl:context;3"],
"@type": "Interface",
"@id": "dtmi:sdv:AirbagSeatMassager;1",
"description": "Airbag Seat Massager",
"contents": [
{
"@type": "Property",
"@id": "dtmi:sdv:AirbagSeatMassager:MassageAirbags;1",
"name": "MassageAirbags",
"description": "The inflation level (0..100) for each massage airbag.",
"schema": {
"@type": "Array",
"elementSchema": "integer"
}
}
]
}
]
23 changes: 23 additions & 0 deletions digital-twin-model/dtdl/v3/content/sdv/hmi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[
{
"@context": ["dtmi:dtdl:context;3"],
"@type": "Interface",
"@id": "dtmi:sdv:HMI;1",
"description": "The Human Machine Interface.",
"contents": [
{
"@type": "Command",
"@id": "dtmi:sdv:HMI:ShowNotification;1",
"name": "ShowNotification",
"description": "Show a notification on the HMI.",
"request": {
"@id": "dtmi:sdv:HMI:ShowNotification:request;1",
"name": "Notification",
"displayName": "Notification",
"description": "The notification to show on the HMI.",
"schema": "string"
}
}
]
}
]
24 changes: 24 additions & 0 deletions digital-twin-model/dtdl/v3/content/sdv/hvac.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[
{
"@context": ["dtmi:dtdl:context;3"],
"@type": "Interface",
"@id": "dtmi:sdv:HVAC;1",
"description": "Heat, Ventilation and Air Conditioning",
"contents": [
{
"@type": "Property",
"@id": "dtmi:sdv:HVAC:AmbientAirTemperature;1",
"name": "AmbientAirTemperature",
"description": "The immediate surroundings air temperature (in Fahrenheit).",
"schema": "integer"
},
{
"@type": "Property",
"@id": "dtmi:sdv:HVAC:IsAirConditioningActive;1",
"name": "IsAirConditioningActive",
"description": "Is air conditioning active?",
"schema": "boolean"
}
]
}
]
17 changes: 17 additions & 0 deletions digital-twin-model/dtdl/v3/content/sdv/obd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[
{
"@context": ["dtmi:dtdl:context;3"],
"@type": "Interface",
"@id": "dtmi:sdv:OBD;1",
"description": "On-board Diagnostics Interface",
"contents": [
{
"@type": "Property",
"@id": "dtmi:sdv:OBD:HybridBatteryRemaining;1",
"name": "HybridBatteryRemaining",
"description": "The remaining hybrid battery life.",
"schema": "integer"
}
]
}
]
8 changes: 8 additions & 0 deletions digital-twin-model/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,11 @@
// SPDX-License-Identifier: MIT

pub mod sdv_v1;

use serde_derive::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize)]
pub struct Metadata {
#[serde(rename = "$model")]
pub model: String,
}
67 changes: 46 additions & 21 deletions digital-twin-model/src/sdv_v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,55 @@
// Licensed under the MIT license.
// SPDX-License-Identifier: MIT

// Note: In the future this code could be auto-generated from a DTDL spec.
// Note: In the future this code should be generated from a DTDL spec.

pub mod vehicle {
pub mod cabin {
pub mod hvac {
pub mod ambient_air_temperature {
pub const ID: &str = "dtmi:sdv:Vehicle:Cabin:HVAC:AmbientAirTemperature;1";
}
pub mod is_air_conditioning_active {
pub const ID: &str = "dtmi:sdv:Vehicle:Cabin:HVAC:IsAirConditioningActive;1";
}
pub mod airbag_seat_massager {
pub mod massage_airbags {
pub const ID: &str = "dtmi:sdv:AirbagSeatMassager:MassageAirbags;1";
pub const NAME: &str = "MassageAirbags";
pub const DESCRIPTION: &str = "The inflation level (0..100) for each massage airbag.";
pub type TYPE = Vec<i32>;
}
}

pub mod hmi {
pub mod show_notification {
pub const ID: &str = "dtmi:sdv:HMI:ShowNotification;1";
pub const NAME: &str = "Show Notification";
pub const DESCRIPTION: &str = "Show a notification on the HMI.";
pub mod request {
pub const ID: &str = "dtmi:sdv:HMI:ShowNotification::request;1";
pub const NAME: &str = "Notification";
pub const DESCRIPTION: &str = "The notification to show on the HMI.";
pub type TYPE = String;
}
pub mod infotainment {
pub mod hmi {
pub mod show_notification {
pub const ID: &str =
"dtmi:sdv:Vehicle:Cabin:Infotainment:HMI:ShowNotification;1";
}
}
pub mod response {
pub const ID: &str = "dtmi:sdv:HMI:ShowNotification::response;1";
}
}
pub mod obd {
pub mod hybrid_battery_remaining {
pub const ID: &str = "dtmi:sdv:Vehicle:OBD:HybridBatteryRemaining;1";
}
}

pub mod hvac {
pub mod ambient_air_temperature {
pub const ID: &str = "dtmi:sdv:HVAC:AmbientAirTemperature;1";
pub const NAME: &str = "AmbientAirTemperature";
pub const DESCRIPTION: &str = "The immediate surroundings air temperature (in Fahrenheit).";
pub type TYPE = i32;
}

pub mod is_air_conditioning_active {
pub const ID: &str = "dtmi:sdv:HVAC:IsAirConditioningActive;1";
pub const NAME: &str = "IsAirConditioningActive";
pub const DESCRIPTION: &str = "Is air conditioning active?";
pub type TYPE = bool;
}
}

pub mod obd {
pub mod hybrid_battery_remaining {
pub const ID: &str = "dtmi:sdv::OBD:HybridBatteryRemaining;1";
pub const NAME: &str = "HybridBatteryRemaining";
pub const DESCRIPTION: &str = "The remaining hybrid battery life.";
pub type TYPE = i32;
}
}
13 changes: 7 additions & 6 deletions docs/design/.accepted_words.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
AmbientAirTemperature
api
com
degreeFahrenheit
dt
dtdl
DTDL
dtmi
github
https
ibeji
Ibeji
IsAirConditioningActive
findbyid
FindById
gRPC
http
HVAC
json
metadata
opendigitaltwins
org
RemotelyAccessible
sdv
svg
uml
uri
api
com
github
https
opendigitaltwins

Loading

0 comments on commit c3b6374

Please sign in to comment.