[ 2, 3, 2, 180, 162, 10, 253 ]
如上面图片所示,收到的是一组数组的buffer,因为想要的数值是第四和第五的数值组合起来的,也就是180162,不知道有什么办法进行组合输出。
求大神指导下,下面是flow。
[ { “id”: “f6f2187d.f17ca8”, “type”: “tab”, “label”: “Flow 1”, “disabled”: false, “info”: “” }, { “id”: “368d30c6ea21487f”, “type”: “inject”, “z”: “f6f2187d.f17ca8”, “name”: “PS540角速度值”, “props”: [ { “p”: “payload” } ], “repeat”: “”, “crontab”: “”, “once”: false, “onceDelay”: 0.1, “topic”: “”, “payload”: “[2,3,0,3,0,1,116,57]”, “payloadType”: “bin”, “x”: 540, “y”: 280, “wires”: [ [ “e1928225e21cf584”, “99e06fdc2ffd354e”, “8b223d99e6b2e278” ] ] }, { “id”: “ed1cf85f0a728a11”, “type”: “debug”, “z”: “f6f2187d.f17ca8”, “name”: “”, “active”: false, “tosidebar”: true, “console”: false, “tostatus”: false, “complete”: “payload”, “targetType”: “msg”, “statusVal”: “”, “statusType”: “auto”, “x”: 970, “y”: 240, “wires”: [] }, { “id”: “8b223d99e6b2e278”, “type”: “buffer-parser”, “z”: “f6f2187d.f17ca8”, “name”: “”, “data”: “payload”, “dataType”: “msg”, “specification”: “spec”, “specificationType”: “ui”, “items”: [ { “type”: “buffer”, “name”: “00”, “offset”: 4, “length”: 2, “offsetbit”: 0, “scale”: “1”, “mask”: “” } ], “swap1”: “”, “swap2”: “”, “swap3”: “”, “swap1Type”: “swap”, “swap2Type”: “swap”, “swap3Type”: “swap”, “msgProperty”: “result”, “msgPropertyType”: “”, “resultType”: “value”, “resultTypeType”: “output”, “multipleResult”: true, “fanOutMultipleResult”: false, “setTopic”: false, “outputs”: 1, “x”: 790, “y”: 380, “wires”: [ [ “d7acf54d16e8a4e8” ] ] }, { “id”: “e1928225e21cf584”, “type”: “function”, “z”: “f6f2187d.f17ca8”, “name”: “msg”, “func”: “var msg5 = {payload:msg.payload[5]};\nvar msg6 = {payload:msg.payload[6]};\n\n\nreturn [msg5,msg6];\n”, “outputs”: 2, “noerr”: 0, “initialize”: “”, “finalize”: “”, “libs”: [], “x”: 790, “y”: 280, “wires”: [ [ “ed1cf85f0a728a11” ], [ “5c370a9dcc6663eb” ] ] }, { “id”: “5c370a9dcc6663eb”, “type”: “debug”, “z”: “f6f2187d.f17ca8”, “name”: “”, “active”: false, “tosidebar”: true, “console”: false, “tostatus”: false, “complete”: “payload”, “targetType”: “msg”, “statusVal”: “”, “statusType”: “auto”, “x”: 970, “y”: 300, “wires”: [] }, { “id”: “d7acf54d16e8a4e8”, “type”: “debug”, “z”: “f6f2187d.f17ca8”, “name”: “”, “active”: false, “tosidebar”: true, “console”: false, “tostatus”: false, “complete”: “payload”, “targetType”: “msg”, “statusVal”: “”, “statusType”: “auto”, “x”: 970, “y”: 380, “wires”: [] }, { “id”: “99e06fdc2ffd354e”, “type”: “debug”, “z”: “f6f2187d.f17ca8”, “name”: “”, “active”: true, “tosidebar”: true, “console”: false, “tostatus”: false, “complete”: “payload”, “targetType”: “msg”, “statusVal”: “”, “statusType”: “auto”, “x”: 970, “y”: 160, “wires”: [] } ]