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": [
{
"name": "VegaLevel 10",
"units": ["m", "ft", "mm"]
},
"name": "VegaOxySense 10",
"units": ["g/m³", "mol/m³"]
}
]
},
{
"name": "Quantity (TSS)",
"models": [
{
"name": "VegaLevel 20",
"units": ["m", "ft", "mm"]
"name": "VegaSolidsProbe",
"units": ["g/m³"]
}
]
}

View File

@@ -91,6 +91,13 @@
],
"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": {

View File

@@ -412,6 +412,14 @@
],
"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}`);
// Enhanced child setup
child.parent = this.mainClass;
// Enhanced child setup - multiple parents
if (Array.isArray(child.parent)) {
child.parent.push(this.mainClass);
} else {
child.parent = [this.mainClass];
}
child.positionVsParent = positionVsParent;
// Enhanced measurement container with rich context

View File

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