Added seperate process, DB and parent outputs
This commit is contained in:
@@ -26,8 +26,9 @@
|
||||
X_TS_init: { value: 125.0009, required: true }
|
||||
},
|
||||
inputs: 1,
|
||||
outputs: 1,
|
||||
outputLabels: "Effluent",
|
||||
outputs: 3,
|
||||
inputLabels: ["input"],
|
||||
outputLabels: ["process", "dbase", "parent"],
|
||||
icon: "font-awesome/fa-recycle",
|
||||
label: function() {
|
||||
return this.name || "advanced-reactor";
|
||||
|
||||
@@ -16,7 +16,7 @@ class nodeClass {
|
||||
this.name = nameOfNode;
|
||||
|
||||
this._loadConfig(uiConfig)
|
||||
|
||||
this._registerChild();
|
||||
this._setupClass();
|
||||
|
||||
this._attachInputHandler();
|
||||
@@ -60,7 +60,7 @@ class nodeClass {
|
||||
|
||||
if (toggleUpdate) {
|
||||
this.reactor.updateState(msg.timestamp);
|
||||
send(this.reactor.getEffluent);
|
||||
send([this.reactor.getEffluent, null, null]);
|
||||
}
|
||||
|
||||
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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user