Ibm cloud 以节点红色指定功能节点上的输出

Ibm cloud 以节点红色指定功能节点上的输出,ibm-cloud,iot,node-red,Ibm Cloud,Iot,Node Red,我想知道如何指定函数节点可以在哪个输出上返回消息(msg) 例如: if( msg.eui == "00:11:22:33:44:55:66:88"){ output1(msg); //return on the output 1 only } if( msg.eui == "00:11:22:33:44:55:66:99"){ output2(msg); //return on the output 2 only } 需要更改什么?可以更改。节点Red使用一个 不应接收消息的

我想知道如何指定函数节点可以在哪个输出上返回消息(msg)

例如:

if( msg.eui == "00:11:22:33:44:55:66:88"){
    output1(msg); //return on the output 1 only
}
if( msg.eui == "00:11:22:33:44:55:66:99"){
    output2(msg); //return on the output 2 only
}

需要更改什么?

可以更改。节点Red使用一个

不应接收消息的输出设置为null,另一个设置为返回消息

if( msg.eui == "00:11:22:33:44:55:66:88"){
    return [msg, null]; //return on the output 1 only
}
if( msg.eui == "00:11:22:33:44:55:66:99"){
    return [null, msg]; //return on the output 2 only
}