2025-10-22 16:07:42 +02:00
|
|
|
const { childRegistrationUtils, logger, MeasurementContainer } = require('generalFunctions');
|
|
|
|
|
const EventEmitter = require('events');
|
|
|
|
|
|
|
|
|
|
class Settler {
|
|
|
|
|
constructor(config) {
|
|
|
|
|
this.config = config;
|
|
|
|
|
// EVOLV stuff
|
|
|
|
|
this.logger = new logger(this.config.general.logging.enabled, this.config.general.logging.logLevel, config.general.name);
|
|
|
|
|
this.emitter = new EventEmitter();
|
|
|
|
|
this.measurements = new MeasurementContainer();
|
|
|
|
|
this.childRegistrationUtils = new childRegistrationUtils(this); // Child registration utility
|
|
|
|
|
}
|
2025-10-22 16:22:33 +02:00
|
|
|
|
|
|
|
|
registerChild(child, softwareType) {
|
|
|
|
|
switch (softwareType) {
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
this.logger.error(`Unrecognized softwareType: ${softwareType}`);
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-10-22 16:07:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
module.exports = { Settler };
|