-
Notifications
You must be signed in to change notification settings - Fork 1
/
onem2m.m.steamclosetjobmode.json
76 lines (76 loc) · 3.71 KB
/
onem2m.m.steamclosetjobmode.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
{
"id": "http://openinterconnect.org/onem2mmapping/schemas/onem2m.m.steamclosetjobmode.json#",
"$schema": "http://json-schema.org/draft-04/schema#",
"description" : "Copyright (c) 2018 Open Connectivity Foundation, Inc. All rights reserved.",
"title": "Steam Closet Job Mode",
"definitions": {
"onem2m.m.steamclosetjobmode": {
"type": "object",
"properties": {
"currentJobMode": {
"type": "integer",
"description": "Currently active job mode.",
"x-ocf-conversion": {
"x-ocf-alias": "oic.r.operational.state",
"x-to-ocf": [
"Need to translate between the oneM2M integer value and the OCF operational state enumerated string",
"if ( currentJobMode == 1 ) { oic.r.operational.state.currentJobState == \"aroma\"; }",
"if ( currentJobMode == 2 ) { oic.r.operational.state.currentJobState == \"steam\"; }",
"if ( currentJobMode == 3 ) { oic.r.operational.state.currentJobState == \"pure\"; }",
"if ( currentJobMode == 4 ) { oic.r.operational.state.currentJobState == \"delicate\"; }",
"else { oic.r.operational.state.currentJobState == \"unknown\"; }"
],
"x-from-ocf": [
"Need to translate between the OCF operational state enumerated string and the oneM2M integer value",
"if (oic.r.operational.state.currentJobState == \"aroma\" ) { currentJobMode = 1; }",
"if (oic.r.operational.state.currentJobState == \"steam\" ) { currentJobMode = 2; }",
"if (oic.r.operational.state.currentJobState == \"pure\" { currentJobMode = 3; }",
"if (oic.r.operational.state.currentJobState == \"delicate\" ) { currentJobMode = 4; }",
"else { currentJobMode = 0; }"
]
}
},
"currentJobModeName": {
"type": "string",
"description": "Name of current job mode in string. This can be used when currentJobMode is vendor-specific.",
"x-ocf-conversion": {
"x-ocf-alias": "oic.r.operational.state",
"x-to-ocf": [
"This value does not exist in OCF as it is already accommodated in the currentJobMode property."
],
"x-from-ocf": [
"Need to translate between the OCF operational state enumerated string and the oneM2M string value",
"if (oic.r.operational.state.currentJobState == \"aroma\" ) { currentJobModeName = \"reduceOdor\"; }",
"if (oic.r.operational.state.currentJobState == \"steam\" ) { currentJobModeName = \"steamWrinkle\"; }",
"if (oic.r.operational.state.currentJobState == \"pure\" { currentJobModeName = \"helpClean\"; }",
"if (oic.r.operational.state.currentJobState == \"delicate\" ) { currentJobModeName = \"gentleDry\"; }",
"else { currentJobModeName = \"\"; }"
]
}
},
"jobModes": {
"type": "array",
"description": "List of possible job states the device supports",
"x-ocf-conversion": {
"x-ocf-alias": "oic.r.operational.state",
"x-to-ocf": [
"This does not exist in OCF as all possible operational states are available."
],
"x-from-ocf": [
"This is an array of integers in oneM2M defined by the current version of the specification as follows:",
"jobModes[1] = 1",
"jobModes[2] = 2",
"jobModes[3] = 3",
"jobModes[4] = 4"
]
}
}
}
}
},
"type": "object",
"allOf": [
{"$ref": "#/definitions/onem2m.m.airconjobmode"}
],
"required": [ "currentJobMode", "jobModes" ]
}