| RED.nodes.createNode(this, config); | RED.nodes.createNode(this, config); | ||||
| this.config = config; | this.config = config; | ||||
| var node = this; | var node = this; | ||||
| var decimal = /^\s*[+-]{0,1}\s*([\d]+(\.[\d]*)*)\s*$/ | |||||
| setNodeStatus({ fill: "grey", shape: "ring", text: "|| Off" }); | setNodeStatus({ fill: "grey", shape: "ring", text: "|| Off" }); | ||||
| node.tBlinker = null;// Timer Blinker | node.tBlinker = null;// Timer Blinker | ||||
| node.blinkfrequency = typeof config.blinkfrequency === "undefined" ? 500 : config.blinkfrequency; | node.blinkfrequency = typeof config.blinkfrequency === "undefined" ? 500 : config.blinkfrequency; |
| RED.nodes.createNode(this,config); | RED.nodes.createNode(this,config); | ||||
| this.config = config; | this.config = config; | ||||
| var node = this; | var node = this; | ||||
| var decimal = /^\s*[+-]{0,1}\s*([\d]+(\.[\d]*)*)\s*$/ | |||||
| setNodeStatus( {fill: "grey" ,shape: "dot" ,text: "Waiting"}); | setNodeStatus( {fill: "grey" ,shape: "dot" ,text: "Waiting"}); | ||||
| this.on('input', function (msg) { | this.on('input', function (msg) { | ||||
| var sTopic = node.config.name; | var sTopic = node.config.name; |
| RED.nodes.createNode(this, config); | RED.nodes.createNode(this, config); | ||||
| this.config = config; | this.config = config; | ||||
| var node = this; | var node = this; | ||||
| var decimal = /^\s*[+-]{0,1}\s*([\d]+(\.[\d]*)*)\s*$/ | |||||
| setNodeStatus({ fill: "green", shape: "ring", text: "-> pass" }); | setNodeStatus({ fill: "green", shape: "ring", text: "-> pass" }); | ||||
| node.bInviaMessaggio = true; // Send the message or not | node.bInviaMessaggio = true; // Send the message or not | ||||
| node.currentMsg = {}; // Stores current payload | node.currentMsg = {}; // Stores current payload |