forked from DaylightAcademy/DLA-LightEx-MD-Schema
-
Notifications
You must be signed in to change notification settings - Fork 0
/
device.json
107 lines (107 loc) · 3.09 KB
/
device.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/cdsig/CDSIG-Schema/blob/main/device.json",
"title": "Acquisition device",
"description": "Information about the data acquisition device",
"type": "object",
"properties": {
"internal_id": {
"title": "Internal ID",
"description": "Unique identifier for this device",
"type": "string"
},
"manufacturer": {
"title": "Manufacturer",
"description": "Manufacturer of the device",
"example": "",
"type": "string"
},
"model": {
"title": "Model",
"description": "Model of the device",
"example": "",
"type": "string"
},
"serial_number": {
"title": "Serial number",
"description": "Serial number of the device",
"example": "",
"type": "string"
},
"harware_version": {
"title": "Hardware version",
"description": "Version number of the hardware",
"example": "",
"type": "string"
},
"memory_size": {
"title": "Memory size",
"description": "Size of the internal memory",
"example": "512MB",
"type": "string"
},
"device_sensors": {
"title": "Device sensors",
"description": "Sensors included in the device",
"type": "array",
"items": {
"type": "object",
"properties": {
"device_sensor_internal_id": {
"title": "Internal ID",
"description": "Internal ID of the sensor",
"example": "1",
"type": "number"
},
"device_sensor_name": {
"title": "Name",
"description": "Name of the sensor",
"example": "Motion sensor",
"type": "string"
},
"device_sensor_category": {
"title": "Category",
"description": "Category of data acquired by the sensor",
"enum": ["motion", "light"]
}
},
"required": [
"device_sensor_internal_id",
"device_sensor_name",
"device_sensor_category"
],
"dependencies": {
"device_sensor_category": {
"oneOf": [
{
"properties": {
"device_sensor_category": {
"enum": ["motion"]
},
"sensor": {
"$ref": "https://raw.githubusercontent.com/cdsig/CDSIG-Schema/main/sensors/sensor_motion.json"
}
},
"required": ["sensor"]
},
{
"properties": {
"device_sensor_category": {
"enum": ["light"]
},
"sensor": {
"$ref": "https://raw.githubusercontent.com/cdsig/CDSIG-Schema/main/sensors/sensor_light.json"
}
},
"required": ["sensor"]
}
]
}
}
},
"minItems": 1,
"uniqueItems": true
}
},
"required": ["internal_id", "manufacturer", "model", "serial_number"]
}