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 c7d2f9e commit 23f307b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
./tools/check_spelling.sh ./README.md
./tools/check_spelling.sh ./container/README.md
./tools/check_spelling.sh ./core/common/README.md
./tools/check_spelling.sh ./dtdl-parser/README.md
./tools/check_spelling.sh ./dtdl-tools/README.md
./tools/check_spelling.sh ./docs/design/README.md
./tools/check_spelling.sh ./samples/managed_subscribe/README.md
shell: bash
1 change: 0 additions & 1 deletion digital-twin-model/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ license = "MIT"
derivative = { workspace = true }
serde = { workspace = true }
serde_derive = { workspace = true }
serde_json = { workspace = true }

[lib]
path = "src/lib.rs"
Expand Down
9 changes: 6 additions & 3 deletions digital-twin-model/src/sdv_v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
// Licensed under the MIT license.
// SPDX-License-Identifier: MIT

// Note: In the future this code should be generated from a DTDL spec.
// This file contains the generated code for the Software Defined Vehicle (SDV) model.
// This code is manually generated today, but in the future it should be automatically generated from the DTDL.

pub fn context() -> Vec<String> {
/// The context value for all JSON-LD generated by the code in this file.
fn context() -> Vec<String> {
vec!["dtmi:dtdl:context;2".to_string(), "dtmi:sdv:context;2".to_string()]
}

/// Constants and type defintiions (including JSON serialization/deserialization) for each interface in the SDV model.
#[allow(dead_code)]
pub mod airbag_seat_massager {
pub const ID: &str = "dtmi:sdv:airbag_seat_massager;1";
Expand Down Expand Up @@ -126,7 +129,7 @@ pub mod airbag_seat_massager {
ID.to_string()
}
pub const NAME: &str = "airbag_adjustment";
pub const DESCRIPTION: &str = "The airbag adjustments.";
pub const DESCRIPTION: &str = "An airbag adjustment.";
#[derive(serde_derive::Serialize, serde_derive::Deserialize, Debug)]
pub struct TYPE {
pub airbag_identifier: i32,
Expand Down
8 changes: 8 additions & 0 deletions dtdl-tools/.accepted_words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
dtdl
DTDL
DTDLParser
ibeji
Ibeji
json
validator
Validator
2 changes: 1 addition & 1 deletion dtdl-tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ It takes two command line arguments:
* -e {file extension} The file extension used by the DTDL files. The default is "json".

The CI/CD pipeline automatically validates DTDL files found under the ibeji/digital-twin-model/dtdl directory via dtdl-tools
test suite. Additonal directories containing DTDL files can also be checked by addining new test cases based on the one for
test suite. Additional directories containing DTDL files can also be checked by adding new test cases based on the one for
the ibeji/digital-twin-model/dtdl directory.

If you wish to manually run the the DTDL Validator application, then install it from Cargo's out directory to a custom directory by
Expand Down

0 comments on commit 23f307b

Please sign in to comment.