Add initial implementation of the settler node for Node-RED
- Create package.json to define project metadata and dependencies - Implement settler.html for the node's UI in Node-RED - Add settler.js to register the settler node type and handle HTTP requests - Introduce src/nodeClass.js for the settler node class functionality - Define src/specificClass.js for settler-specific logic and utilities
This commit is contained in:
15
src/specificClass.js
Normal file
15
src/specificClass.js
Normal file
@@ -0,0 +1,15 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { Settler };
|
||||
Reference in New Issue
Block a user