Skip to content

Commit

Permalink
Improved seat massager sample
Browse files Browse the repository at this point in the history
  • Loading branch information
ashbeitz committed Mar 1, 2024
1 parent 90b6eed commit b31d66c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions digital-twin-model/src/sdv_v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

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

pub fn context() -> Vec<String> {
vec!["dtmi:dtdl:context;2".to_string(), "dtmi:sdv:context;2".to_string()]
}

#[allow(dead_code)]
pub mod airbag_seat_massager {
pub const ID: &str = "dtmi:sdv:airbag_seat_massager;1";
Expand Down Expand Up @@ -72,6 +76,9 @@ pub mod airbag_seat_massager {
#[derivative(Default)]
#[derive(serde_derive::Serialize, serde_derive::Deserialize, Debug)]
pub struct TYPE {
#[serde(rename = "@context")]
#[derivative(Default(value = "crate::sdv_v2::context()"))]
pub context: Vec<String>,
#[serde(rename = "@type")]
#[derivative(Default(
value = "crate::sdv_v2::airbag_seat_massager::perform_step::request::id()"
Expand All @@ -91,6 +98,9 @@ pub mod airbag_seat_massager {
#[derivative(Default)]
#[derive(serde_derive::Serialize, serde_derive::Deserialize, Debug)]
pub struct TYPE {
#[serde(rename = "@context")]
#[derivative(Default(value = "crate::sdv_v2::context()"))]
pub context: Vec<String>,
#[serde(rename = "@type")]
#[derivative(Default(
value = "crate::sdv_v2::airbag_seat_massager::perform_step::response::id()"
Expand Down

0 comments on commit b31d66c

Please sign in to comment.