Code audit across all consumers found: - `calculationMode` is declared in rotatingMachine.json, valve.json, and valveGroupControl.json schemas but NEVER read by any code. Pure dead config — entered values are silently discarded. Removed from all three. - `allowedActions` is declared in valve.json and valveGroupControl.json but their `flowController.handleInput` only calls `isValidSourceForMode`, never `isValidActionForMode`. The schema would invite users to configure action allow-lists that never gate anything. Removed from both. Kept in `rotatingMachine.json` and `machineGroupControl.json` where the action allow-list IS enforced (specificClass / handlers / strategies). Schema fixes only — no runtime behaviour changes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
306 lines
10 KiB
JSON
306 lines
10 KiB
JSON
{
|
|
"general": {
|
|
"name": {
|
|
"default": "valve",
|
|
"rules": {
|
|
"type": "string",
|
|
"description": "A human-readable name or label for this machine configuration."
|
|
}
|
|
},
|
|
"id": {
|
|
"default": null,
|
|
"rules": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"description": "A unique identifier for this configuration. If not provided, defaults to null."
|
|
}
|
|
},
|
|
"unit": {
|
|
"default": "m3/h",
|
|
"rules": {
|
|
"type": "string",
|
|
"description": "The default measurement unit for this configuration (e.g., 'meters', 'seconds', 'unitless')."
|
|
}
|
|
},
|
|
"logging": {
|
|
"logLevel": {
|
|
"default": "info",
|
|
"rules": {
|
|
"type": "enum",
|
|
"values": [
|
|
{
|
|
"value": "debug",
|
|
"description": "Log messages are printed for debugging purposes."
|
|
},
|
|
{
|
|
"value": "info",
|
|
"description": "Informational messages are printed."
|
|
},
|
|
{
|
|
"value": "warn",
|
|
"description": "Warning messages are printed."
|
|
},
|
|
{
|
|
"value": "error",
|
|
"description": "Error messages are printed."
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"enabled": {
|
|
"default": true,
|
|
"rules": {
|
|
"type": "boolean",
|
|
"description": "Indicates whether logging is active. If true, log messages will be generated."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"functionality": {
|
|
"softwareType": {
|
|
"default": "valve",
|
|
"rules": {
|
|
"type": "string",
|
|
"description": "Specified software type for this configuration."
|
|
}
|
|
},
|
|
"role": {
|
|
"default": "controller",
|
|
"rules": {
|
|
"type": "string",
|
|
"description": "Indicates the role this configuration plays within the system."
|
|
}
|
|
},
|
|
"positionVsParent":{
|
|
"default":"atEquipment",
|
|
"rules": {
|
|
"type": "enum",
|
|
"values": [
|
|
{
|
|
"value": "atEquipment",
|
|
"description": "The node is connected at the equipment level and is responsible for controlling or monitoring the equipment as a whole."
|
|
},
|
|
{
|
|
"value": "upstream",
|
|
"description": "The node is connected in a downstream position, indicating it is responsible for monitoring or controlling processes that occur after the equipment's operation, such as product flow or output."
|
|
},
|
|
{
|
|
"value": "downstream",
|
|
"description": "The node is connected in an upstream position, indicating it is responsible for monitoring or controlling processes that occur before the equipment's operation, such as input flow or supply."
|
|
}
|
|
],
|
|
"description": "Defines the position of the measurement relative to its parent equipment or system."
|
|
}
|
|
}
|
|
},
|
|
"asset": {
|
|
"uuid": {
|
|
"default": null,
|
|
"rules": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"description": "A universally unique identifier for this asset. May be null if not assigned."
|
|
}
|
|
},
|
|
"tagCode":{
|
|
"default": null,
|
|
"rules": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"description": "Asset tag code which is a unique identifier for this asset. May be null if not assigned."
|
|
}
|
|
},
|
|
"geoLocation": {
|
|
"default": {},
|
|
"rules": {
|
|
"type": "object",
|
|
"description": "An object representing the asset's physical coordinates or location.",
|
|
"schema": {
|
|
"x": {
|
|
"default": 0,
|
|
"rules": {
|
|
"type": "number",
|
|
"description": "X coordinate of the asset's location."
|
|
}
|
|
},
|
|
"y": {
|
|
"default": 0,
|
|
"rules": {
|
|
"type": "number",
|
|
"description": "Y coordinate of the asset's location."
|
|
}
|
|
},
|
|
"z": {
|
|
"default": 0,
|
|
"rules": {
|
|
"type": "number",
|
|
"description": "Z coordinate of the asset's location."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"model": {
|
|
"default": null,
|
|
"rules": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"description": "Product model id (e.g. 'binder-valve-001'). Required at startup: the node looks the curve up via assetResolver.resolve('curves', model). Supplier/type/units are derived from the asset registry (assetResolver.resolveAssetMetadata) — do NOT save them on the node."
|
|
}
|
|
},
|
|
"unit": {
|
|
"default": null,
|
|
"rules": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"description": "Deployment unit chosen by the user. Must appear in the registry's model.units list for this model. Validated at startup."
|
|
}
|
|
},
|
|
"accuracy": {
|
|
"default": null,
|
|
"rules": {
|
|
"type": "number",
|
|
"nullable": true,
|
|
"description": "The accuracy of the machine or sensor, typically as a percentage or absolute value."
|
|
}
|
|
},
|
|
"valveCurve": {
|
|
"default": {
|
|
"1.204": {
|
|
"1": {
|
|
"x": [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100],
|
|
"y": [0, 18, 50, 95, 150, 216, 337, 564, 882, 1398, 1870]
|
|
}
|
|
}
|
|
},
|
|
"rules": {
|
|
"type": "valveCurve",
|
|
"description": "the first parameter is kg (usually according to 1 normal cubic meter per hour acc. to din norm ) and the second parameter is the diameter in mm. The x values are the opening of the valve in percent and the y values are the KV values in m3/h. The KV value is the flow rate of water at a temperature of 20 degrees Celsius through the valve when it is fully open."
|
|
}
|
|
}
|
|
},
|
|
"mode": {
|
|
"current": {
|
|
"default": "auto",
|
|
"rules": {
|
|
"type": "enum",
|
|
"values": [
|
|
{
|
|
"value": "auto",
|
|
"description": "Machine accepts setpoints from a parent controller and runs autonomously."
|
|
},
|
|
{
|
|
"value": "virtualControl",
|
|
"description": "Controlled via GUI setpoints; ignores parent commands."
|
|
},
|
|
{
|
|
"value": "fysicalControl",
|
|
"description": "Controlled via physical buttons or switches; ignores external automated commands."
|
|
},
|
|
{
|
|
"value": "maintenance",
|
|
"description": "No active control from auto, virtual, or fysical sources."
|
|
}
|
|
],
|
|
"description": "The operational mode of the machine."
|
|
}
|
|
},
|
|
"allowedSources":{
|
|
"default": {},
|
|
"rules": {
|
|
"type": "object",
|
|
"schema":{
|
|
"auto": {
|
|
"default": ["parent", "GUI", "fysical"],
|
|
"rules": {
|
|
"type": "set",
|
|
"itemType": "string",
|
|
"description": "Sources allowed in auto mode."
|
|
}
|
|
},
|
|
"virtualControl": {
|
|
"default": ["GUI", "fysical"],
|
|
"rules": {
|
|
"type": "set",
|
|
"itemType": "string",
|
|
"description": "Sources allowed in virtualControl mode."
|
|
}
|
|
},
|
|
"fysicalControl": {
|
|
"default": ["fysical"],
|
|
"rules": {
|
|
"type": "set",
|
|
"itemType": "string",
|
|
"description": "Sources allowed in fysicalControl mode."
|
|
}
|
|
}
|
|
},
|
|
"description": "Information about valid command sources recognized by the machine."
|
|
}
|
|
}
|
|
},
|
|
"source": {
|
|
"default": "parent",
|
|
"rules": {
|
|
"type": "enum",
|
|
"values": [
|
|
{
|
|
"value": "parent",
|
|
"description": "Commands are received from a parent controller."
|
|
},
|
|
{
|
|
"value": "GUI",
|
|
"description": "Commands are received from a graphical user interface."
|
|
},
|
|
{
|
|
"value": "fysical",
|
|
"description": "Commands are received from physical buttons or switches."
|
|
}
|
|
],
|
|
"description": "Information about valid command sources recognized by the machine."
|
|
}
|
|
},
|
|
"sequences":{
|
|
"default":{},
|
|
"rules": {
|
|
"type": "object",
|
|
"schema": {
|
|
"startup": {
|
|
"default": ["starting","warmingup","operational"],
|
|
"rules": {
|
|
"type": "set",
|
|
"itemType": "string",
|
|
"description": "Sequence of states for starting up the machine."
|
|
}
|
|
},
|
|
"shutdown": {
|
|
"default": ["stopping","coolingdown","idle"],
|
|
"rules": {
|
|
"type": "set",
|
|
"itemType": "string",
|
|
"description": "Sequence of states for shutting down the machine."
|
|
}
|
|
},
|
|
"emergencystop": {
|
|
"default": ["emergencystop","off"],
|
|
"rules": {
|
|
"type": "set",
|
|
"itemType": "string",
|
|
"description": "Sequence of states for an emergency stop."
|
|
}
|
|
},
|
|
"boot": {
|
|
"default": ["idle","starting","warmingup","operational"],
|
|
"rules": {
|
|
"type": "set",
|
|
"itemType": "string",
|
|
"description": "Sequence of states for booting up the machine."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"description": "Predefined sequences of states for the machine."
|
|
|
|
}
|
|
}
|
|
|