(function(f){var g=new function(){this.Connectivity=function(){this.category="Device";this.name="Connectivity";this.subnavigationicon="sec-nav-network.png";var c=void 0;this.Init=function(){c=this;if(void 0==c||null==c)return!1;c.setCycleTime(2E3);c.setCommunicationObj(f.DevMan.getCommunicationModule(f.DevMan.CommunicationType.mdp));c.addParameter("NIC_Property_Name",!1);c.addParameter("NIC_Property_IPv4_Address",!0);c.addParameter("NIC_Property_IPv4_Subnet_Mask",!0);c.addParameter("NIC_Property_DHCP",
!0);c.addParameter("NIC_Property_IPv4_Default_Gateway",!0);c.addParameter("TwinCAT_TcMisc_Property_AmsNetID",!0);c.setOnInitStaticPage(g);c.setOnDisplayValues(h);return!0};var g=function(a){var b="";if(a[0].getHasValues()||a[1].getHasValues()||a[2].getHasValues()||a[3].getHasValues())for(var b=b+'<table style="margin-bottom: 5px"><tr><td class="td_trans"><h3>Network</h3></td>',b=b+('<td class="td_Action_trans">'+(new ControlLib.SmallButton).Create("btnEditNicSettings","configure","Configure Network Settings")+
"</td>"),b=b+"</tr></table>",d=Math.max(a[0].moduleCount,a[1].moduleCount,a[2].moduleCount,a[3].moduleCount),e=0;e<d;e++)b+="<table>",a[0].getHasValues()&&a[0].values.length>e&&(b+='<tr><td class="td_FirstColumn">Name</td><td><div id="'+a[0].parameterName+e+'"></div></td></tr> '),a[1].getHasValues()&&a[1].values.length>e&&(b+='<tr><td class="td_FirstColumn">IPv4 Address</td><td><div id="'+a[1].parameterName+e+'"></div></td></tr> '),a[2].getHasValues()&&a[2].values.length>e&&(b+='<tr><td class="td_FirstColumn">IPv4 Subnet Mask</td><td><div id="'+
a[2].parameterName+e+'"></div></td></tr> '),a[4].getHasValues()&&a[4].values.length>e&&(b+='<tr><td class="td_FirstColumn">IPv4 Default Gateway</td><td><div id="'+a[4].parameterName+e+'"></div></td></tr> '),a[3].getHasValues()&&a[3].values.length>e&&(b+='<tr><td class="td_FirstColumn">DHCP</td><td><div id="'+a[3].parameterName+e+'"></div></td></tr> '),b+="</table>",b+="<br>";a[5].getHasValues()&&(b+="<h3>AMS Net ID</h3>",b+="<table>",b+='<tr><td class="td_FirstColumn">AMS Net ID</td><td><div id="'+
a[5].parameterName+'"></div></td></tr> ',b+="</table><br>");b+='<div id="status"></div>';c.writeActivePage(b);(a[0].getHasValues()||a[1].getHasValues()||a[2].getHasValues()||a[3].getHasValues())&&c.setElementOnClick("btnEditNicSettings",function(a){return function(){c.ChangePage("Hardware","NIC")}}(0));return!0},h=function(a){for(var b=Math.max(a[0].moduleCount,a[1].moduleCount,a[2].moduleCount,a[3].moduleCount),d=0;d<b;d++)a[0].getHasValues()&&a[0].values.length>d&&c.writeElement(a[0].parameterName+
d,a[0].values[d].data),a[1].getHasValues()&&a[1].values.length>d&&c.writeElement(a[1].parameterName+d,a[1].values[d].data),a[2].getHasValues()&&a[2].values.length>d&&c.writeElement(a[2].parameterName+d,a[2].values[d].data),a[4].getHasValues()&&a[4].values.length>d&&c.writeElement(a[4].parameterName+d,a[4].values[d].data),a[3].getHasValues()&&a[3].values.length>d&&c.writeElement(a[3].parameterName+d,f.Helper.getStatusString(a[3].values[d].data));a[5].getHasValues()&&c.writeElement(a[5].parameterName,
a[5].values[0].data)}};this.Connectivity.prototype=new f.Page_Template.Template};f.DevMan.RegisterModule(new g.Connectivity,f.DevMan.ModuleType.Website)})(window);
