-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathonem2m.m.doorStatus.json
65 lines (65 loc) · 2.19 KB
/
onem2m.m.doorStatus.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
{
"id": "http://openinterconnect.org/onem2mmapping/schemas/onem2m.m.doorStatus.json#",
"$schema": "http://json-schema.org/draft-04/schema#",
"description" : "Copyright (c) 2018 Open Connectivity Foundation, Inc. All rights reserved.",
"title": "Door Status",
"definitions": {
"onem2m.m.doorStatus": {
"type": "object",
"properties": {
"doorState": {
"type": "integer",
"description": "Current state of the door.",
"x-ocf-conversion": {
"x-ocf-alias": "oic.r.door",
"x-to-ocf": [
"if doorState == 1",
"oic.r.door.openState = \"Closed\"",
"if doorState == 2",
"oic.r.door.openState = \"Open\""
],
"x-from-ocf": [
"if oic.r.door.openState = \"Closed\"",
"doorState == 1",
"if oic.r.door.openState = \"Open\"",
"doorState == 2"
]
}
},
"openDuration": {
"type": "string",
"description": "The time duration the door has been open.",
"x-ocf-conversion": {
"x-ocf-alias": "oic.r.door",
"x-to-ocf": [
"Conversion from oneM2M timestamp is not yet defined",
"oic.r.door.openDuration = openDuration"
],
"x-from-ocf": [
"Conversion from oneM2M timestamp is not yet defined",
"openDuration = oic.r.door.openDuration"
]
}
},
"openAlarm": {
"type": "boolean",
"description": "The state of the door open alarm. 'True' indicates that the open alarm is active. 'False' indicates that the open alarm is not active.",
"x-ocf-conversion": {
"x-ocf-alias": "oic.r.door",
"x-to-ocf": [
"oic.r.door.openAlarm = openAlarm"
],
"x-from-ocf": [
"openAlarm = oic.r.door.openAlarm"
]
}
}
}
}
},
"type": "object",
"allOf": [
{"$ref": "#/definitions/onem2m.m.doorStatus"}
],
"required": [ "doorState" ]
}