-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevice-schema.json
More file actions
151 lines (151 loc) · 4.62 KB
/
device-schema.json
File metadata and controls
151 lines (151 loc) · 4.62 KB
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
{
"$id": "http://example.com/example.json",
"$schema": "http://json-schema.org/draft-07/schema",
"default": {},
"description": "The schema specifying all cameras, sensors and IOT devices that are placed in a site.",
"examples": [
{
"deviceId": 1,
"deviceType": "camera,sensor",
"deviceLocation": "Main entrance",
"site": "GOSH DRIVE",
"isIndoor": true,
"floor": 1,
"maxOccupancy": 50
}
],
"required": [
"deviceId",
"deviceType",
"deviceLocation",
"site",
"isIndoor"
],
"title": "The device schema of the database",
"type": "object",
"properties": {
"deviceId": {
"$id": "#/properties/deviceId",
"type": "integer",
"title": "The device's ID",
"description": "The unique ID that a device has.",
"default": "",
"examples": [
1,2,3
]
},
"deviceType": {
"$id": "#/properties/deviceType",
"type": "string",
"title": "The type of the device",
"description": "The type of device that is being used to capture real-time data.",
"default": "",
"examples": [
"camera"
],
"enum": [
"camera"
]
},
"deviceLocation": {
"$id": "#/properties/deviceLocation",
"type": "string",
"title": "The location of the device",
"description": "The location where the device is placed.",
"default": "",
"examples": [
"Main entrance"
]
},
"site": {
"$id": "#/properties/site",
"type": "string",
"title": "The site of the device",
"description": "The site where the device is placed.",
"default": "",
"examples": [
"GOSH DRIVE"
]
},
"isIndoor": {
"$id": "#/properties/isIndoor",
"type": "boolean",
"title": "The attribute specifying if the device's location is indoor",
"description": "The attribute can be true for indoor and false for outdoor",
"default": false,
"examples": [
true
]
},
"floor": {
"$id": "#/properties/floor",
"type": "integer",
"title": "The floor where the device is placed",
"description": "The floor where the device is placed, if isIndoor is set to true",
"default": "",
"examples": [
1
]
},
"maxOccupancy": {
"$id": "#/properties/maxOccupancy",
"type": "integer",
"title": "The maxOccupancy schema",
"description": "An explanation about the purpose of this instance.",
"default": 0,
"examples": [
50
]
},
"targetId": {
"$id": "#/properties/targetId",
"default": 0,
"description": "1 for queueing, 2 for freeSeats, 3 for event",
"enum": [
1,
2,
3
],
"examples": [
1
],
"title": "The targetId schema",
"type": "integer"
},
"queueing": {
"$id": "#/properties/queueing",
"default": 0,
"description": "The number of people in a queue. Exists only when targetId is 1.",
"examples": [
7
],
"title": "Number of people in a queue",
"type": "integer"
},
"freeSeats": {
"$id": "#/properties/freeSeats",
"type": "integer",
"title": "The number of available seats",
"description": "The number of available seats. Exists only when targetId is 2.",
"default": 0,
"examples": [
2
]
},
"event": {
"$id": "#/properties/event",
"default": "",
"description": "The event that occured and needs to be stored. Exists only when targetId is 3.",
"examples": [
"personIn"
],
"title": "The event that occured and needs to be stored.",
"enum": [
"personIn",
"personOut"
],
"type": "string"
}
},
"additionalProperties": true
}