This commit is contained in:
znetsixe
2026-02-23 13:17:39 +01:00
parent ee38c8b581
commit f8012c8bad
2 changed files with 36 additions and 44 deletions

View File

@@ -2,6 +2,10 @@
const EventEmitter = require("events");
const {logger,configUtils,configManager, MeasurementContainer, interpolation , childRegistrationUtils} = require('generalFunctions');
/**
* Machine group controller domain model.
* Aggregates multiple rotating machines and coordinates group-level optimization/control.
*/
class MachineGroup {
constructor(machineGroupConfig = {}) {
@@ -50,7 +54,8 @@ class MachineGroup {
registerChild(child,softwareType) {
this.logger.debug('Setting up childs specific for this class');
const position = child.config.general.positionVsParent;
// Prefer functionality-scoped position metadata; keep general fallback for legacy nodes.
const position = child.config?.functionality?.positionVsParent || child.config?.general?.positionVsParent;
if(softwareType == "machine"){
// Check if the machine is already registered
@@ -1396,6 +1401,8 @@ async function makeMachines(){
}
makeMachines();
if (require.main === module) {
makeMachines();
}
//*/