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() {