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

Add streaming sample #40

Merged
merged 27 commits into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
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
22 changes: 19 additions & 3 deletions digital-twin-model/dtdl/v3/spec/sdv/camera.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[
[
{
"@context": "dtmi:dtdl:context;3",
"@type": "Interface",
Expand All @@ -9,8 +9,24 @@
"@type": "Property",
"@id": "dtmi:sdv:Camera:Feed;1",
"name": "Feed",
"schema": "string",
"description": "The cabin camera's feed for inside the cabin."
"description": "The camera feed inside of the cabin.",
"schema": {
"@type": "Object",
"fields": [
{
"name": "MediaType",
"schema": "string"
},
{
"name": "MediaContent",
"description": "An array of bytes (represented by integers here).",
"schema": {
"@type": "Array",
"elementSchema": "integer"
}
}
]
}
}
]
}
Expand Down
12 changes: 10 additions & 2 deletions digital-twin-model/src/sdv_v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

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

#[allow(unused_imports)]
use std::vec::Vec;

pub mod airbag_seat_massager {
pub mod massage_airbags {
pub const ID: &str = "dtmi:sdv:AirbagSeatMassager:MassageAirbags;1";
Expand All @@ -13,12 +16,17 @@ pub mod airbag_seat_massager {
}
}

#[allow(dead_code)]
pub mod camera {
pub mod feed {
pub const ID: &str = "dtmi:sdv:Camera:Feed;1";
pub const NAME: &str = "Feed";
pub const DESCRIPTION: &str = "The cabin camera's feed for inside the cabin.";
pub type TYPE = String;
pub const DESCRIPTION: &str = "The camera feed inside of the cabin.";
pub struct Media {
media_type: String,
media_content: Vec<u8>,
}
pub type TYPE = Media;
}
}

Expand Down
2 changes: 1 addition & 1 deletion docs/design/diagrams/stream_sequence.puml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ entityAccessInfo:
{
name: "Feed"
id: "dtmi:sdv:Camera:Feed;1"
description: "The cabin camera's feed for inside the cabin."
description: "The camera feed inside of the cabin."
endpointInfoList: [
{
protocol: "grpc"
Expand Down
2 changes: 1 addition & 1 deletion docs/design/diagrams/stream_sequence.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading