{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "datasets.schema.json", "title": "Datasets Configuration", "description": "Esquema para editar plc_datasets.json (mĂșltiples datasets y variables)", "type": "object", "additionalProperties": false, "properties": { "datasets": { "type": "object", "title": "Datasets", "additionalProperties": { "type": "object", "properties": { "name": { "type": "string", "title": "Dataset Name", "description": "Nombre legible del dataset", "minLength": 1, "maxLength": 60 }, "prefix": { "type": "string", "title": "CSV Prefix", "description": "Prefijo para archivos CSV", "pattern": "^[a-zA-Z0-9_-]+$", "minLength": 1, "maxLength": 20 }, "variables": { "type": "object", "additionalProperties": { "type": "object", "properties": { "area": { "type": "string", "title": "Memory Area", "enum": [ "db", "mw", "m", "pew", "pe", "paw", "pa", "e", "a", "mb" ] }, "db": { "type": [ "integer", "null" ], "title": "DB Number", "minimum": 1, "maximum": 9999 }, "offset": { "type": "integer", "title": "Offset", "minimum": 0, "maximum": 8191 }, "bit": { "type": [ "integer", "null" ], "title": "Bit Position", "minimum": 0, "maximum": 7 }, "type": { "type": "string", "title": "Data Type", "enum": [ "real", "int", "bool", "dint", "word", "byte", "uint", "udint", "sint", "usint" ] }, "streaming": { "type": "boolean", "title": "Stream to PlotJuggler", "default": false } }, "required": [ "area", "offset", "type" ] } }, "streaming_variables": { "type": "array", "title": "Streaming Variables", "items": { "type": "string" }, "default": [] }, "sampling_interval": { "type": [ "number", "null" ], "title": "Sampling Interval (s)", "description": "VacĂ­o para usar el intervalo global", "minimum": 0.01, "maximum": 10 }, "enabled": { "type": "boolean", "title": "Dataset Enabled", "default": false, "enum": [ true, false ], "options": { "enum_titles": [ "Activate", "Deactivate" ] } }, "created": { "type": [ "string", "null" ], "title": "Created" } }, "required": [ "name", "prefix", "variables", "streaming_variables" ] } }, "active_datasets": { "type": "array", "title": "Active Datasets", "items": { "type": "string" }, "default": [] }, "current_dataset_id": { "type": [ "string", "null" ], "title": "Current Dataset Id" }, "version": { "type": "string", "title": "Version" }, "last_update": { "type": [ "string", "null" ], "title": "Last Update" } }, "required": [ "datasets" ] }