text: exports.connect=function(b,f){var a={channels:new Uint16Array(18),frameLoss:!1,failSafe:!1};b.setup(1E5,{rx:f,parity:"e",stopbits:2});b.removeAllListeners();var c="";b.on("data",function(d){c+=d;for(d=c.indexOf("\x00\u000f");0<=d;){if(23==d){var b=E.toUint8Array(c.substr(0,23)),e=b[22];E.mapInPlace(b,a.channels,void 0,-11);a.channels.set([e&128?2047:0,e&64?2047:0],16);a.frameLoss=!!(e&32);a.failSafe=!!(e&16);a.emit("frame",a)}c=c.substr(d+2);d=c.indexOf("\x00\u000f")}});return a}