-
Notifications
You must be signed in to change notification settings - Fork 0
/
oic.r.energy.battery.json
53 lines (52 loc) · 1.57 KB
/
oic.r.energy.battery.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
{
"id": "http://openinterconnect.org/iotdatamodels/schemas/oic.r.energy.battery.json#",
"$schema": "http://json-schema.org/draft-04/schema#",
"description" : "Copyright (c) 2016, 2017 Open Connectivity Foundation, Inc. All rights reserved.",
"title": "Battery",
"definitions": {
"oic.r.energy.battery": {
"type": "object",
"properties": {
"charge" : {
"type": "integer",
"description": "The current charge percentage.",
"readOnly": true,
"minimum": 0,
"maximum": 100
},
"capacity" : {
"type": "number",
"description": "The total capacity in Amp-hours (Ah).",
"readOnly": true
},
"charging" : {
"type": "boolean",
"description": "The status of charging.",
"readOnly": true
},
"discharging" : {
"type": "boolean",
"description": "The status of discharging.",
"readOnly": true
},
"lowbattery" : {
"type": "boolean",
"description": "The status of the low battery warning based upon the defined threshold.",
"readOnly": true
},
"batterythreshold" : {
"type": "integer",
"description": "The threshold percentage for the low battery warning.",
"minimum": 0,
"maximum": 100
}
}
}
},
"type": "object",
"allOf": [
{"$ref": "oic.baseResource.json#/definitions/oic.r.baseresource"},
{"$ref": "#/definitions/oic.r.energy.battery"}
],
"required": [ "charge" ]
}