Add documentation
This commit is contained in:
@@ -3,7 +3,7 @@ const { Reactor_CSTR, Reactor_PFR } = require('./reactor_class.js');
|
|||||||
|
|
||||||
class nodeClass {
|
class nodeClass {
|
||||||
/**
|
/**
|
||||||
* Create ReactorNode.
|
* Construct ReactorNode.
|
||||||
* @param {object} uiConfig - Node-RED node configuration
|
* @param {object} uiConfig - Node-RED node configuration
|
||||||
* @param {object} RED - Node-RED runtime API
|
* @param {object} RED - Node-RED runtime API
|
||||||
* @param {object} nodeInstance - Node-RED node instance
|
* @param {object} nodeInstance - Node-RED node instance
|
||||||
@@ -23,7 +23,10 @@ class nodeClass {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_attachInputHandler() { // Handle input messages
|
/**
|
||||||
|
* Handle node-red input messages
|
||||||
|
*/
|
||||||
|
_attachInputHandler() {
|
||||||
this.node.on('input', (msg, send, done) => {
|
this.node.on('input', (msg, send, done) => {
|
||||||
let toggleUpdate = false;
|
let toggleUpdate = false;
|
||||||
|
|
||||||
@@ -58,6 +61,10 @@ class nodeClass {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parse node configuration
|
||||||
|
* @param {object} uiConfig Config set in UI in node-red
|
||||||
|
*/
|
||||||
_loadConfig(uiConfig) {
|
_loadConfig(uiConfig) {
|
||||||
this.config = {
|
this.config = {
|
||||||
reactor_type: uiConfig.reactor_type,
|
reactor_type: uiConfig.reactor_type,
|
||||||
@@ -84,6 +91,9 @@ class nodeClass {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setup reactor class based on config
|
||||||
|
*/
|
||||||
_setupClass() {
|
_setupClass() {
|
||||||
let new_reactor;
|
let new_reactor;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user