Index: uKadecot/trunk/tools/EcnlControllerUI/EcnlCtrlUI/js/ctrlui.min.js
===================================================================
--- uKadecot/trunk/tools/EcnlControllerUI/EcnlCtrlUI/js/ctrlui.min.js	(revision 108)
+++ uKadecot/trunk/tools/EcnlControllerUI/EcnlCtrlUI/js/ctrlui.min.js	(revision 125)
@@ -1,5 +1,5 @@
 // Copyright (C) 2015 by TOPPERS Project, Inc., JAPAN
 
-ï»¿(function(){'use strict';var $asm={};global.control=global.control||{};global.ctrlui=global.ctrlui||{};global.Kadecot=global.Kadecot||{};ss.initAssembly($asm,'EcnlControllerUI');var $CtrlUI=function(){this.$read=new(ss.makeGenericType(ss.Dictionary$2,[$ctrlui_DeviceController$DeviceInfo,$ctrlui_DeviceController$DeviceInfo]))();this.$m_WampClient=null;this.$m_DeviceController=null;this.$_m_CurrentNode=null;this.$timerId=0;this.$dpi=null;this.$m_WampClient=new $Kadecot_WampClient();this.$m_WampClient.addOpenCallback(ss.mkdel(this,this.$wampClientConnected));this.$m_WampClient.addCloseCallback(ss.mkdel(this,this.$wampClientDisconnected));this.$m_WampClient.connect('ws://'+window.location.host+'/webapi.ashx');};$CtrlUI.__typeName='CtrlUI';$CtrlUI.main=function(){if(ss.isNullOrUndefined($CtrlUI.page)){$CtrlUI.page=new $CtrlUI();$CtrlUI.info=new $ctrlui_Information();}
+ï»¿(function(){'use strict';var $asm={};global.control=global.control||{};global.ctrlui=global.ctrlui||{};global.Kadecot=global.Kadecot||{};ss.initAssembly($asm,'EcnlControllerUI');var $CtrlUI=function(){this.$read=new(ss.makeGenericType(ss.Dictionary$2,[$ctrlui_DeviceController$DeviceInfo,$ctrlui_DeviceController$DeviceInfo]))();this.$m_WampClient=null;this.$m_DeviceController=null;this.$_m_CurrentNode=null;this.$timerId=0;this.$dpi=null;this.$m_WampClient=new $Kadecot_WampClient();this.$m_WampClient.addOpenCallback(ss.mkdel(this,this.$wampClientConnected));this.$m_WampClient.addCloseCallback(ss.mkdel(this,this.$wampClientDisconnected));this.$m_WampClient.connect('ws://'+window.location.host+'/webapi');};$CtrlUI.__typeName='CtrlUI';$CtrlUI.main=function(){if(ss.isNullOrUndefined($CtrlUI.page)){$CtrlUI.page=new $CtrlUI();$CtrlUI.info=new $ctrlui_Information();}
 $(document).on('pageinit','#index',ss.mkdel($CtrlUI.page,$CtrlUI.page.$initClassGroups$1));};$CtrlUI.getPage=function(ele){var page=ele;if($(page).is('[data-role="page"]')){return page;}
 if($(page).parents('[data-role="page"]').length===1){return $(page).parents('[data-role="page"]').get(0);}
@@ -233,5 +233,5 @@
 else if(ss.isValue(arguments1)&&ss.isValue(argumentsKw)){ss.add(list,argsJson);ss.add(list,argsKwJson);}
 data=JSON.stringify(list);return data;};global.Kadecot.WampSerializer=$Kadecot_WampSerializer;ss.initClass($CtrlUI,$asm,{get_$m_CurrentNode:function(){return this.$_m_CurrentNode;},set_$m_CurrentNode:function(value){var flag=!ss.referenceEquals(this.$_m_CurrentNode,value)||ss.isNullOrUndefined(this.$_m_CurrentNode)&&ss.isNullOrUndefined(value);this.$_m_CurrentNode=value;if(flag){$(document).trigger($control_UIEventNames.currentNodeChange);}},$initClassGroups$1:function(eve){$CtrlUI.$page=eve.target;this.$setEvent();if(ss.isValue($CtrlUI.$m_ClassGroups)){return;}
-$ctrlui_DeviceController.getClassInfo=ss.mkdel(this,this.$getClassInfoHandler);this.set_$m_CurrentNode(null);var ClassGroupListUrl='devices/ClassGroupList.json';$.ajax(ClassGroupListUrl).success(ss.mkdel(this,this.$initClassGroups)).error(function(request,textStatus,error){$CtrlUI.$ajaxError(request,textStatus,error,ClassGroupListUrl);});},$setEvent:function(){$(document).on($control_UIEventNames.loadingShow,$control_UIEventHandler.loadingShow);$(document).on($control_UIEventNames.loadingHide,$control_UIEventHandler.loadingHide);$(document).on($control_UIEventNames.currentNodeChange,ss.thisFix(ss.mkdel(this,this.$currentNodeChange)));$(document).on($control_UIEventNames.searchStart,ss.mkdel(this,this.searchStart));$(document).on($control_UIEventNames.searchEnd,ss.mkdel(this,this.searchEnd));$(document).on($control_UIEventNames.searchError,ss.mkdel(this,this.searchError));$(document).on($control_UIEventNames.propertyWriteStart,ss.mkdel(this,this.propertyWriteStart));$(document).on($control_UIEventNames.propertyWriteEnd,ss.mkdel(this,this.propertyWriteEnd));this.get_connectionSwt().change(ss.thisFix(ss.mkdel(this,this.connect)));this.get_setPropertyBtn().click(ss.thisFix(ss.mkdel(this,this.setProperty)));this.get_getPropertyBtn().click(ss.mkdel(this,this.getProperty));this.get_setGetPropertyBtn().click(ss.thisFix(ss.mkdel(this,this.setGetProperty)));this.get_kadecotBtn().click(ss.thisFix(ss.mkdel(this,this.kadecotClick)));this.get_propertyList().change(ss.thisFix(ss.mkdel(this,this.propertyChange)));this.get_setInitParamsBtn().click(ss.thisFix(ss.mkdel(this,this.$setInitParams)));},$initClassGroups:function(data){var classGroups=$control_UI.toJSClassGroupInfoList(data);$CtrlUI.$m_Classes=[];$CtrlUI.$m_ClassGroups=Array.prototype.slice.call(classGroups);this.$getClassInfoHandler($ctrlui_T_ECN_EOJ.x1_PROFILE,$ctrlui_T_ECN_EOJ.x2_NODE_PROFILE,ss.mkdel(this,this.$getClassInfoCallback));},$getClassInfoCallback:function(di){$CtrlUI.$m_ProfileClassInfo=di;},$getClassInfoHandler:function(x1,x2,cb){var eclass=Enumerable.from($CtrlUI.$m_Classes).firstOrDefault(function(p){return p.classGroup.classGroupCode===x1&&p.classCode===x2;},ss.getDefaultValue($ctrlui_JsonClassInfo));if(ss.isValue(eclass)){if(ss.isNullOrUndefined(eclass.properties)){this.$getPropertyList(eclass,cb);}
+$ctrlui_DeviceController.getClassInfo=ss.mkdel(this,this.$getClassInfoHandler);this.set_$m_CurrentNode(null);var ClassGroupListUrl='devices/ClassGroupList.json';$.ajax(ClassGroupListUrl).success(ss.mkdel(this,this.$initClassGroups)).error(function(request,textStatus,error){$CtrlUI.$ajaxError(request,textStatus,error,ClassGroupListUrl);});},$setEvent:function(){$(document).on($control_UIEventNames.loadingShow,$control_UIEventHandler.loadingShow);$(document).on($control_UIEventNames.loadingHide,$control_UIEventHandler.loadingHide);$(document).on($control_UIEventNames.currentNodeChange,ss.thisFix(ss.mkdel(this,this.$currentNodeChange)));$(document).on($control_UIEventNames.searchStart,ss.mkdel(this,this.searchStart));$(document).on($control_UIEventNames.searchEnd,ss.mkdel(this,this.searchEnd));$(document).on($control_UIEventNames.searchError,ss.mkdel(this,this.searchError));$(document).on($control_UIEventNames.propertyWriteStart,ss.mkdel(this,this.propertyWriteStart));$(document).on($control_UIEventNames.propertyWriteEnd,ss.mkdel(this,this.propertyWriteEnd));this.get_connectionSwt().change(ss.thisFix(ss.mkdel(this,this.connect)));this.get_setPropertyBtn().click(ss.thisFix(ss.mkdel(this,this.setProperty)));this.get_getPropertyBtn().click(ss.mkdel(this,this.getProperty));this.get_setGetPropertyBtn().click(ss.thisFix(ss.mkdel(this,this.setGetProperty)));this.get_kadecotBtn().click(ss.thisFix(ss.mkdel(this,this.kadecotClick)));this.get_propertyList().change(ss.thisFix(ss.mkdel(this,this.propertyChange)));this.get_setInitParamsBtn().click(ss.thisFix(ss.mkdel(this,this.$setInitParams)));this.get_getInitParamsBtn().click(ss.thisFix(ss.mkdel(this,this.$getInitParams)));},$initClassGroups:function(data){var classGroups=$control_UI.toJSClassGroupInfoList(data);$CtrlUI.$m_Classes=[];$CtrlUI.$m_ClassGroups=Array.prototype.slice.call(classGroups);this.$getClassInfoHandler($ctrlui_T_ECN_EOJ.x1_PROFILE,$ctrlui_T_ECN_EOJ.x2_NODE_PROFILE,ss.mkdel(this,this.$getClassInfoCallback));},$getClassInfoCallback:function(di){$CtrlUI.$m_ProfileClassInfo=di;},$getClassInfoHandler:function(x1,x2,cb){var eclass=Enumerable.from($CtrlUI.$m_Classes).firstOrDefault(function(p){return p.classGroup.classGroupCode===x1&&p.classCode===x2;},ss.getDefaultValue($ctrlui_JsonClassInfo));if(ss.isValue(eclass)){if(ss.isNullOrUndefined(eclass.properties)){this.$getPropertyList(eclass,cb);}
 else{cb(eclass);}
 return;}
@@ -249,5 +249,5 @@
 $control_UI.disable(this.get_setPropertyBtn(),true);},$listitem_Click:function(elem,ev,di){if(ss.isNullOrUndefined(this.get_propertyList())){return;}
 this.set_$m_CurrentNode(di);},$wampClientConnected:function(){var flag=this.get_connectionSwt().prop('checked');if(!flag){this.get_connectionSwt().prop('checked',true).flipswitch('refresh');}
-$control_UI.toggleClass(this.get_searchBtn(),'ui-icon-alert','ui-icon-refresh');this.$sendHello();},$wampClientDisconnected:function(){$control_UI.toggleClass(this.get_searchBtn(),'ui-icon-refresh','ui-icon-alert');},connect:function(ele,eve){var connect=$(ele).prop('checked');if(connect&&!this.$m_WampClient.isConnecting()){this.$m_WampClient.connect('ws://'+window.location.host+'/webapi.ashx');}
+$control_UI.toggleClass(this.get_searchBtn(),'ui-icon-alert','ui-icon-refresh');this.$sendHello();},$wampClientDisconnected:function(){$control_UI.toggleClass(this.get_searchBtn(),'ui-icon-refresh','ui-icon-alert');},connect:function(ele,eve){var connect=$(ele).prop('checked');if(connect&&!this.$m_WampClient.isConnecting()){this.$m_WampClient.connect('ws://'+window.location.host+'/webapi');}
 else if(!connect&&this.$m_WampClient.isConnecting()){this.$m_WampClient.disconnect();}},disconnect:function(args){this.$m_WampClient.disconnect();},search:function(ele,ev){$(document).trigger($control_UIEventNames.searchStart);var data=this.$m_WampClient.sendCall('{}','com.sonycsl.kadecot.provider.procedure.getDeviceList',null,null,ss.mkdel(this,this.$onDevListed));if(ss.isNullOrUndefined(data)){$(document).trigger($control_UIEventNames.searchError);return;}
 this.$timerId=window.setInterval(function(){$(document).trigger($control_UIEventNames.searchError);},20000);},searchStart:function(ev){$.mobile.loading('show',new $LoadingOption.$ctor1('æ©å¨æ¤ç´¢ä¸­...',true));$control_UI.disable(this.get_searchBtn(),true);},searchEnd:function(ev){if(this.$timerId!==0){window.clearInterval(this.$timerId);this.$timerId=0;}
@@ -274,8 +274,11 @@
 this.$propertyCreate(this.get_$m_CurrentNode());this.getProperty(ev);return;},$buttonDisabled:function(di){if(ss.isNullOrUndefined(di)){$control_UI.disable(this.get_setGetPropertyBtn(),true);$control_UI.disable(this.get_getPropertyBtn(),true);$control_UI.disable(this.get_setPropertyBtn(),true);return;}
 var ctrls=this.get_propertyList();$control_UI.disable(this.get_setGetPropertyBtn(),ss.isNullOrUndefined(ctrls));$control_UI.disable(this.get_getPropertyBtn(),ss.isNullOrUndefined(ctrls));$control_UI.disable(this.get_setPropertyBtn(),ss.isNullOrUndefined(ctrls));},$propertyCreate:function(di){if(ss.isNullOrUndefined(di)){return;}
-$(document).trigger($control_UIEventNames.propertyWriteStart);di.setUIDevice(this);this.get_propertyList().html('');this.get_propertyList().append(di.getPropertys());this.get_propertyList().listview().listview('refresh');this.get_propertyList().listview().trigger('create');$(document).trigger($control_UIEventNames.propertyWriteEnd);},$setInitParams:function(elem,e){var macaddrfrm=new RegExp('([0-9A-Fa-f]{2}):([0-9A-Fa-f]{2}):([0-9A-Fa-f]{2}):([0-9A-Fa-f]{2}):([0-9A-Fa-f]{2}):([0-9A-Fa-f]{2})');var m=macaddrfrm.exec(this.get_macAddrTxt().val());if(ss.isNullOrUndefined(m)){return;}
-var ma1=parseInt(m[1],16);var ma2=parseInt(m[2],16);var ma3=parseInt(m[3],16);var ma4=parseInt(m[4],16);var ma5=parseInt(m[5],16);var ma6=parseInt(m[6],16);this.$m_WampClient.sendCall('{}','jp.toppers.ecnl.procedure.setInitParams','[]','{"macAddr":['+ma1+','+ma2+','+ma3+','+ma4+','+ma5+','+ma6+']}',ss.mkdel(this,this.setInitParamsRes));},setInitParamsRes:function(args){var cmd=ss.unbox(ss.cast(ss.cast(args,Array)[0],ss.Int32));if(cmd!==50){$('#popup_dialog_caption').text('ã¨ã©ã¼');$('#popup_dialog_title').text('ã¨ã©ã¼ãçºçãã¾ãã');$('#popup_dialog_text').text('åæãã¼ã¿ã®æ¸ãè¾¼ã¿ã«å¤±æãã¾ããã');$('#popup_dialog').popup('open',{transition:'slidedown'});return;}
+$(document).trigger($control_UIEventNames.propertyWriteStart);di.setUIDevice(this);this.get_propertyList().html('');this.get_propertyList().append(di.getPropertys());this.get_propertyList().listview().listview('refresh');this.get_propertyList().listview().trigger('create');$(document).trigger($control_UIEventNames.propertyWriteEnd);},$setInitParams:function(elem,e){var macaddrfrm=new RegExp('([0-9A-Fa-f]{2}):([0-9A-Fa-f]{2}):([0-9A-Fa-f]{2}):([0-9A-Fa-f]{2}):([0-9A-Fa-f]{2}):([0-9A-Fa-f]{2})');var ipaddrfrm=new RegExp('([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3})');var m=macaddrfrm.exec(this.get_macAddrTxt().val());if(ss.isNullOrUndefined(m)){return;}
+var macAddr='"macAddr":['+parseInt(m[1],16)+','+parseInt(m[2],16)+','+parseInt(m[3],16)+','+parseInt(m[4],16)+','+parseInt(m[5],16)+','+parseInt(m[6],16)+']';var dhcpEnable='"dhcpEnable":'+this.get_dhcpEnableCb().prop('checked').toString();m=ipaddrfrm.exec(this.get_ipAddrTxt().val());if(ss.isNullOrUndefined(m)){return;}
+var ipAddr='"ipAddr":['+parseInt(m[1])+','+parseInt(m[2])+','+parseInt(m[3])+','+parseInt(m[4])+']';m=ipaddrfrm.exec(this.get_netmaskTxt().val());if(ss.isNullOrUndefined(m)){return;}
+var netmask='"netmask":['+parseInt(m[1])+','+parseInt(m[2])+','+parseInt(m[3])+','+parseInt(m[4])+']';m=ipaddrfrm.exec(this.get_gatewayTxt().val());if(ss.isNullOrUndefined(m)){return;}
+var gateway='"gateway":['+parseInt(m[1])+','+parseInt(m[2])+','+parseInt(m[3])+','+parseInt(m[4])+']';this.$m_WampClient.sendCall('{}','jp.toppers.ecnl.procedure.setInitParams','[]','{'+macAddr+','+dhcpEnable+','+ipAddr+','+netmask+','+gateway+'}',ss.mkdel(this,this.setInitParamsRes));},setInitParamsRes:function(args){var cmd=ss.unbox(ss.cast(ss.cast(args,Array)[0],ss.Int32));if(cmd!==50){$('#popup_dialog_caption').text('ã¨ã©ã¼');$('#popup_dialog_title').text('ã¨ã©ã¼ãçºçãã¾ãã');$('#popup_dialog_text').text('åæãã¼ã¿ã®æ¸ãè¾¼ã¿ã«å¤±æãã¾ããã');$('#popup_dialog').popup('open',{transition:'slidedown'});return;}
 $('#popup_dialog_caption').text('åæãã¼ã¿');$('#popup_dialog_title').text('åæãã¼ã¿ãæ¸ãè¾¼ã¿ã¾ãã');$('#popup_dialog_text').text('åæãã¼ã¿ã®æ¸ãè¾¼ã¿ã«æåãã¾ããã');$('#popup_dialog').popup('open',{transition:'slidedown'});},$getInitParams:function(elem,e){this.$m_WampClient.sendCall('{}','jp.toppers.ecnl.procedure.getInitParams','[]','{}',ss.mkdel(this,this.getInitParamsRes));},getInitParamsRes:function(args){var cmd=ss.unbox(ss.cast(ss.cast(args,Array)[0],ss.Int32));if(cmd!==50){$('#popup_dialog_caption').text('ã¨ã©ã¼');$('#popup_dialog_title').text('ã¨ã©ã¼ãçºçãã¾ãã');$('#popup_dialog_text').text('åæãã¼ã¿ã®èª­ã¿è¾¼ã¿ã«å¤±æãã¾ããã');$('#popup_dialog').popup('open',{transition:'slidedown'});return;}
-var macaddr=ss.cast(ss.cast(args,Array)[4].macAddr,Array);this.get_macAddrTxt().val(ss.formatString('{0:X02}:{1:X02}:{2:X02}:{3:X02}:{4:X02}:{5:X02}',macaddr[0],macaddr[1],macaddr[2],macaddr[3],macaddr[4],macaddr[5]));},get_setPropertyBtn:function(){return $('#bt_set_property',$CtrlUI.$page);},get_getPropertyBtn:function(){return $('#bt_get_property',$CtrlUI.$page);},get_setGetPropertyBtn:function(){return $('#bt_set_get_property',$CtrlUI.$page);},get_kadecotBtn:function(){return $('#bt_kadecot',$CtrlUI.$page);},get_connectionSwt:function(){return $('#fs_connection',$CtrlUI.$page);},get_propertyList:function(){return $('#lv_property_list',$CtrlUI.$page);},get_searchBtn:function(){return $('#bt_search',$CtrlUI.$page);},get_nodeList:function(){return $('#node_list',$CtrlUI.$page);},get_propertyGroupBox:function(){return $('#lv_property_list',$CtrlUI.$page).find('li');},get_setInitParamsBtn:function(){return $('#bt_set_init_params',$CtrlUI.$page);},get_getInitParamsBtn:function(){return $('#bt_get_init_params',$CtrlUI.$page);},get_macAddrTxt:function(){return $('#txt_mac_addr',$CtrlUI.$page);},pinMode_Change:function(fieldset,pin){var value=fieldset.checkdValue();var dic=ss.mkdict(['pin',pin,'mode',value]);this.$m_WampClient.sendCall('{"deviceId":'+1+'}','com.sonycsl.kadecot.arduino.pinMode','[]',JSON.stringify(dic),ss.mkdel(this,this.pinMode));},digital_Change:function(button,flipswitch,pin){var msg=new $ctrlui_WampApiKadecotSet(1,'2',new Array(2));var dic=ss.mkdict(['pin',pin,'value',flipswitch.get_value()]);this.$m_WampClient.sendCall('{"deviceId":'+1+'}','com.sonycsl.kadecot.arduino.digitalWrite','[]',JSON.stringify(dic),ss.mkdel(this,this.digitalWrite));},analogWrite_Change:function(range,pin){var msg=new $ctrlui_WampApiKadecotSet(1,'2',new Array(2));var dic=ss.mkdict(['pin',pin,'value',range.get_value$1()]);this.$m_WampClient.sendCall('{"deviceId":'+1+'}','com.sonycsl.kadecot.arduino.analogWrite','[]',JSON.stringify(dic),ss.mkdel(this,this.pinMode));},analogRead:function(range,pin){var dic=ss.mkdict(['pin',pin]);this.$m_WampClient.sendCall('{"deviceId":'+1+'}','com.sonycsl.kadecot.arduino.analogRead','[]',JSON.stringify(dic),ss.mkdel(this,function(args){this.digitalRead$1(args,range);}));},pinMode:function(args){var switchData=ss.unbox(ss.cast(ss.cast(args,Array)[0],ss.Int32));if(switchData!==50){return;}
+var param=ss.cast(args,Array)[4];var macaddr=ss.cast(param.macAddr,Array);this.get_macAddrTxt().val(ss.formatString('{0:X02}:{1:X02}:{2:X02}:{3:X02}:{4:X02}:{5:X02}',macaddr[0],macaddr[1],macaddr[2],macaddr[3],macaddr[4],macaddr[5]));var dhcpEnable=!!param.dhcpEnable;this.get_dhcpEnableCb().prop('checked',dhcpEnable).checkboxradio('refresh');var ipaddr=ss.cast(param.ipAddr,Array);this.get_ipAddrTxt().val(ss.formatString('{0}:{1}:{2}:{3}',ipaddr[0],ipaddr[1],ipaddr[2],ipaddr[3]));var netmask=ss.cast(param.netmask,Array);this.get_netmaskTxt().val(ss.formatString('{0}:{1}:{2}:{3}',netmask[0],netmask[1],netmask[2],netmask[3]));var gateway=ss.cast(param.gateway,Array);this.get_gatewayTxt().val(ss.formatString('{0}:{1}:{2}:{3}',gateway[0],gateway[1],gateway[2],gateway[3]));},get_setPropertyBtn:function(){return $('#bt_set_property',$CtrlUI.$page);},get_getPropertyBtn:function(){return $('#bt_get_property',$CtrlUI.$page);},get_setGetPropertyBtn:function(){return $('#bt_set_get_property',$CtrlUI.$page);},get_kadecotBtn:function(){return $('#bt_kadecot',$CtrlUI.$page);},get_connectionSwt:function(){return $('#fs_connection',$CtrlUI.$page);},get_propertyList:function(){return $('#lv_property_list',$CtrlUI.$page);},get_searchBtn:function(){return $('#bt_search',$CtrlUI.$page);},get_nodeList:function(){return $('#node_list',$CtrlUI.$page);},get_propertyGroupBox:function(){return $('#lv_property_list',$CtrlUI.$page).find('li');},get_setInitParamsBtn:function(){return $('#bt_set_init_params',$CtrlUI.$page);},get_getInitParamsBtn:function(){return $('#bt_get_init_params',$CtrlUI.$page);},get_macAddrTxt:function(){return $('#txt_mac_addr',$CtrlUI.$page);},get_dhcpEnableCb:function(){return $('#cb_dhcp_enable',$CtrlUI.$page);},get_ipAddrTxt:function(){return $('#txt_ip_addr',$CtrlUI.$page);},get_netmaskTxt:function(){return $('#txt_netmask',$CtrlUI.$page);},get_gatewayTxt:function(){return $('#txt_gateway',$CtrlUI.$page);},pinMode_Change:function(fieldset,pin){var value=fieldset.checkdValue();var dic=ss.mkdict(['pin',pin,'mode',value]);this.$m_WampClient.sendCall('{"deviceId":'+1+'}','com.sonycsl.kadecot.arduino.pinMode','[]',JSON.stringify(dic),ss.mkdel(this,this.pinMode));},digital_Change:function(button,flipswitch,pin){var msg=new $ctrlui_WampApiKadecotSet(1,'2',new Array(2));var dic=ss.mkdict(['pin',pin,'value',flipswitch.get_value()]);this.$m_WampClient.sendCall('{"deviceId":'+1+'}','com.sonycsl.kadecot.arduino.digitalWrite','[]',JSON.stringify(dic),ss.mkdel(this,this.digitalWrite));},analogWrite_Change:function(range,pin){var msg=new $ctrlui_WampApiKadecotSet(1,'2',new Array(2));var dic=ss.mkdict(['pin',pin,'value',range.get_value$1()]);this.$m_WampClient.sendCall('{"deviceId":'+1+'}','com.sonycsl.kadecot.arduino.analogWrite','[]',JSON.stringify(dic),ss.mkdel(this,this.pinMode));},analogRead:function(range,pin){var dic=ss.mkdict(['pin',pin]);this.$m_WampClient.sendCall('{"deviceId":'+1+'}','com.sonycsl.kadecot.arduino.analogRead','[]',JSON.stringify(dic),ss.mkdel(this,function(args){this.digitalRead$1(args,range);}));},pinMode:function(args){var switchData=ss.unbox(ss.cast(ss.cast(args,Array)[0],ss.Int32));if(switchData!==50){return;}
 var doc=ss.cast(args,Array)[4];if(ss.isValue(this.$m_DeviceController)){if(ss.isNullOrUndefined(this.get_propertyList())){return;}}},digitalWrite:function(args){var switchData=ss.unbox(ss.cast(ss.cast(args,Array)[0],ss.Int32));if(switchData!==50){return;}
 var doc=ss.cast(args,Array)[4];if(ss.isValue(this.$m_DeviceController)){if(ss.isNullOrUndefined(this.get_propertyList())){return;}}},digitalRead:function(button,flip,i){var dic=ss.mkdict(['pin',i]);var str=this.$m_WampClient.sendCall('{"deviceId":'+1+'}','com.sonycsl.kadecot.arduino.digitalRead','[]',JSON.stringify(dic),ss.mkdel(this,function(arg){this.digitalRead$1(arg,flip);}));if(ss.isNullOrUndefined(str)){button.toggleClass$1('ui-icon-refresh','ui-icon-alert');}
