-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathonem2m.m.overcurrentsensor.json
More file actions
59 lines (59 loc) · 2.12 KB
/
onem2m.m.overcurrentsensor.json
File metadata and controls
59 lines (59 loc) · 2.12 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
{
"id": "http://openinterconnect.org/onem2mmapping/schemas/onem2m.m.overcurrentsensor.json#",
"$schema": "http://json-schema.org/draft-04/schema#",
"description" : "Copyright (c) 2017 Open Connectivity Foundation, Inc. All rights reserved.",
"title": "Overcurrent Sensor",
"definitions": {
"onem2m.m.overcurrentsensor": {
"type": "object",
"properties": {
"overcurrentStatus": {
"type": "boolean",
"description": "The overcurrentStatus indicates as follows: (True) An over-current is detected / (False) Normal status, an over-current is not detected",
"x-ocf-conversion": {
"x-ocf-alias": "oic.r.sensor",
"x-to-ocf": [
"oic.r.sensor.value = overcurrentStatus"
],
"x-from-ocf": [
"overcurrentStatus = oic.r.sensor.value"
]
}
},
"detectedTime": {
"type": "string",
"description": "The time the over-current is detected.",
"x-ocf-conversion": {
"x-ocf-alias": "oic.r.time.period",
"x-to-ocf": [
"oic.r.time.period.startTime = detectedTime"
],
"x-from-ocf": [
"detectedTime = oic.r.time.period.startTime"
]
}
},
"duration": {
"type": "integer",
"description": "The duration the over-current is detected. The unit of duration is ms.",
"x-ocf-conversion": {
"x-ocf-alias": "oic.r.time.period",
"x-to-ocf": [
"oic.r.time.period.stoptime = oic.r.time.period.starttime + duration",
"An arithmetic conversion will be necessary to go from string plus integer to string"
],
"x-from-ocf": [
"duration = oic.r.time.period.stoptime - oic.r.time.period.starttime",
"An arithmetic conversion will be necessary to go from string to integer"
]
}
}
}
}
},
"type": "object",
"allOf": [
{"$ref": "#/definitions/onem2m.m.overcurrentsensor"}
],
"required": [ "overcurrentStatus" ]
}