|
| 1 | +{ |
| 2 | + "@id": "dtmi:com:example:Sensor;1", |
| 3 | + "@type": "Interface", |
| 4 | + "@context": "dtmi:dtdl:context;2", |
| 5 | + "displayName": "Sensor", |
| 6 | + "contents": [ |
| 7 | + { |
| 8 | + "@type": "Property", |
| 9 | + "name": "sensorId", |
| 10 | + "schema": "string", |
| 11 | + "description": "The unique identifier for the sensor" |
| 12 | + }, |
| 13 | + { |
| 14 | + "@type": "Property", |
| 15 | + "name": "manufacturer", |
| 16 | + "schema": "string", |
| 17 | + "description": "The manufacturer of the sensor" |
| 18 | + }, |
| 19 | + { |
| 20 | + "@type": "Property", |
| 21 | + "name": "modelNumber", |
| 22 | + "schema": "string", |
| 23 | + "description": "The model number of the sensor" |
| 24 | + }, |
| 25 | + { |
| 26 | + "@type": "Property", |
| 27 | + "name": "sensorType", |
| 28 | + "schema": { |
| 29 | + "@type": "Enum", |
| 30 | + "valueSchema": "string", |
| 31 | + "enumValues": [ |
| 32 | + { |
| 33 | + "name": "temperature", |
| 34 | + "displayName": "Temperature", |
| 35 | + "enumValue": "temperature" |
| 36 | + }, |
| 37 | + { |
| 38 | + "name": "humidity", |
| 39 | + "displayName": "Humidity", |
| 40 | + "enumValue": "humidity" |
| 41 | + }, |
| 42 | + { |
| 43 | + "name": "motion", |
| 44 | + "displayName": "Motion", |
| 45 | + "enumValue": "motion" |
| 46 | + }, |
| 47 | + { |
| 48 | + "name": "weight", |
| 49 | + "displayName": "Weight", |
| 50 | + "enumValue": "weight" |
| 51 | + } |
| 52 | + ] |
| 53 | + }, |
| 54 | + "description": "The type of the sensor" |
| 55 | + }, |
| 56 | + { |
| 57 | + "@type": "Property", |
| 58 | + "name": "batteryLevel", |
| 59 | + "schema": "double", |
| 60 | + "description": "The current battery level of the sensor as a percentage" |
| 61 | + }, |
| 62 | + { |
| 63 | + "@type": "Property", |
| 64 | + "name": "status", |
| 65 | + "schema": { |
| 66 | + "@type": "Enum", |
| 67 | + "valueSchema": "string", |
| 68 | + "enumValues": [ |
| 69 | + { |
| 70 | + "name": "online", |
| 71 | + "displayName": "Online", |
| 72 | + "enumValue": "online" |
| 73 | + }, |
| 74 | + { |
| 75 | + "name": "offline", |
| 76 | + "displayName": "Offline", |
| 77 | + "enumValue": "offline" |
| 78 | + }, |
| 79 | + { |
| 80 | + "name": "maintenance", |
| 81 | + "displayName": "Maintenance", |
| 82 | + "enumValue": "maintenance" |
| 83 | + } |
| 84 | + ] |
| 85 | + }, |
| 86 | + "description": "The current status of the sensor" |
| 87 | + }, |
| 88 | + { |
| 89 | + "@type": "Telemetry", |
| 90 | + "name": "reading", |
| 91 | + "schema": "double", |
| 92 | + "description": "The current reading from the sensor" |
| 93 | + }, |
| 94 | + { |
| 95 | + "@type": "Telemetry", |
| 96 | + "name": "lastCommunication", |
| 97 | + "schema": "dateTime", |
| 98 | + "description": "Timestamp of the last communication from the sensor" |
| 99 | + } |
| 100 | + ] |
| 101 | +} |
0 commit comments