oscura 0.4.0__py3-none-any.whl → 0.5.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- oscura/__init__.py +1 -1
- oscura/analyzers/digital/__init__.py +48 -0
- oscura/analyzers/digital/extraction.py +195 -0
- oscura/analyzers/digital/ic_database.py +498 -0
- oscura/analyzers/digital/timing_paths.py +339 -0
- oscura/analyzers/digital/vintage.py +377 -0
- oscura/analyzers/digital/vintage_result.py +148 -0
- oscura/analyzers/protocols/__init__.py +22 -1
- oscura/analyzers/protocols/parallel_bus.py +449 -0
- oscura/automotive/__init__.py +1 -1
- oscura/export/__init__.py +12 -0
- oscura/export/wavedrom.py +430 -0
- oscura/exporters/json_export.py +47 -0
- oscura/exporters/vintage_logic_csv.py +247 -0
- oscura/reporting/__init__.py +7 -0
- oscura/reporting/vintage_logic_report.py +523 -0
- oscura/utils/autodetect.py +5 -1
- oscura/visualization/digital_advanced.py +718 -0
- oscura/visualization/figure_manager.py +156 -0
- {oscura-0.4.0.dist-info → oscura-0.5.0.dist-info}/METADATA +1 -1
- {oscura-0.4.0.dist-info → oscura-0.5.0.dist-info}/RECORD +24 -19
- oscura/automotive/dtc/data.json +0 -2763
- oscura/schemas/bus_configuration.json +0 -322
- oscura/schemas/device_mapping.json +0 -182
- oscura/schemas/packet_format.json +0 -418
- oscura/schemas/protocol_definition.json +0 -363
- {oscura-0.4.0.dist-info → oscura-0.5.0.dist-info}/WHEEL +0 -0
- {oscura-0.4.0.dist-info → oscura-0.5.0.dist-info}/entry_points.txt +0 -0
- {oscura-0.4.0.dist-info → oscura-0.5.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,418 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://oscura.io/schemas/packet_format.json",
|
|
4
|
-
"title": "Packet Format Configuration Schema",
|
|
5
|
-
"description": "Schema for validating binary packet format configurations for custom DAQ systems and packet captures (CFG-001).",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"required": ["name", "packet", "header", "samples"],
|
|
8
|
-
"additionalProperties": true,
|
|
9
|
-
"properties": {
|
|
10
|
-
"name": {
|
|
11
|
-
"type": "string",
|
|
12
|
-
"description": "Format identifier",
|
|
13
|
-
"pattern": "^[a-zA-Z][a-zA-Z0-9_]*$",
|
|
14
|
-
"minLength": 1
|
|
15
|
-
},
|
|
16
|
-
"version": {
|
|
17
|
-
"type": "string",
|
|
18
|
-
"description": "Format version",
|
|
19
|
-
"pattern": "^\\d+\\.\\d+$"
|
|
20
|
-
},
|
|
21
|
-
"description": {
|
|
22
|
-
"type": "string",
|
|
23
|
-
"description": "Human-readable description of the packet format"
|
|
24
|
-
},
|
|
25
|
-
"packet": {
|
|
26
|
-
"type": "object",
|
|
27
|
-
"description": "Overall packet structure definition",
|
|
28
|
-
"required": ["byte_order"],
|
|
29
|
-
"properties": {
|
|
30
|
-
"size": {
|
|
31
|
-
"oneOf": [
|
|
32
|
-
{
|
|
33
|
-
"type": "integer",
|
|
34
|
-
"minimum": 1,
|
|
35
|
-
"description": "Fixed packet size in bytes"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"type": "string",
|
|
39
|
-
"enum": ["variable"],
|
|
40
|
-
"description": "Variable-length packets"
|
|
41
|
-
}
|
|
42
|
-
]
|
|
43
|
-
},
|
|
44
|
-
"byte_order": {
|
|
45
|
-
"type": "string",
|
|
46
|
-
"enum": ["big", "little", "native"],
|
|
47
|
-
"description": "Default byte order for multi-byte fields"
|
|
48
|
-
},
|
|
49
|
-
"length_field": {
|
|
50
|
-
"type": "string",
|
|
51
|
-
"description": "Header field name containing packet length (required when size='variable')"
|
|
52
|
-
},
|
|
53
|
-
"length_includes_header": {
|
|
54
|
-
"type": "boolean",
|
|
55
|
-
"description": "Whether length field includes header size (default: true)",
|
|
56
|
-
"default": true
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
"additionalProperties": false
|
|
60
|
-
},
|
|
61
|
-
"header": {
|
|
62
|
-
"type": "object",
|
|
63
|
-
"description": "Packet header definition",
|
|
64
|
-
"required": ["size", "fields"],
|
|
65
|
-
"properties": {
|
|
66
|
-
"size": {
|
|
67
|
-
"type": "integer",
|
|
68
|
-
"minimum": 0,
|
|
69
|
-
"description": "Header size in bytes"
|
|
70
|
-
},
|
|
71
|
-
"fields": {
|
|
72
|
-
"type": "array",
|
|
73
|
-
"description": "Header field definitions",
|
|
74
|
-
"items": {
|
|
75
|
-
"type": "object",
|
|
76
|
-
"required": ["name", "offset", "size", "type"],
|
|
77
|
-
"properties": {
|
|
78
|
-
"name": {
|
|
79
|
-
"type": "string",
|
|
80
|
-
"description": "Field name",
|
|
81
|
-
"pattern": "^[a-zA-Z][a-zA-Z0-9_]*$"
|
|
82
|
-
},
|
|
83
|
-
"offset": {
|
|
84
|
-
"type": "integer",
|
|
85
|
-
"minimum": 0,
|
|
86
|
-
"description": "Byte offset from start of header"
|
|
87
|
-
},
|
|
88
|
-
"size": {
|
|
89
|
-
"type": "integer",
|
|
90
|
-
"minimum": 1,
|
|
91
|
-
"description": "Field size in bytes"
|
|
92
|
-
},
|
|
93
|
-
"type": {
|
|
94
|
-
"type": "string",
|
|
95
|
-
"enum": [
|
|
96
|
-
"uint8",
|
|
97
|
-
"uint16",
|
|
98
|
-
"uint32",
|
|
99
|
-
"uint64",
|
|
100
|
-
"int8",
|
|
101
|
-
"int16",
|
|
102
|
-
"int32",
|
|
103
|
-
"int64",
|
|
104
|
-
"uint40",
|
|
105
|
-
"uint48",
|
|
106
|
-
"uint56",
|
|
107
|
-
"float32",
|
|
108
|
-
"float64",
|
|
109
|
-
"bitfield",
|
|
110
|
-
"bytes"
|
|
111
|
-
],
|
|
112
|
-
"description": "Field data type"
|
|
113
|
-
},
|
|
114
|
-
"endian": {
|
|
115
|
-
"type": "string",
|
|
116
|
-
"enum": ["big", "little", "native"],
|
|
117
|
-
"description": "Byte order for this field (overrides packet default)"
|
|
118
|
-
},
|
|
119
|
-
"value": {
|
|
120
|
-
"description": "Expected constant value for validation",
|
|
121
|
-
"oneOf": [
|
|
122
|
-
{ "type": "integer" },
|
|
123
|
-
{ "type": "array", "items": { "type": "integer" } }
|
|
124
|
-
]
|
|
125
|
-
},
|
|
126
|
-
"description": {
|
|
127
|
-
"type": "string",
|
|
128
|
-
"description": "Field description"
|
|
129
|
-
},
|
|
130
|
-
"fields": {
|
|
131
|
-
"type": "object",
|
|
132
|
-
"description": "Bitfield extraction (when type=bitfield)",
|
|
133
|
-
"patternProperties": {
|
|
134
|
-
"^[a-zA-Z][a-zA-Z0-9_]*$": {
|
|
135
|
-
"type": "object",
|
|
136
|
-
"properties": {
|
|
137
|
-
"bit": {
|
|
138
|
-
"type": "integer",
|
|
139
|
-
"minimum": 0,
|
|
140
|
-
"description": "Single bit position"
|
|
141
|
-
},
|
|
142
|
-
"bits": {
|
|
143
|
-
"type": "array",
|
|
144
|
-
"items": { "type": "integer", "minimum": 0 },
|
|
145
|
-
"minItems": 2,
|
|
146
|
-
"maxItems": 2,
|
|
147
|
-
"description": "Bit range [start, end] inclusive"
|
|
148
|
-
},
|
|
149
|
-
"description": {
|
|
150
|
-
"type": "string"
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
"oneOf": [{ "required": ["bit"] }, { "required": ["bits"] }]
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
"additionalProperties": false
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
"additionalProperties": false
|
|
163
|
-
},
|
|
164
|
-
"samples": {
|
|
165
|
-
"type": "object",
|
|
166
|
-
"description": "Sample data definition",
|
|
167
|
-
"required": ["offset", "format"],
|
|
168
|
-
"properties": {
|
|
169
|
-
"offset": {
|
|
170
|
-
"type": "integer",
|
|
171
|
-
"minimum": 0,
|
|
172
|
-
"description": "Byte offset from start of packet where samples begin"
|
|
173
|
-
},
|
|
174
|
-
"count": {
|
|
175
|
-
"type": "integer",
|
|
176
|
-
"minimum": 1,
|
|
177
|
-
"description": "Number of samples per packet"
|
|
178
|
-
},
|
|
179
|
-
"format": {
|
|
180
|
-
"type": "object",
|
|
181
|
-
"description": "Sample format specification",
|
|
182
|
-
"required": ["size", "type"],
|
|
183
|
-
"properties": {
|
|
184
|
-
"size": {
|
|
185
|
-
"type": "integer",
|
|
186
|
-
"minimum": 1,
|
|
187
|
-
"description": "Size of each sample in bytes"
|
|
188
|
-
},
|
|
189
|
-
"type": {
|
|
190
|
-
"type": "string",
|
|
191
|
-
"enum": [
|
|
192
|
-
"uint8",
|
|
193
|
-
"uint16",
|
|
194
|
-
"uint32",
|
|
195
|
-
"uint64",
|
|
196
|
-
"int8",
|
|
197
|
-
"int16",
|
|
198
|
-
"int32",
|
|
199
|
-
"int64",
|
|
200
|
-
"float32",
|
|
201
|
-
"float64"
|
|
202
|
-
],
|
|
203
|
-
"description": "Sample data type"
|
|
204
|
-
},
|
|
205
|
-
"endian": {
|
|
206
|
-
"type": "string",
|
|
207
|
-
"enum": ["big", "little", "native"],
|
|
208
|
-
"description": "Byte order for samples"
|
|
209
|
-
},
|
|
210
|
-
"description": {
|
|
211
|
-
"type": "string"
|
|
212
|
-
}
|
|
213
|
-
},
|
|
214
|
-
"additionalProperties": false
|
|
215
|
-
},
|
|
216
|
-
"channel_extraction": {
|
|
217
|
-
"type": "object",
|
|
218
|
-
"description": "Multi-channel extraction from sample values",
|
|
219
|
-
"properties": {
|
|
220
|
-
"enabled": {
|
|
221
|
-
"type": "boolean"
|
|
222
|
-
},
|
|
223
|
-
"mode": {
|
|
224
|
-
"type": "string",
|
|
225
|
-
"enum": ["bitwise", "byte"],
|
|
226
|
-
"description": "Extraction mode"
|
|
227
|
-
},
|
|
228
|
-
"channels": {
|
|
229
|
-
"type": "array",
|
|
230
|
-
"items": {
|
|
231
|
-
"type": "object",
|
|
232
|
-
"required": ["name"],
|
|
233
|
-
"properties": {
|
|
234
|
-
"name": {
|
|
235
|
-
"type": "string",
|
|
236
|
-
"pattern": "^[a-zA-Z][a-zA-Z0-9_]*$"
|
|
237
|
-
},
|
|
238
|
-
"bits": {
|
|
239
|
-
"type": "array",
|
|
240
|
-
"items": { "type": "integer", "minimum": 0 },
|
|
241
|
-
"minItems": 2,
|
|
242
|
-
"maxItems": 2,
|
|
243
|
-
"description": "Bit range [start, end] inclusive"
|
|
244
|
-
},
|
|
245
|
-
"description": {
|
|
246
|
-
"type": "string"
|
|
247
|
-
}
|
|
248
|
-
},
|
|
249
|
-
"additionalProperties": false
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
},
|
|
253
|
-
"additionalProperties": false
|
|
254
|
-
}
|
|
255
|
-
},
|
|
256
|
-
"additionalProperties": false
|
|
257
|
-
},
|
|
258
|
-
"timing": {
|
|
259
|
-
"type": "object",
|
|
260
|
-
"description": "Timing and sample rate information",
|
|
261
|
-
"properties": {
|
|
262
|
-
"sample_rate": {
|
|
263
|
-
"oneOf": [
|
|
264
|
-
{ "type": "number", "exclusiveMinimum": 0 },
|
|
265
|
-
{
|
|
266
|
-
"type": "string",
|
|
267
|
-
"pattern": "^[0-9]+(\\.[0-9]+)?[eE][+-]?[0-9]+$"
|
|
268
|
-
}
|
|
269
|
-
],
|
|
270
|
-
"description": "Sample rate in Hz (number or scientific notation string)"
|
|
271
|
-
},
|
|
272
|
-
"timestamp_resolution": {
|
|
273
|
-
"oneOf": [
|
|
274
|
-
{ "type": "number", "exclusiveMinimum": 0 },
|
|
275
|
-
{
|
|
276
|
-
"type": "string",
|
|
277
|
-
"pattern": "^[0-9]+(\\.[0-9]+)?[eE][+-]?[0-9]+$"
|
|
278
|
-
}
|
|
279
|
-
],
|
|
280
|
-
"description": "Timestamp resolution in seconds (number or scientific notation string)"
|
|
281
|
-
},
|
|
282
|
-
"samples_per_packet": {
|
|
283
|
-
"type": "integer",
|
|
284
|
-
"minimum": 1,
|
|
285
|
-
"description": "Expected samples per packet"
|
|
286
|
-
}
|
|
287
|
-
},
|
|
288
|
-
"additionalProperties": false
|
|
289
|
-
},
|
|
290
|
-
"validation": {
|
|
291
|
-
"type": "object",
|
|
292
|
-
"description": "Packet validation rules",
|
|
293
|
-
"properties": {
|
|
294
|
-
"sync_check": {
|
|
295
|
-
"type": "object",
|
|
296
|
-
"properties": {
|
|
297
|
-
"enabled": {
|
|
298
|
-
"type": "boolean"
|
|
299
|
-
},
|
|
300
|
-
"field": {
|
|
301
|
-
"type": "string",
|
|
302
|
-
"description": "Header field name to validate"
|
|
303
|
-
},
|
|
304
|
-
"expected": {
|
|
305
|
-
"description": "Expected value",
|
|
306
|
-
"oneOf": [
|
|
307
|
-
{ "type": "integer" },
|
|
308
|
-
{ "type": "array", "items": { "type": "integer" } }
|
|
309
|
-
]
|
|
310
|
-
},
|
|
311
|
-
"on_failure": {
|
|
312
|
-
"type": "string",
|
|
313
|
-
"enum": ["error", "warn", "skip"],
|
|
314
|
-
"description": "Action on validation failure"
|
|
315
|
-
}
|
|
316
|
-
},
|
|
317
|
-
"additionalProperties": false
|
|
318
|
-
},
|
|
319
|
-
"sequence_check": {
|
|
320
|
-
"type": "object",
|
|
321
|
-
"properties": {
|
|
322
|
-
"enabled": {
|
|
323
|
-
"type": "boolean"
|
|
324
|
-
},
|
|
325
|
-
"field": {
|
|
326
|
-
"type": "string",
|
|
327
|
-
"description": "Sequence number field name"
|
|
328
|
-
},
|
|
329
|
-
"expect_increment": {
|
|
330
|
-
"type": "integer",
|
|
331
|
-
"minimum": 1,
|
|
332
|
-
"description": "Expected increment between packets"
|
|
333
|
-
},
|
|
334
|
-
"on_gap": {
|
|
335
|
-
"type": "string",
|
|
336
|
-
"enum": ["error", "warn", "skip"]
|
|
337
|
-
},
|
|
338
|
-
"on_duplicate": {
|
|
339
|
-
"type": "string",
|
|
340
|
-
"enum": ["error", "warn", "skip"]
|
|
341
|
-
}
|
|
342
|
-
},
|
|
343
|
-
"additionalProperties": false
|
|
344
|
-
},
|
|
345
|
-
"checksum": {
|
|
346
|
-
"type": "object",
|
|
347
|
-
"properties": {
|
|
348
|
-
"enabled": {
|
|
349
|
-
"type": "boolean"
|
|
350
|
-
},
|
|
351
|
-
"algorithm": {
|
|
352
|
-
"type": "string",
|
|
353
|
-
"enum": ["crc16", "crc32", "md5", "sha1"]
|
|
354
|
-
},
|
|
355
|
-
"field": {
|
|
356
|
-
"type": "string",
|
|
357
|
-
"description": "Checksum field name"
|
|
358
|
-
},
|
|
359
|
-
"scope": {
|
|
360
|
-
"type": "string",
|
|
361
|
-
"enum": ["header", "samples", "all"],
|
|
362
|
-
"description": "Data scope for checksum calculation"
|
|
363
|
-
}
|
|
364
|
-
},
|
|
365
|
-
"additionalProperties": false
|
|
366
|
-
}
|
|
367
|
-
},
|
|
368
|
-
"additionalProperties": false
|
|
369
|
-
},
|
|
370
|
-
"preprocessing": {
|
|
371
|
-
"type": "object",
|
|
372
|
-
"description": "Data preprocessing options",
|
|
373
|
-
"properties": {
|
|
374
|
-
"trim_idle": {
|
|
375
|
-
"type": "object",
|
|
376
|
-
"properties": {
|
|
377
|
-
"enabled": {
|
|
378
|
-
"type": "boolean"
|
|
379
|
-
},
|
|
380
|
-
"pattern": {
|
|
381
|
-
"description": "Idle pattern to detect",
|
|
382
|
-
"oneOf": [
|
|
383
|
-
{ "type": "string", "enum": ["auto", "zeros", "ones"] },
|
|
384
|
-
{ "type": "integer" }
|
|
385
|
-
]
|
|
386
|
-
},
|
|
387
|
-
"min_duration": {
|
|
388
|
-
"type": "integer",
|
|
389
|
-
"minimum": 1,
|
|
390
|
-
"description": "Minimum samples to consider idle"
|
|
391
|
-
}
|
|
392
|
-
},
|
|
393
|
-
"additionalProperties": false
|
|
394
|
-
},
|
|
395
|
-
"deinterleave": {
|
|
396
|
-
"type": "object",
|
|
397
|
-
"properties": {
|
|
398
|
-
"enabled": {
|
|
399
|
-
"type": "boolean"
|
|
400
|
-
},
|
|
401
|
-
"channels": {
|
|
402
|
-
"type": "integer",
|
|
403
|
-
"minimum": 1,
|
|
404
|
-
"description": "Number of interleaved channels"
|
|
405
|
-
},
|
|
406
|
-
"order": {
|
|
407
|
-
"type": "string",
|
|
408
|
-
"enum": ["channel_first", "sample_first"],
|
|
409
|
-
"description": "Interleaving order"
|
|
410
|
-
}
|
|
411
|
-
},
|
|
412
|
-
"additionalProperties": false
|
|
413
|
-
}
|
|
414
|
-
},
|
|
415
|
-
"additionalProperties": false
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
}
|