Path:
schemas/device-instance.schema.json
Lines:
153
Non-empty lines:
153
Non-empty lines covered with requirements:
122 / 153 (79.7%)
Functions:
0
Functions covered by requirements:
0 / 0 (0.0%)
1
{2
"$schema": "http://json-schema.org/draft-07/schema#",
3
"$id": "urn:syntol:extractor-format:schema:device-instance:1",
4
"title": "Extractor device instance",
5
"description": "Identity and current configuration of one physically assembled extractor",
6
"$comment": "Semantic validation must additionally resolve model_uid; check unique motor axes, heater ids and addresses; verify that referenced axes and heaters exist in the model; and require instance capabilities to be a subset of model capabilities.",
7
"type": "object",
8
"required": [
9
"schema",
10
"revision",
11
"uid",
12
"model_uid",
13
"serial_number",
14
"software_version",
15
"firmware_version",
16
"motor_offsets",
17
"heater_addresses",
18
"capabilities"
19
],
20
"properties": {
21
"schema": {
22
"type": "object",
23
"required": [ "name", "revision" ],
24
"properties": {
25
"name": {
26
"const": "syntol.extractor.device-instance"
27
},
28
"revision": {
29
"const": 1
30
}
31
},
32
"additionalProperties": false
33
},
34
"revision": {
35
"type": "integer",
36
"minimum": 1
37
},
38
"uid": {
39
"$ref": "#/definitions/uid"
40
},
41
"model_uid": {
42
"$ref": "#/definitions/uid"
43
},
44
"serial_number": {
45
"type": "string",
46
"maxLength": 100,
47
"minLength": 1
48
},
49
"software_version": {
50
"$ref": "#/definitions/version"
51
},
52
"firmware_version": {
53
"$ref": "#/definitions/version"
54
},
55
"motor_offsets": {
56
"type": "array",
57
"uniqueItems": true,
58
"items": {
59
"$ref": "#/definitions/motor_offset"
60
}
61
},
62
"heater_addresses": {
63
"type": "array",
64
"uniqueItems": true,
65
"items": {
66
"$ref": "#/definitions/heater_address"
67
}
68
},
69
"capabilities": {
70
"type": "array",
71
"minItems": 1,
72
"uniqueItems": true,
73
"items": {
74
"$ref": "#/definitions/device_capability"
75
}
76
},
77
"extensions": {
78
"$ref": "#/definitions/extensions"
79
}
80
},
81
"additionalProperties": false,
82
"definitions": {
83
"uid": {
84
"x-format": "uuid",
85
"type": "string"
86
},
87
"version": {
88
"type": "string",
89
"maxLength": 100,
90
"minLength": 1
91
},
92
"local_id": {
93
"type": "string",
94
"pattern": "^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$",
95
"maxLength": 100
96
},
97
"motor_offset": {
98
"type": "object",
99
"required": [ "axis", "offset_mm" ],
100
"properties": {
101
"axis": {
102
"type": "string",
103
"pattern": "^[A-Za-z]$"
104
},
105
"offset_mm": {
106
"type": "number"
107
}
108
},
109
"additionalProperties": false
110
},
111
"heater_address": {
112
"type": "object",
113
"required": [ "heater_id", "address" ],
114
"properties": {
115
"heater_id": {
116
"$ref": "#/definitions/local_id"
117
},
118
"address": {
119
"type": "integer",
120
"maximum": 255,
121
"minimum": 1
122
}
123
},
124
"additionalProperties": false
125
},
126
"device_capability": {
127
"enum": [
128
"motion_absolute",
129
"homing",
130
"mixing_time",
131
"mixing_cycles",
132
"motion_configuration",
133
"temperature_control",
134
"temperature_wait",
135
"sleeves_detection",
136
"offsets_configurations",
137
"plate_detection",
138
"uv_sterilization",
139
"status_leds",
140
"notify_beeper",
141
"safety_interlocks",
142
"power_management"
143
]
144
},
145
"extensions": {
146
"type": "object",
147
"propertyNames": {
148
"pattern": "^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)+$"
149
},
150
"additionalProperties": true
151
}
152
}
153
}