I have created a custom node and would like to incorporate the link out node into it.
Is that possible?
It's that or somehow add the functions that are performed at the link in to the custom node.
My node.js
module.exports = function(RED) {
function PhoneNumberNode(config) {
RED.nodes.createNode(this,config);
this.number = config.number;
var node = this;
this.on('input', function(msg) {
msg.number = node.number;
node.send(msg);
});
}
RED.nodes.registerType("phonenumber",PhoneNumberNode);
Example flow:
[{"id":"8aadf171.517b6","type":"link in","z":"64a5e2ea.298e7c","name":"SMS","links":["34ec2c86.ba6c64","251c2ea4.db6e32","fecdfa88.4b14e8"],"x":455,"y":1200,"wires":[["565a8587.79193c"]]},{"id":"565a8587.79193c","type":"function","z":"64a5e2ea.298e7c","name":"Prepare Message","func":"msg.message = Buffer.from(msg.payload,\"utf8\").toString(\"Hex\"),\nmsg.chr = msg.payload.length,\nmsg.payload = msg.number + \",ASCII,\"+ msg.chr + \",\" + msg.message\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":590,"y":1200,"wires":[["6d438163.fbf47"]]},{"id":"6d438163.fbf47","type":"udp out","z":"64a5e2ea.298e7c","name":"SMS Out","addr":"192.168.13.31","iface":"","port":"1147","ipv":"udp4","outport":"1147","base64":false,"multicast":"false","x":760,"y":1200,"wires":[]},{"id":"fecdfa88.4b14e8","type":"link out","z":"64a5e2ea.298e7c","name":"Darren SMS","links":["87935307.973b5","a2b4e8ea.fbce58","8aadf171.517b6"],"x":355,"y":1200,"wires":[]},{"id":"4f854124.c9b1a","type":"phonenumber","z":"64a5e2ea.298e7c","name":"User Name","number":"18881234567","x":210,"y":1200,"wires":[["fecdfa88.4b14e8"]]}]