"use strict";module.exports=function(t){require("source-map-support").install();var s=require("./modbus-basics");t.nodes.registerType("modbus-response",function(e){t.nodes.createNode(this,e),this.registerShowMax=e.registerShowMax;var a=this;s.setNodeStatusTo("initialized",a),a.on("input",function(e){var t="default";switch(Object.prototype.hasOwnProperty.call(e.payload,"data")&&(t="data"),t=Object.prototype.hasOwnProperty.call(e.payload,"address")?"address":t){case"data":e.payload.data.length>a.registerShowMax?s.setNodeStatusResponse(e.payload.data.length,a):s.setNodeStatusByResponseTo("active",e.payload,a);break;case"address":e.payload.length&&e.payload.length>a.registerShowMax?s.setNodeStatusResponse(e.payload.length,a):s.setNodeStatusByResponseTo("active",e.payload,a);break;default:s.setNodeStatusByResponseTo("active",JSON.stringify(e.payload),a)}}),a.on("close",function(){s.setNodeStatusTo("closed",a)})})};
//# sourceMappingURL=maps/modbus-response.js.map
