Compare commits

...

11 Commits

5 changed files with 39 additions and 10 deletions

View File

@@ -59,15 +59,20 @@
] ]
}, },
{ {
"name": "Level", "name": "Quantity (oxygen)",
"models": [ "models": [
{ {
"name": "VegaLevel 10", "name": "VegaOxySense 10",
"units": ["m", "ft", "mm"] "units": ["g/m³", "mol/m³"]
}, }
]
},
{
"name": "Quantity (TSS)",
"models": [
{ {
"name": "VegaLevel 20", "name": "VegaSolidsProbe",
"units": ["m", "ft", "mm"] "units": ["g/m³"]
} }
] ]
} }

View File

@@ -91,6 +91,13 @@
], ],
"description": "Defines the position of the measurement relative to its parent equipment or system." "description": "Defines the position of the measurement relative to its parent equipment or system."
} }
},
"distance":{
"default": null,
"rules": {
"type": "number",
"description": "Defines the position of the measurement relative to its parent equipment or system."
}
} }
}, },
"asset": { "asset": {

View File

@@ -412,6 +412,14 @@
], ],
"description": "The frequency at which calculations are performed." "description": "The frequency at which calculations are performed."
} }
},
"flowNumber": {
"default": 1,
"rules": {
"type": "number",
"nullable": false,
"description": "Defines which effluent flow of the parent node to handle."
}
} }
} }

View File

@@ -11,8 +11,12 @@ class ChildRegistrationUtils {
this.logger.debug(`Registering child: ${name} (${id}) as ${softwareType} at ${positionVsParent}`); this.logger.debug(`Registering child: ${name} (${id}) as ${softwareType} at ${positionVsParent}`);
// Enhanced child setup // Enhanced child setup - multiple parents
child.parent = this.mainClass; if (Array.isArray(child.parent)) {
child.parent.push(this.mainClass);
} else {
child.parent = [this.mainClass];
}
child.positionVsParent = positionVsParent; child.positionVsParent = positionVsParent;
// Enhanced measurement container with rich context // Enhanced measurement container with rich context

View File

@@ -427,7 +427,9 @@ class MeasurementContainer {
return Number.NEGATIVE_INFINITY; return Number.NEGATIVE_INFINITY;
default: default:
this.logger.error(`Invalid positionVsParent provided: ${positionString}`); if (this.logger) {
this.logger.error(`Invalid positionVsParent provided: ${positionString}`);
}
return; return;
} }
} }
@@ -442,7 +444,10 @@ class MeasurementContainer {
if (positionValue > 0) { if (positionValue > 0) {
return "downstream"; return "downstream";
} }
this.logger.error(`Invalid position provided: ${positionValue}`);
if (this.logger) {
this.logger.error(`Invalid position provided: ${positionValue}`);
}
} }
} }