-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathchannel.json
110 lines (108 loc) · 2.91 KB
/
channel.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
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
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/OpenLightingProject/open-fixture-library/master/schemas/channel.json",
"$comment": "This file is used by another schema file and should not be used directly as a JSON schema.",
"type": "object",
"properties": {
"name": {
"description": "if not set: use channel key",
"$ref": "definitions.json#/nonEmptyString"
},
"fineChannelAliases": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"oneOf": [
{ "$ref": "definitions.json#/noVariablesString" },
{
"$ref": "definitions.json#/variablePixelKeyString",
"$comment": "only in template channels"
}
]
}
},
"dmxValueResolution": { "enum": ["8bit", "16bit", "24bit"] },
"defaultValue": { "oneOf": [
{ "$ref": "definitions.json#/units/dmxValue" },
{ "$ref": "definitions.json#/units/dmxValuePercent" }
] },
"highlightValue": { "oneOf": [
{ "$ref": "definitions.json#/units/dmxValue" },
{ "$ref": "definitions.json#/units/dmxValuePercent" }
] },
"constant": { "type": "boolean" },
"precedence": { "enum": ["LTP", "HTP"] },
"capability": {
"allOf": [{ "$ref": "capability.json#" }],
"not": {
"anyOf": [
{ "required": ["dmxRange"] },
{ "required": ["switchChannels"] }
]
}
},
"capabilities": {
"type": "array",
"minItems": 2,
"uniqueItems": true,
"items": {
"allOf": [{ "$ref": "capability.json#" }],
"required": ["dmxRange"]
}
}
},
"dependencies": {
"dmxValueResolution": ["fineChannelAliases"]
},
"oneOf": [
{ "required": ["capability"] },
{ "required": ["capabilities"] }
],
"allOf": [
{
"if": {
"$comment": "one capability sets switchChannels",
"properties": {
"capabilities": {
"contains": {
"required": ["switchChannels"]
}
}
},
"required": ["capabilities"]
},
"then": {
"$comment": "defaultValue must be set and all capabilities have to set switchChannels",
"required": ["defaultValue"],
"properties": {
"capabilities": {
"items": {
"required": ["switchChannels"]
}
}
}
}
},
{
"if": {
"$comment": "channel contains only one NoFunction capability",
"properties": {
"capability": {
"properties": {
"type": { "const": "NoFunction" }
}
}
},
"required": ["capability"]
},
"then": {
"$comment": "fineChannelAliases must not be set",
"not": {
"required": ["fineChannelAliases"]
}
}
}
],
"additionalProperties": false
}