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 Feb 28, 2024
1 parent 831b0d9 commit 62391fa
Show file tree
Hide file tree
Showing 18 changed files with 267 additions and 89 deletions.
Binary file removed .swp
Binary file not shown.
15 changes: 12 additions & 3 deletions digital-twin-model/dtdl/dtmi/sdv/airbag_seat_massager-1.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,24 @@
"@context": ["dtmi:dtdl:context;3"],
"@type": "Interface",
"@id": "dtmi:sdv:airbag_seat_massager;1",
"description": "Airbag Seat Massager Interface",
"description": "Airbag Seat Massager Interface.",
"extends": "dtmi:sdv:seat_massager;1",
"contents": [
{
"@type": "Command",
"@id": "dtmi:sdv:airbag_seat_massager:store_sequence;1",
"name": "store_sequence",
"description": "Store a massage sequence.",
"request": {
"name": "request",
"description": "Request.",
"schema": {
"@type": "Object",
"fields": [
{
"name": "sequence_name",
"schema": "string"
},
{
"name": "sequence",
"schema": "dtmi:sdv:massage_sequence;1"
Expand All @@ -23,6 +29,7 @@
},
"response": {
"name": "response",
"description": "Response.",
"schema": {
"@type": "Object",
"fields": [
Expand All @@ -38,8 +45,10 @@
"@type": "Command",
"@id": "dtmi:sdv:airbag_seat_massager:perform_step;1",
"name": "perfom_step",
"description": "Perform a step in the sequence.",
"request": {
"name": "request",
"description": "Request.",
"schema": {
"@type": "Object",
"fields": [
Expand Down Expand Up @@ -107,8 +116,8 @@
"schema": "integer"
},
{
"name": "duration",
"schema": "duration"
"name": "duration_in_seconds",
"schema": "integer"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"@context": ["dtmi:dtdl:context;3"],
"@type": "Interface",
"@id": "dtmi:sdv:basic_airbag_seat_massager;1",
"description": "Basic Airbag Seat Massager Interface",
"description": "Basic Airbag Seat Massager Interface.",
"extends": "dtmi:sdv:airbag_seat_massager;1"
}
2 changes: 1 addition & 1 deletion digital-twin-model/dtdl/dtmi/sdv/cabin-1.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"@context": ["dtmi:dtdl:context;3"],
"@type": "Interface",
"@id": "dtmi:sdv:cabin;1",
"description": "Cabin Interface",
"description": "Cabin Interface.",
"contents": [
{
"@type": "Relationship",
Expand Down
6 changes: 3 additions & 3 deletions digital-twin-model/dtdl/dtmi/sdv/camera-1.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"@context": "dtmi:dtdl:context;3",
"@type": "Interface",
"@id": "dtmi:sdv:camera;1",
"description": "Cabin camera.",
"description": "Camera Interface.",
"contents": [
{
"@type": "Property",
"@id": "dtmi:sdv:camera:feed;1",
"name": "Feed",
"description": "The camera feed inside of the cabin.",
"name": "feed",
"description": "The camera feed.",
"schema": {
"@type": "Object",
"fields": [
Expand Down
47 changes: 42 additions & 5 deletions digital-twin-model/dtdl/dtmi/sdv/hmi-1.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"@context": ["dtmi:dtdl:context;3"],
"@type": "Interface",
"@id": "dtmi:sdv:hmi;1",
"description": "The Human Machine Interface.",
"description": "Human Machine Interface.",
"contents": [
{
"@type": "Command",
Expand All @@ -11,11 +11,48 @@
"description": "Show a notification on the HMI.",
"request": {
"@id": "dtmi:sdv:hmi:show_notification:request;1",
"name": "notification",
"displayName": "Notification",
"description": "The notification to show on the HMI.",
"schema": "string"
"name": "request",
"description": "The request.",
"schema": {
"@type": "Object",
"fields": [
{
"name": "notification",
"schema": "string"
}
]
}
},
"response": {
"@id": "dtmi:sdv:hmi:show_notification:response;1",
"name": "response",
"description": "The response.",
"schema": {
"@type": "Object",
"fields": [
{
"name": "status",
"schema": "string"
}
]
}
}
}
],
"schemas": [
{
"@id": "dtmi:sdv:show_notification:status;1",
"@type": "Object",
"fields": [
{
"name": "code",
"schema": "integer"
},
{
"name": "message",
"schema": "string"
}
]
}
]
}
2 changes: 1 addition & 1 deletion digital-twin-model/dtdl/dtmi/sdv/hvac-1.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"@context": ["dtmi:dtdl:context;3"],
"@type": "Interface",
"@id": "dtmi:sdv:hvac;1",
"description": "Heat, Ventilation and Air Conditioning",
"description": "Heat, Ventilation and Air Conditioning (HVAC) Interface.",
"contents": [
{
"@type": "Property",
Expand Down
2 changes: 1 addition & 1 deletion digital-twin-model/dtdl/dtmi/sdv/obd-1.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"@context": "dtmi:dtdl:context;3",
"@type": "Interface",
"@id": "dtmi:sdv:obd;1",
"description": "On-board Diagnostics Interface",
"description": "On-board Diagnostics Interface.",
"contents": [
{
"@type": "Property",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"@context": ["dtmi:dtdl:context;3"],
"@type": "Interface",
"@id": "dtmi:sdv:premium_airbag_seat_massager;1",
"description": "Premium Airbag Seat Massager Interface",
"description": "Premium Airbag Seat Massager Interface.",
"extends": "dtmi:sdv:airbag_seat_massager;1"
}
2 changes: 1 addition & 1 deletion digital-twin-model/dtdl/dtmi/sdv/seat-1.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"@context": ["dtmi:dtdl:context;3"],
"@type": "Interface",
"@id": "dtmi:sdv:seat;1",
"description": "Seat Interface"
"description": "Seat Interface."
}
15 changes: 14 additions & 1 deletion digital-twin-model/dtdl/dtmi/sdv/seat_massager-1.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"@context": ["dtmi:dtdl:context;3"],
"@type": "Interface",
"@id": "dtmi:sdv:seat_massager;1",
"description": "Seat Massager Interface",
"description": "Seat Massager Interface.",
"contents": [
{
"@type": "Property",
Expand All @@ -16,9 +16,12 @@
},
{
"@type": "Command",
"@id": "dtmi:sdv:seat_massager:load_sequence;1",
"name": "load_sequence",
"description": "Load a sequence of massage steps.",
"request": {
"name": "request",
"description": "Request.",
"schema": {
"@type": "Object",
"fields": [
Expand All @@ -31,6 +34,7 @@
},
"response": {
"name": "response",
"description": "Response.",
"schema": {
"@type": "Object",
"fields": [
Expand All @@ -44,9 +48,12 @@
},
{
"@type": "Command",
"@id": "dtmi:sdv:seat_massager:pause;1",
"name": "pause",
"description": "Pause whatever is currently playing.",
"response": {
"name": "response",
"description": "Response.",
"schema": {
"@type": "Object",
"fields": [
Expand All @@ -60,9 +67,12 @@
},
{
"@type": "Command",
"@id": "dtmi:sdv:seat_massager:play;1",
"name": "play",
"description": "Start/continue.",
"response": {
"name": "response",
"description": "Response.",
"schema": {
"@type": "Object",
"fields": [
Expand All @@ -76,9 +86,12 @@
},
{
"@type": "Command",
"@id": "dtmi:sdv:seat_massager:reset;1",
"name": "reset",
"description": "Reset.",
"response": {
"name": "response",
"description": "Response.",
"schema": {
"@type": "Object",
"fields": [
Expand Down
6 changes: 3 additions & 3 deletions digital-twin-model/dtdl/dtmi/sdv/vehicle-1.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
"@context": ["dtmi:dtdl:context;3"],
"@type": "Interface",
"@id": "dtmi:sdv:vehicle;1",
"description": "Vehicle Interface",
"description": "Vehicle Interface.",
"contents": [
{
"@type": "Property",
"@id": "dtmi:sdv:vehicle:vehicle_identification;1",
"name": "vehicle_identification",
"description": "Vehicle Identification",
"description": "Vehicle Identification.",
"schema": {
"@type": "Object",
"fields": [
{
"@id": "dtmi:sdv:vehicle:vehicle_identification:vin;1",
"name": "vin",
"description": "Vehicle Identification Number",
"description": "Vehicle Identification Number.",
"schema": "string"
}
]
Expand Down
Loading

0 comments on commit 62391fa

Please sign in to comment.