Added seperate process, DB and parent outputs
This commit is contained in:
@@ -26,8 +26,9 @@
|
|||||||
X_TS_init: { value: 125.0009, required: true }
|
X_TS_init: { value: 125.0009, required: true }
|
||||||
},
|
},
|
||||||
inputs: 1,
|
inputs: 1,
|
||||||
outputs: 1,
|
outputs: 3,
|
||||||
outputLabels: "Effluent",
|
inputLabels: ["input"],
|
||||||
|
outputLabels: ["process", "dbase", "parent"],
|
||||||
icon: "font-awesome/fa-recycle",
|
icon: "font-awesome/fa-recycle",
|
||||||
label: function() {
|
label: function() {
|
||||||
return this.name || "advanced-reactor";
|
return this.name || "advanced-reactor";
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class nodeClass {
|
|||||||
this.name = nameOfNode;
|
this.name = nameOfNode;
|
||||||
|
|
||||||
this._loadConfig(uiConfig)
|
this._loadConfig(uiConfig)
|
||||||
|
this._registerChild();
|
||||||
this._setupClass();
|
this._setupClass();
|
||||||
|
|
||||||
this._attachInputHandler();
|
this._attachInputHandler();
|
||||||
@@ -60,7 +60,7 @@ class nodeClass {
|
|||||||
|
|
||||||
if (toggleUpdate) {
|
if (toggleUpdate) {
|
||||||
this.reactor.updateState(msg.timestamp);
|
this.reactor.updateState(msg.timestamp);
|
||||||
send(this.reactor.getEffluent);
|
send([this.reactor.getEffluent, null, null]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (done) {
|
if (done) {
|
||||||
@@ -100,6 +100,20 @@ class nodeClass {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register this node as a child upstream and downstream.
|
||||||
|
* Delayed to avoid Node-RED startup race conditions.
|
||||||
|
*/
|
||||||
|
_registerChild() {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.node.send([
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
{ topic: 'registerChild', payload: this.node.id , positionVsParent: this.config?.functionality?.positionVsParent || 'atEquipment' },
|
||||||
|
]);
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Setup reactor class based on config
|
* Setup reactor class based on config
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user