From 078a0d80dc645f5199938708ef81e1128e04fabf Mon Sep 17 00:00:00 2001 From: znetsixe <73483679+znetsixe@users.noreply.github.com> Date: Thu, 4 Sep 2025 17:07:18 +0200 Subject: [PATCH] updated function for registration of machines --- src/specificClass.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/specificClass.js b/src/specificClass.js index 143ac13..a3a91b5 100644 --- a/src/specificClass.js +++ b/src/specificClass.js @@ -81,7 +81,14 @@ class MachineGroup { this.dynamicTotals = this.calcDynamicTotals(); } - registerOnChildEvents(){} + registerChild(child,softwareType) { + this.logger.debug('Setting up childs specific for this class'); + + if(softwareType == "machine"){ + // Check if the machine is already registered + this.machines[child.config.general.id] === undefined ? this.machines[child.config.general.id] = child : this.logger.warn(`Machine ${child.config.general.id} is already registered.`); + } + } calcAbsoluteTotals() {