if (GetDeviceData!='') {
	VideoGetAllJson(GetDeviceData);
}

function VideoGetAllJson(jsonArr){
	var _jsonArr = eval('('+jsonArr+')');
	// error function
	if (_jsonArr.result.error.length>0) {	     
	    for (var i = 0; i < _jsonArr.result.error.length; i++) {
	       (function(ii){
	        	var _id = _jsonArr.result.error[i].device_id;
	        	var _arr1 = _data.videoswitching_decode_arr.split(',');
	        	var _arr2 = _data.videoswitching_encode_arr.split(',');
	        	var _number;
	        	var _type;
	        				
	        	for (var j = 0; j < _arr1.length-1; j++) {
	        		(function(jj){	        						
	        			if (_arr1[j]==_id) {
		        			_data.videoswitching_decode_arr = _data.videoswitching_decode_arr.replace(_id,'');                   	                    
		        			DecodeDetaileDataArr[j]='';
		        			DecodeVideoDataArr[j]='';
		        			$('.IPAV1100RxCont li:eq('+(j+1)+')').html('');
							$('.IPAV1100RxCont li:eq('+(j+1)+')').removeClass('deviceBoxHasDevice');
		        		}
	        		})(j);
	        	}
	        	for (var k = 0; k < _arr2.length-1; k++) {
	        		(function(kk){
	        			if (_arr2[kk]==_id) {
	        				_data.videoswitching_encode_arr = _data.videoswitching_encode_arr.replace(_id,'');
	        				EncodeDetaileDataArr[kk]='';
		        			EncodeVideoDataArr[kk]='';
		        			$('.IPAV1100TxCont li:eq('+kk+')').html('');
							$('.IPAV1100TxCont li:eq('+kk+')').removeClass('deviceBoxHasDevice');
		        		}
	        		})(k);
	        	}	        				
	        })(i);
	    }
	}
	// 	
	if(_jsonArr.result.devices.length>0){
	    for (var i = 0; i < _jsonArr.result.devices.length; i++) {
	    		if (parseInt(_jsonArr.result.devices[i].identity.vendor_id)!=115) {
	    			console.log(_jsonArr.result.devices[i].device_id+':'+_jsonArr.result.devices[i].identity.firmware_comment);
	    			break;
	    		}
	    		if (VideoDeviceArr[i]!=_jsonArr.result.devices[i]) {
	    			VideoDeviceArr[i]=_jsonArr.result.devices[i];
	    			VideoGetData(_jsonArr.result.devices[i]);			    
			        GetDeviceDetaileData(_jsonArr.result.devices[i]);	
	    		}		
		}
		
	}
}
function VideoGetData(_json) {
	var hostname = checkReceiveJsonDataToString(_json.nodes,'nodes','type','NETWORK_INTERFACE','configuration.hostname');
	var ipaddress = checkReceiveJsonDataToString(_json.nodes,'nodes','type','NETWORK_INTERFACE','configuration.ip.address');
	if (_json.identity.is_receiver) {
		var address = checkReceiveJsonDataToString(_json.subscriptions,'subscriptions','type','HDMI','configuration.address');
		//var display_mode = checkReceiveJsonDataToString(_json,'nodes','type','FRAME_BUFFER','configuration.display_mode');
		var display_mode = checkReceiveJsonDataToString(_json.nodes,'nodes','type','HDMI_ENCODER','inputs[0].configuration.source.value');
		
		if (display_mode==0) {
			display_mode = 0;			
		}
		else if(display_mode==1){
			display_mode = checkReceiveJsonDataToString(_json.nodes,'nodes','type','FRAME_BUFFER','configuration.display_mode');
		}
		var state = checkReceiveJsonDataToString(_json.subscriptions,'subscriptions','type','HDMI','status.state');
		//_json,'nodes','type','FRAME_BUFFER','configuration.width'
		var width = checkReceiveJsonDataToString(_json.nodes,'nodes','type','HDMI_ENCODER','status.video.width');
		// _json,'nodes','type','FRAME_BUFFER','configuration.height'
		var height = checkReceiveJsonDataToString(_json.nodes,'nodes','type','HDMI_ENCODER','status.video.height');
		// _json,'nodes','type','FRAME_BUFFER','configuration.frames_per_second'
		var frames_per_second = checkReceiveJsonDataToString(_json.nodes,'nodes','type','HDMI_ENCODER','status.video.frames_per_second');
		// _json,'nodes','type','FRAME_BUFFER','status.source_video.color_space'
		var color_space = checkReceiveJsonDataToString(_json.nodes,'nodes','type','HDMI_ENCODER','status.video.color_space');
		// _json,'nodes','type','FRAME_BUFFER','status.source_video.bits_per_pixel'
		var bits_per_pixel = checkReceiveJsonDataToString(_json.nodes,'nodes','type','HDMI_ENCODER','status.video.bits_per_pixel');
		var hdcp_version = checkReceiveJsonDataToString(_json.nodes,'nodes','type','HDMI_ENCODER','status.hdcp_version');
		var display_connect = checkReceiveJsonDataToString(_json.nodes,'nodes','type','HDMI_MONITOR','status.connected');
		checkDecodeDisplay(_json.device_id,_json.identity.is_receiver,hostname,ipaddress,_json.identity.firmware_version,
						display_mode,address,state,width,height,frames_per_second,color_space,bits_per_pixel,hdcp_version,display_connect);
		
	}else if (_json.identity.is_transmitter) {
		var address = checkReceiveJsonDataToString(_json.streams,'streams','type','HDMI','configuration.address');
		var state = checkReceiveJsonDataToString(_json.streams,'streams','type','HDMI','status.state');
		var width = checkReceiveJsonDataToString(_json.nodes,'nodes','type','HDMI_DECODER','status.video.width');
		var height = checkReceiveJsonDataToString(_json.nodes,'nodes','type','HDMI_DECODER','status.video.height');
		var frames_per_second = checkReceiveJsonDataToString(_json.nodes,'nodes','type','HDMI_DECODER','status.video.frames_per_second');
		var color_space = checkReceiveJsonDataToString(_json.nodes,'nodes','type','HDMI_DECODER','status.video.color_space');
		var bits_per_pixel = checkReceiveJsonDataToString(_json.nodes,'nodes','type','HDMI_DECODER','status.video.bits_per_pixel');
		var hdcp_version = checkReceiveJsonDataToString(_json.nodes,'nodes','type','HDMI_DECODER','status.hdcp_version');
		checkDecodeDisplay(_json.device_id,_json.identity.is_receiver,hostname,ipaddress,_json.identity.firmware_version,
						'display_mode',address,state,width,height,frames_per_second,color_space,bits_per_pixel,hdcp_version);
		
	}

	//console.log(GetTxDeviceNum);

}
function GetDeviceDetaileData(_json){
	var _arrR,_arrT;
	if (_json.identity.is_receiver)
		var _arr = _data.videoswitching_decode_arr.split(',');
	else
		var _arr = _data.videoswitching_encode_arr.split(',');
	var _num,_numR,_numT;
	for (var i = 0; i <_arr.length; i++) {
		(function(ii){
			if (_arr[ii]==_json.device_id) {
				_num=ii;//匹配设备ID,存储到相应序号设备数据			
			}
		})(i);
	}
	if (current_page==5||current_page==6) {
		_arrR = _data.Rs232_De_En_arr.split(',');
		_arrT = _data.Rs232_En_De_arr.split(',');
		for (var i = 0; i <_arrR.length-1; i++) {
			(function(ii){
				if (_arrR[ii]==_json.device_id) {
					_numR=ii;//匹配设备ID,存储到相应序号设备数据			
				}
			})(i);
		}
		for (var i = 0; i <_arrT.length-1; i++) {
			(function(ii){
				if (_arrT[ii]==_json.device_id) {
					_numT=ii;//匹配设备ID,存储到相应序号设备数据			
				}
			})(i);
		}
	}
	
	if (_json.identity.is_receiver) {
		var AnalogAudioOutput = checkReceiveJsonDataToString(_json.nodes,'nodes','type','ANALOG_AUDIO_OUTPUT','inputs[0].configuration.source.value');
		
		var HDMIAudioOutput = checkReceiveJsonDataToString(_json.nodes,'nodes','type','HDMI_ENCODER','inputs[1].configuration.source.value');
		var deviceEDID = checkReceiveJsonDataToString(_json.nodes,'nodes','type','HDMI_MONITOR','status.edid');
		var hostname = checkReceiveJsonDataToString(_json.nodes,'nodes','type','NETWORK_INTERFACE','configuration.hostname');
		var mode = checkReceiveJsonDataToString(_json.nodes,'nodes','type','NETWORK_INTERFACE','configuration.ip.mode');
		var address = checkReceiveJsonDataToString(_json.nodes,'nodes','type','NETWORK_INTERFACE','configuration.ip.address');
		var mask = checkReceiveJsonDataToString(_json.nodes,'nodes','type','NETWORK_INTERFACE','configuration.ip.mask');
		var gateway = checkReceiveJsonDataToString(_json.nodes,'nodes','type','NETWORK_INTERFACE','configuration.ip.gateway');

		var baud_rate = checkReceiveJsonDataToString(_json.nodes,'nodes','type','UART','configuration.baud_rate');
		var data_bits = checkReceiveJsonDataToString(_json.nodes,'nodes','type','UART','configuration.data_bits');
		var stop_bits = checkReceiveJsonDataToString(_json.nodes,'nodes','type','UART','configuration.stop_bits');
		var parity = checkReceiveJsonDataToString(_json.nodes,'nodes','type','UART','configuration.parity');	
		
		if (current_page==5||current_page==6) {
			if (typeof(Rs232IrReceiverDataDetaileDataArr[_numR])=='undefined'||Rs232IrReceiverDataDetaileDataArr[_numR]=='') {				
				Rs232IrReceiverDataDetaileDataArr[_numR]=[];
			}
			if (Rs232IrReceiverDataDetaileDataArr[_numR][0] != AnalogAudioOutput||
				Rs232IrReceiverDataDetaileDataArr[_numR][1] != HDMIAudioOutput||
				Rs232IrReceiverDataDetaileDataArr[_numR][2] != deviceEDID||
				Rs232IrReceiverDataDetaileDataArr[_numR][3] != hostname||
				Rs232IrReceiverDataDetaileDataArr[_numR][4] != mode||
				Rs232IrReceiverDataDetaileDataArr[_numR][5] != address||
				Rs232IrReceiverDataDetaileDataArr[_numR][6] != mask||
				Rs232IrReceiverDataDetaileDataArr[_numR][7] != gateway||
				Rs232IrReceiverDataDetaileDataArr[_numR][8] != baud_rate||
				Rs232IrReceiverDataDetaileDataArr[_numR][9] != data_bits||
				Rs232IrReceiverDataDetaileDataArr[_numR][10] != stop_bits||
				Rs232IrReceiverDataDetaileDataArr[_numR][11] != parity) 
			{			
				Rs232IrReceiverDataDetaileDataArr[_numR][0]=AnalogAudioOutput;
				Rs232IrReceiverDataDetaileDataArr[_numR][1]=HDMIAudioOutput;
				Rs232IrReceiverDataDetaileDataArr[_numR][2]=deviceEDID;
				Rs232IrReceiverDataDetaileDataArr[_numR][3]=hostname;
				Rs232IrReceiverDataDetaileDataArr[_numR][4]=mode;
				Rs232IrReceiverDataDetaileDataArr[_numR][5]=address;
				Rs232IrReceiverDataDetaileDataArr[_numR][6]=mask;
				Rs232IrReceiverDataDetaileDataArr[_numR][7]=gateway;
				Rs232IrReceiverDataDetaileDataArr[_numR][8]=baud_rate;
				Rs232IrReceiverDataDetaileDataArr[_numR][9]=data_bits;
				Rs232IrReceiverDataDetaileDataArr[_numR][10]=stop_bits;
				Rs232IrReceiverDataDetaileDataArr[_numR][11]=parity;
			}
			if (typeof(Rs232IrSenderDataDetaileDataArr[_numT])=='undefined'||Rs232IrSenderDataDetaileDataArr[_numT]=='') {				
				Rs232IrSenderDataDetaileDataArr[_numT]=[];
			}
			if (Rs232IrSenderDataDetaileDataArr[_numT][0] != AnalogAudioOutput||
				Rs232IrSenderDataDetaileDataArr[_numT][1] != HDMIAudioOutput||
				Rs232IrSenderDataDetaileDataArr[_numT][2] != deviceEDID||
				Rs232IrSenderDataDetaileDataArr[_numT][3] != hostname||
				Rs232IrSenderDataDetaileDataArr[_numT][4] != mode||
				Rs232IrSenderDataDetaileDataArr[_numT][5] != address||
				Rs232IrSenderDataDetaileDataArr[_numT][6] != mask||
				Rs232IrSenderDataDetaileDataArr[_numT][7] != gateway||
				Rs232IrSenderDataDetaileDataArr[_numT][8] != baud_rate||
				Rs232IrSenderDataDetaileDataArr[_numT][9] != data_bits||
				Rs232IrSenderDataDetaileDataArr[_numT][10] != stop_bits||
				Rs232IrSenderDataDetaileDataArr[_numT][11] != parity) 
			{			
			
				Rs232IrSenderDataDetaileDataArr[_numT][0]=AnalogAudioOutput;
				Rs232IrSenderDataDetaileDataArr[_numT][1]=HDMIAudioOutput;
				Rs232IrSenderDataDetaileDataArr[_numT][2]=deviceEDID;
				Rs232IrSenderDataDetaileDataArr[_numT][3]=hostname;
				Rs232IrSenderDataDetaileDataArr[_numT][4]=mode;
				Rs232IrSenderDataDetaileDataArr[_numT][5]=address;
				Rs232IrSenderDataDetaileDataArr[_numT][6]=mask;
				Rs232IrSenderDataDetaileDataArr[_numT][7]=gateway;
				Rs232IrSenderDataDetaileDataArr[_numT][8]=baud_rate;
				Rs232IrSenderDataDetaileDataArr[_numT][9]=data_bits;
				Rs232IrSenderDataDetaileDataArr[_numT][10]=stop_bits;
				Rs232IrSenderDataDetaileDataArr[_numT][11]=parity;
			}
		}
		else{
			if (typeof(DecodeDetaileDataArr[_num])=='undefined'||DecodeDetaileDataArr[_num]=='') {
					DecodeDetaileDataArr[_num]=[];				
			}
			if (DecodeDetaileDataArr[_num][0] != AnalogAudioOutput||
				DecodeDetaileDataArr[_num][1] != HDMIAudioOutput||
				DecodeDetaileDataArr[_num][2] != deviceEDID||
				DecodeDetaileDataArr[_num][3] != hostname||
				DecodeDetaileDataArr[_num][4] != mode||
				DecodeDetaileDataArr[_num][5] != address||
				DecodeDetaileDataArr[_num][6] != mask||
				DecodeDetaileDataArr[_num][7] != gateway||
				DecodeDetaileDataArr[_num][8] != baud_rate||
				DecodeDetaileDataArr[_num][9] != data_bits||
				DecodeDetaileDataArr[_num][10] != stop_bits||
				DecodeDetaileDataArr[_num][11] != parity) 
			{
					DecodeDetaileDataArr[_num][0]=AnalogAudioOutput;
					DecodeDetaileDataArr[_num][1]=HDMIAudioOutput;
					DecodeDetaileDataArr[_num][2]=deviceEDID;
					DecodeDetaileDataArr[_num][3]=hostname;
					DecodeDetaileDataArr[_num][4]=mode;
					DecodeDetaileDataArr[_num][5]=address;
					DecodeDetaileDataArr[_num][6]=mask;
					DecodeDetaileDataArr[_num][7]=gateway;
					DecodeDetaileDataArr[_num][8]=baud_rate;
					DecodeDetaileDataArr[_num][9]=data_bits;
					DecodeDetaileDataArr[_num][10]=stop_bits;
					DecodeDetaileDataArr[_num][11]=parity;
			}
		}
	}
	else if(_json.identity.is_transmitter){
		var hdcp_support = checkReceiveJsonDataToString(_json.nodes,'nodes','type','HDMI_DECODER','configuration.hdcp_support_enable');
		var hdcp22_support = checkReceiveJsonDataToString(_json.nodes,'nodes','type','HDMI_DECODER','configuration.hdcp_22_support_disable');
		var deviceEDID = checkReceiveJsonDataToString(_json.nodes,'nodes','type','HDMI_DECODER','configuration.edid');
		var hostname = checkReceiveJsonDataToString(_json.nodes,'nodes','type','NETWORK_INTERFACE','configuration.hostname');
		var mode = checkReceiveJsonDataToString(_json.nodes,'nodes','type','NETWORK_INTERFACE','configuration.ip.mode');
		var address = checkReceiveJsonDataToString(_json.nodes,'nodes','type','NETWORK_INTERFACE','configuration.ip.address');
		var mask = checkReceiveJsonDataToString(_json.nodes,'nodes','type','NETWORK_INTERFACE','configuration.ip.mask');
		var gateway = checkReceiveJsonDataToString(_json.nodes,'nodes','type','NETWORK_INTERFACE','configuration.ip.gateway');

		var baud_rate = checkReceiveJsonDataToString(_json.nodes,'nodes','type','UART','configuration.baud_rate');
		var data_bits = checkReceiveJsonDataToString(_json.nodes,'nodes','type','UART','configuration.data_bits');
		var stop_bits = checkReceiveJsonDataToString(_json.nodes,'nodes','type','UART','configuration.stop_bits');
		var parity = checkReceiveJsonDataToString(_json.nodes,'nodes','type','UART','configuration.parity');
		
		if (current_page==5||current_page==6) {
			if (typeof(Rs232IrReceiverDataDetaileDataArr[_numR])=='undefined'||Rs232IrReceiverDataDetaileDataArr[_numR]=='') {				
				Rs232IrReceiverDataDetaileDataArr[_numR]=[];
			}
			if (Rs232IrReceiverDataDetaileDataArr[_numR][0] != hdcp_support||
				Rs232IrReceiverDataDetaileDataArr[_numR][1] != hdcp22_support||
				Rs232IrReceiverDataDetaileDataArr[_numR][2] != deviceEDID||
				Rs232IrReceiverDataDetaileDataArr[_numR][3] != hostname||
				Rs232IrReceiverDataDetaileDataArr[_numR][4] != mode||
				Rs232IrReceiverDataDetaileDataArr[_numR][5] != address||
				Rs232IrReceiverDataDetaileDataArr[_numR][6] != mask||
				Rs232IrReceiverDataDetaileDataArr[_numR][7] != gateway||
				Rs232IrReceiverDataDetaileDataArr[_numR][8] != baud_rate||
				Rs232IrReceiverDataDetaileDataArr[_numR][9] != data_bits||
				Rs232IrReceiverDataDetaileDataArr[_numR][10] != stop_bits||
				Rs232IrReceiverDataDetaileDataArr[_numR][11] != parity) 
			{
				Rs232IrReceiverDataDetaileDataArr[_numR][0]=hdcp_support;
				Rs232IrReceiverDataDetaileDataArr[_numR][1]=hdcp22_support;
				Rs232IrReceiverDataDetaileDataArr[_numR][2]=deviceEDID;
				Rs232IrReceiverDataDetaileDataArr[_numR][3]=hostname;
				Rs232IrReceiverDataDetaileDataArr[_numR][4]=mode;
				Rs232IrReceiverDataDetaileDataArr[_numR][5]=address;
				Rs232IrReceiverDataDetaileDataArr[_numR][6]=mask;
				Rs232IrReceiverDataDetaileDataArr[_numR][7]=gateway;
				Rs232IrReceiverDataDetaileDataArr[_numR][8]=baud_rate;
				Rs232IrReceiverDataDetaileDataArr[_numR][9]=data_bits;
				Rs232IrReceiverDataDetaileDataArr[_numR][10]=stop_bits;
				Rs232IrReceiverDataDetaileDataArr[_numR][11]=parity;
			}
			if (typeof(Rs232IrSenderDataDetaileDataArr[_numT])=='undefined'||Rs232IrSenderDataDetaileDataArr[_numT]=='') {				
				Rs232IrSenderDataDetaileDataArr[_numT]=[];
			}
			if (Rs232IrSenderDataDetaileDataArr[_numT][0] != hdcp_support||
				Rs232IrSenderDataDetaileDataArr[_numT][1] != hdcp22_support||
				Rs232IrSenderDataDetaileDataArr[_numT][2] != deviceEDID||
				Rs232IrSenderDataDetaileDataArr[_numT][3] != hostname||
				Rs232IrSenderDataDetaileDataArr[_numT][4] != mode||
				Rs232IrSenderDataDetaileDataArr[_numT][5] != address||
				Rs232IrSenderDataDetaileDataArr[_numT][6] != mask||
				Rs232IrSenderDataDetaileDataArr[_numT][7] != gateway||
				Rs232IrSenderDataDetaileDataArr[_numT][8] != baud_rate||
				Rs232IrSenderDataDetaileDataArr[_numT][9] != data_bits||
				Rs232IrSenderDataDetaileDataArr[_numT][10] != stop_bits||
				Rs232IrSenderDataDetaileDataArr[_numT][11] != parity) 
			{			
				Rs232IrSenderDataDetaileDataArr[_numT][0]=hdcp_support;
				Rs232IrSenderDataDetaileDataArr[_numT][1]=hdcp22_support;
				Rs232IrSenderDataDetaileDataArr[_numT][2]=deviceEDID;
				Rs232IrSenderDataDetaileDataArr[_numT][3]=hostname;
				Rs232IrSenderDataDetaileDataArr[_numT][4]=mode;
				Rs232IrSenderDataDetaileDataArr[_numT][5]=address;
				Rs232IrSenderDataDetaileDataArr[_numT][6]=mask;
				Rs232IrSenderDataDetaileDataArr[_numT][7]=gateway;
				Rs232IrSenderDataDetaileDataArr[_numT][8]=baud_rate;
				Rs232IrSenderDataDetaileDataArr[_numT][9]=data_bits;
				Rs232IrSenderDataDetaileDataArr[_numT][10]=stop_bits;
				Rs232IrSenderDataDetaileDataArr[_numT][11]=parity;
			}
		}
		else {
			if (typeof(EncodeDetaileDataArr[_num])=='undefined'||EncodeDetaileDataArr[_num]=='') {
				EncodeDetaileDataArr[_num]=[];
			}
			if (EncodeDetaileDataArr[_num][0] != hdcp_support||
				EncodeDetaileDataArr[_num][1] != hdcp22_support||
				EncodeDetaileDataArr[_num][2] != deviceEDID||
				EncodeDetaileDataArr[_num][3] != hostname||
				EncodeDetaileDataArr[_num][4] != mode||
				EncodeDetaileDataArr[_num][5] != address||
				EncodeDetaileDataArr[_num][6] != mask||
				EncodeDetaileDataArr[_num][7] != gateway||
				EncodeDetaileDataArr[_num][8] != baud_rate||
				EncodeDetaileDataArr[_num][9] != data_bits||
				EncodeDetaileDataArr[_num][10] != stop_bits||
				EncodeDetaileDataArr[_num][11] != parity) 
			{
				EncodeDetaileDataArr[_num][0]=hdcp_support;
				EncodeDetaileDataArr[_num][1]=hdcp22_support;
				EncodeDetaileDataArr[_num][2]=deviceEDID;
				EncodeDetaileDataArr[_num][3]=hostname;
				EncodeDetaileDataArr[_num][4]=mode;
				EncodeDetaileDataArr[_num][5]=address;
				EncodeDetaileDataArr[_num][6]=mask;
				EncodeDetaileDataArr[_num][7]=gateway;
				EncodeDetaileDataArr[_num][8]=baud_rate;
				EncodeDetaileDataArr[_num][9]=data_bits;
				EncodeDetaileDataArr[_num][10]=stop_bits;
				EncodeDetaileDataArr[_num][11]=parity;
			}
		}
	}
}
// 检测该数据流的类型 TX or RX,并且写入device模块
function checkDecodeDisplay(device_id,is_receiver,hostname,
	ip,firmware_version,display_mode,multicast_address,statu,
	width,height,frames_per_second,color_space,bits_per_pixel,hdcp_version,display_connect){
	if (is_receiver) {
		checkDataIsInArr(is_receiver,device_id);
		checkDecodeVideoDataIsChange(device_id,hostname,
					ip,firmware_version,display_mode,multicast_address,statu,
					width,height,frames_per_second,color_space,bits_per_pixel,hdcp_version,display_connect);		
	} 
	else{
		checkDataIsInArr(is_receiver,device_id);
		checkEncodeVideoDataIsChange(device_id,hostname,
					ip,firmware_version,multicast_address,statu,
					width,height,frames_per_second,color_space,bits_per_pixel,hdcp_version);		
	}

}
// 检测是否在数组当中
function checkDataIsInArr(is_receiver,id){	
	if (1) {//current_page==5||current_page==14
		if (_data.Rs232_De_En_arr.indexOf(id)<0) {
			var _arr = _data.Rs232_De_En_arr.split(',');
			if (_arr.length==1) {
				_data.Rs232_De_En_arr += id + ',';
			}
			else {
				for (var i = 0; i < _arr.length; i++) {
					if (_arr[i] == '') {
						if (_arr.indexOf(id)<0) {
							_arr[i] = id;
						}
					}
				}
				_data.Rs232_De_En_arr='';
				for (var i = 0; i < _arr.length; i++) {
					_data.Rs232_De_En_arr += _arr[i] + ',';
				}
			}
        }
        if (_data.Rs232_En_De_arr.indexOf(id)<0) {
        	var _arr = _data.Rs232_En_De_arr.split(',');
			if (_arr.length==1) {
				_data.Rs232_En_De_arr += id + ',';
			}
			else {
				for (var i = 0; i < _arr.length; i++) {
					if (_arr[i] == '') {
						if (_arr.indexOf(id)<0) {
							_arr[i] = id;
						}
					}
				}
				_data.Rs232_En_De_arr = '';
				for (var i = 0; i < _arr.length; i++) {
					_data.Rs232_En_De_arr += _arr[i] + ',';
				}
			}
        }
	}
	if(1){
		if (is_receiver) {
			if (_data.videoswitching_decode_arr.indexOf(id)>0) return;
			var _arr = _data.videoswitching_decode_arr.split(',');			
			if (_arr.length==1) {
				_data.videoswitching_decode_arr += id+',';
			}else{
				var _checkExist=0;
				for (var i = 0; i <_arr.length-1; i++) {					
					if (_arr[i]==id) {
						_checkExist = 1;
					}
				}
				if (_checkExist==0) {
					for (var i = 0; i <_arr.length; i++) {
						if (_arr[i]=='') {
							_arr[i] = id;
							break;
						}
					}
					_data.videoswitching_decode_arr = '';
					for (var i = 0; i <_arr.length; i++) {
						_data.videoswitching_decode_arr += _arr[i] + ',';
					}
				}
			}
		}else{
			if (_data.videoswitching_encode_arr.indexOf(id)>0) return;
			var _arr = _data.videoswitching_encode_arr.split(',');
			if (_arr.length==1) {
				_data.videoswitching_encode_arr += id+',';		
			}else{
				var _checkExist=0;
				for (var i = 0; i <_arr.length-1; i++) {
					(function(ii){
						if (_arr[ii]==id) {
							_checkExist = 1;
						}
					})(i);		
				}
				if (_checkExist==0) {
					for (var i = 0; i <_arr.length; i++) {
						if (_arr[i]=='') {
							_arr[i] = id;
							break;					
						}
					}
					_data.videoswitching_encode_arr = '';
					for (var i = 0; i <_arr.length; i++) {
						_data.videoswitching_encode_arr += _arr[i] + ',';
					}				
				}
			}
		}
	}
			
}
// 检测decode数据是否变动
function checkDecodeVideoDataIsChange(device_id,hostname,
	ip,firmware_version,display_mode,multicast_address,statu,
	width,height,frames_per_second,color_space,bits_per_pixel,hdcp_version,display_connect){

	var _arr = _data.videoswitching_decode_arr.split(',');
	var _num;

	for (var i = 0; i <_arr.length; i++) {
		(function(ii){
			if (_arr[ii]==device_id) {
				_num=ii;
			}
		})(i);
	}

	if (typeof(DecodeVideoDataArr[_num])=='undefined'||DecodeVideoDataArr[_num].length==0) {	
		if (typeof(DecodeVideoDataArr[_num])=='undefined') {
			DecodeVideoDataArr[_num]=[];
		}
		
				$('.IPAV1100RxCont li:eq('+_num+1+')').attr('id','DeviceDecodePositionID'+_num);
				$('.IPAV1100RxCont li:eq('+(_num+1)+')').attr('class','decodeencodeexist');
				// $('.IPAV1100RxCont li:eq('+(_num+1)+')').attr('ondragover','exp1(event)');
				// $('.IPAV1100RxCont li:eq('+(_num+1)+')').attr('ondrop','deviceToChangePosition(event)');
				// $('.IPAV1100RxCont li:eq('+(_num+1)+')').attr('draggable','true');
				// $('.IPAV1100RxCont li:eq('+(_num+1)+')').attr('ondragstart','DecodeExpstart(event)');				
				var addData = "<div class='DeviceBoxNavTop'>\
									<span>"+hostname+"</span>\
									<a class='DeviceBoxNavTopStatus'></a>\
									<a class='DeviceBoxNavTopSetting'></a>\
									<a class='DeviceBoxNavTopStop' style='background: none;'></a>\
									<a class='DeviceBoxNavTopLocked'></a>\
								</div>\
								<div class='DeviceBoxCont'>\
									<div class='DeviceBoxContOnceDisplay'>\
										<div class='DeviceBoxContOnceDisplayImg'># "+(_num+1)+"</div>\
										<div class='DeviceBoxContOnceDisplayInfo'>\
											<span>"+ width + "x" + height +"</span>\
											<span>"+ frames_per_second +"Hz</span>\
											<span>"+ color_space + "," + bits_per_pixel + "Bit</span>\
										</div>\
									</div>\
								</div>\
								<div class='DeviceBoxBottom'>\
									<div class='DeviceBoxBottomDataScroll'>\
										<div><span>"+ ip +"-"+ (display_mode==0?'Genlock':display_mode) +"</span></div>\
										<img src='images/deviceBoxBottomIco.png'>\
									</div>\
									<div class='DeviceBoxBottomDataDetail'>\
										<div>\
											<span class='DeviceBoxBottomDataDetailLeft'>Hostname:</span>\
											<span class='DeviceBoxBottomDataDetailRifht'>"+ hostname +"</span>\
										</div>\
										<div>\
											<span class='DeviceBoxBottomDataDetailLeft'>IP:</span>\
											<span class='DeviceBoxBottomDataDetailRifht'>"+ip+"</span>\
										</div>\
										<div>\
											<span class='DeviceBoxBottomDataDetailLeft'>MAC:</span>\
											<span class='DeviceBoxBottomDataDetailRifht'>"+device_id+"</span>\
										</div>\
										<div>\
											<span class='DeviceBoxBottomDataDetailLeft'>Firmware:</span>\
											<span class='DeviceBoxBottomDataDetailRifht'>v"+firmware_version+"</span>\
										</div>\
									</div>\
								</div>";
				$('.IPAV1100RxCont li:eq('+(_num+1)+')').html(addData);
				$('.IPAV1100RxCont li:eq('+(_num+1)+')').addClass('deviceBoxHasDevice');
				
				AddEventListen(1);
            _checkLoadingType=1;
        
	}
	
	if (DecodeVideoDataArr[_num][0] != hostname||
		DecodeVideoDataArr[_num][1] != device_id||
		DecodeVideoDataArr[_num][2] != ip||
		DecodeVideoDataArr[_num][3] != firmware_version||
		DecodeVideoDataArr[_num][4] != display_mode||
		DecodeVideoDataArr[_num][5] != multicast_address||
		DecodeVideoDataArr[_num][6] != statu||
		DecodeVideoDataArr[_num][7] != width||
		DecodeVideoDataArr[_num][8] != height||
		DecodeVideoDataArr[_num][9] != frames_per_second||
		DecodeVideoDataArr[_num][10] != color_space||
		DecodeVideoDataArr[_num][11] != bits_per_pixel||
		DecodeVideoDataArr[_num][12] !=hdcp_version||
		DecodeVideoDataArr[_num][13] !=display_connect) {

			if (typeof(DecodeVideoDataArr[_num])=='string') {
				DecodeVideoDataArr[_num] = [];
			}
			console.log(_num);
			checkRoutingTableChange = 1;
			DecodeVideoDataArr[_num][0]=hostname;
			DecodeVideoDataArr[_num][1]=device_id;
			DecodeVideoDataArr[_num][2]=ip;
			DecodeVideoDataArr[_num][3]=firmware_version;
			DecodeVideoDataArr[_num][4]=display_mode;
			DecodeVideoDataArr[_num][5]=multicast_address;
			DecodeVideoDataArr[_num][6]=statu;
			DecodeVideoDataArr[_num][7]=width;
			DecodeVideoDataArr[_num][8]=height;
			DecodeVideoDataArr[_num][9]=frames_per_second;
			DecodeVideoDataArr[_num][10]=color_space;
			DecodeVideoDataArr[_num][11]=bits_per_pixel;
			DecodeVideoDataArr[_num][12]=hdcp_version;
			DecodeVideoDataArr[_num][13] =display_connect;
        if(1) {
        	$('.IPAV1100RxCont li:eq(' + (_num + 1) + ') .DeviceBoxNavTop span').html(hostname);
            $('.IPAV1100RxCont li:eq(' + (_num + 1) + ') .DeviceBoxBottomDataDetail span:eq(1)').html(hostname);
            
            var _device_id = stringToArray(device_id,2);
            
            $('.IPAV1100RxCont li:eq(' + (_num + 1) + ') .DeviceBoxBottomDataDetail span:eq(5)').html((_device_id[0]+'-'+
            																						_device_id[1]+'-'+
            																						_device_id[2]+'-'+
            																						_device_id[3]+'-'+
            																						_device_id[4]+'-'+
            																						_device_id[5]).toLocaleUpperCase());

            $('.IPAV1100RxCont li:eq(' + (_num + 1) + ') .DeviceBoxBottomDataDetail span:eq(3)').html(ip);
            $('.IPAV1100RxCont li:eq(' + (_num + 1) + ') .DeviceBoxBottomDataDetail span:eq(7)').html('v' + firmware_version);
            
            var switchType;
            if (display_mode==0) {		
				switchType = 'Genlock';
			}
			else if(display_mode=='FAST_SWITCHED'||display_mode=='FAST_SWITCHED_CROP'||display_mode=='FAST_SWITCHED_STRETCH'){//fast switch full screen 
				switchType = 'Fast Switch';
			}
			else if(display_mode=='GENLOCK_SCALING'){//genlock scaling
				switchType = 'Genlock Scaling';
			}
			else if(display_mode=='WALL_GENLOCKED'){
				switchType = 'Wall Genlock';
			}
            $('.IPAV1100RxCont li:eq(' + (_num + 1) + ') .DeviceBoxBottomDataScroll span').html(ip+'-'+switchType);
            if (statu=='STREAMING') {
            	$('.IPAV1100RxCont li:eq(' + (_num + 1) + ') .DeviceBoxNavTopStop').addClass('DeviceBoxNavTopStreaming');
            	$('.IPAV1100RxCont li:eq(' + (_num + 1) + ') .DeviceBoxNavTopStatus').addClass('DeviceBoxNavTopStatusStreaming');

            }
            else {
            	$('.IPAV1100RxCont li:eq(' + (_num + 1) + ') .DeviceBoxNavTopStop').removeClass('DeviceBoxNavTopStreaming');
            	$('.IPAV1100RxCont li:eq(' + (_num + 1) + ') .DeviceBoxNavTopStatus').removeClass('DeviceBoxNavTopStatusStreaming');
            }
            $('.IPAV1100RxCont li:eq(' + (_num + 1) + ') .DeviceBoxContOnceDisplayInfo span:eq(0)').html(width + "x" + height);
            $('.IPAV1100RxCont li:eq(' + (_num + 1) + ') .DeviceBoxContOnceDisplayInfo span:eq(1)').html(frames_per_second + "Hz");
            $('.IPAV1100RxCont li:eq(' + (_num + 1) + ') .DeviceBoxContOnceDisplayInfo span:eq(2)').html(color_space + ',' + bits_per_pixel + 'Bit');
            
            if (!display_connect) {
            	$('.IPAV1100RxCont li:eq(' + (_num+1) + ') .DeviceBoxContOnceDisplayImg').addClass('DeviceBoxContOnceDisplayImgNoDevice');
            }else{
            	$('.IPAV1100RxCont li:eq(' + (_num+1) + ') .DeviceBoxContOnceDisplayImg').removeClass('DeviceBoxContOnceDisplayImgNoDevice');
            }

        }	
        ReloadPosition(1,1);	
	}
	
}
// 检测encode数据是否变动
function checkEncodeVideoDataIsChange(device_id,hostname,
	ip,firmware_version,multicast_address,statu,
	width,height,frames_per_second,color_space,bits_per_pixel,hdcp_version){
	var _arr = _data.videoswitching_encode_arr.split(',');
	var _num;
	for (var i = 0; i <_arr.length; i++) {
		(function(ii){
			if (_arr[ii]==device_id) {
				_num=ii;
			}
		})(i);
	}
	if (typeof(EncodeVideoDataArr[_num])=='undefined'||EncodeVideoDataArr[_num].length==0) {
		if (typeof(EncodeVideoDataArr[_num])=='undefined') {
			EncodeVideoDataArr[_num]=[];
		}
        		$('.IPAV1100TxCont li:eq('+_num+')').attr('id','DeviceEncodePositionID'+_num);
				$('.IPAV1100TxCont li:eq('+_num+')').attr('class','decodeencodeexist');
				// $('.IPAV1100TxCont li:eq('+_num+')').attr('draggable','true');
				// $('.IPAV1100TxCont li:eq('+_num+')').attr('ondrop','deviceToChangePosition(event)');
				// $('.IPAV1100TxCont li:eq('+_num+')').attr('ondragover','exp1(event)');
				// $('.IPAV1100TxCont li:eq('+_num+')').attr('ondragstart','expstart(event)');
				var addData = "<div class='DeviceBoxNavTop'>\
									<span>"+hostname+"</span>\
									<a class='DeviceBoxNavTopStatus'></a>\
									<a class='DeviceBoxNavTopSetting'></a>\
									<a class='DeviceBoxNavTopStop'></a>\
									<a class='DeviceBoxNavTopLocked'></a>\
								</div>\
								<div class='DeviceBoxCont'>\
									<div class='DeviceBoxContOnceDisplay'>\
										<div class='DeviceBoxContOnceDisplayTxImg'><span style='position:relative;top:-18px;'># "+(_num+1)+"</span></div>\
										<div class='DeviceBoxContOnceDisplayInfo'>\
											<span>"+ width + "x" + height +"</span>\
											<span>"+ frames_per_second +"Hz</span>\
											<span>"+ color_space + "," + bits_per_pixel + "Bit</span>\
										</div>\
									</div>\
								</div>\
								<div class='DeviceBoxBottom'>\
									<div class='DeviceBoxBottomDataScroll'>\
										<span>"+ ip +"</span>\
										<img src='images/deviceBoxBottomIco.png'>\
									</div>\
									<div class='DeviceBoxBottomDataDetail'>\
										<div>\
											<span class='DeviceBoxBottomDataDetailLeft'>Hostname:</span>\
											<span class='DeviceBoxBottomDataDetailRifht'>"+ hostname +"</span>\
										</div>\
										<div>\
											<span class='DeviceBoxBottomDataDetailLeft'>IP:</span>\
											<span class='DeviceBoxBottomDataDetailRifht'>"+ip+"</span>\
										</div>\
										<div>\
											<span class='DeviceBoxBottomDataDetailLeft'>MAC:</span>\
											<span class='DeviceBoxBottomDataDetailRifht'>"+device_id+"</span>\
										</div>\
										<div>\
											<span class='DeviceBoxBottomDataDetailLeft'>Firmware:</span>\
											<span class='DeviceBoxBottomDataDetailRifht'>v"+firmware_version+"</span>\
										</div>\
									</div>\
								</div>";
				$('.IPAV1100TxCont li:eq('+(_num)+')').html(addData);
				$('.IPAV1100TxCont li:eq('+(_num)+')').addClass('deviceBoxHasDevice');
				
           	AddEventListen(2);
           	_checkLoadingType = 1;

	}
	if (EncodeVideoDataArr[_num][0] != hostname||
		EncodeVideoDataArr[_num][1] != device_id||
		EncodeVideoDataArr[_num][2] != ip||
		EncodeVideoDataArr[_num][3] != firmware_version||
		EncodeVideoDataArr[_num][4] != multicast_address||
		EncodeVideoDataArr[_num][5] != statu||
		EncodeVideoDataArr[_num][6] != width||
		EncodeVideoDataArr[_num][7] != height||
		EncodeVideoDataArr[_num][8] != frames_per_second||
		EncodeVideoDataArr[_num][9] != color_space||
		EncodeVideoDataArr[_num][10] != bits_per_pixel||
		EncodeVideoDataArr[_num][11] != hdcp_version) {
			if (typeof(EncodeVideoDataArr[_num])=='string') {
				EncodeVideoDataArr[_num] = [];
			}
			checkRoutingTableChange = 1;
			EncodeVideoDataArr[_num][0]=hostname;
			EncodeVideoDataArr[_num][1]=device_id;
			EncodeVideoDataArr[_num][2]=ip;
			EncodeVideoDataArr[_num][3]=firmware_version;
			EncodeVideoDataArr[_num][4]=multicast_address;
			EncodeVideoDataArr[_num][5]=statu;
			EncodeVideoDataArr[_num][6]=width;
			EncodeVideoDataArr[_num][7]=height;
			EncodeVideoDataArr[_num][8]=frames_per_second;
			EncodeVideoDataArr[_num][9]=color_space;
			EncodeVideoDataArr[_num][10]=bits_per_pixel;
			EncodeVideoDataArr[_num][11]= hdcp_version;
        if(1) {
            $('.IPAV1100TxCont li:eq(' + (_num) + ') .DeviceBoxBottomDataDetail span:eq(1)').html(hostname);
            $('.IPAV1100TxCont li:eq(' + (_num) + ') .DeviceBoxNavTop span').html(hostname);
            var _device_id = stringToArray(device_id,2);

            $('.IPAV1100TxCont li:eq(' + (_num) + ') .DeviceBoxBottomDataDetail span:eq(5)').html((_device_id[0]+'-'+
            																						_device_id[1]+'-'+
            																						_device_id[2]+'-'+
            																						_device_id[3]+'-'+
            																						_device_id[4]+'-'+
            																						_device_id[5]).toLocaleUpperCase());
            $('.IPAV1100TxCont li:eq(' + (_num) + ') .DeviceBoxBottomDataDetail span:eq(3)').html(ip);
            $('.IPAV1100TxCont li:eq(' + (_num) + ') .DeviceBoxBottomDataDetail span:eq(7)').html('v' + firmware_version);
            $('.IPAV1100TxCont li:eq(' + (_num) + ') .DeviceBoxBottomDataScroll span').html(ip);
            if (statu=='STREAMING') {
            	$('.IPAV1100TxCont li:eq(' + (_num) + ') .DeviceBoxNavTopStop').addClass('DeviceBoxNavTopStreaming');
            	$('.IPAV1100TxCont li:eq(' + (_num) + ') .DeviceBoxNavTopStatus').addClass('DeviceBoxNavTopStatusStreaming');
            }
            else {
            	$('.IPAV1100TxCont li:eq(' + (_num) + ') .DeviceBoxNavTopStop').removeClass('DeviceBoxNavTopStreaming');
            	$('.IPAV1100TxCont li:eq(' + (_num) + ') .DeviceBoxNavTopStatus').removeClass('DeviceBoxNavTopStatusStreaming');
            }
            $('.IPAV1100TxCont li:eq(' + (_num) + ') .DeviceBoxContOnceDisplayInfo span:eq(0)').html(width + "x" + height);
            $('.IPAV1100TxCont li:eq(' + (_num) + ') .DeviceBoxContOnceDisplayInfo span:eq(1)').html(frames_per_second + "Hz");
            $('.IPAV1100TxCont li:eq(' + (_num) + ') .DeviceBoxContOnceDisplayInfo span:eq(2)').html(color_space + ',' + bits_per_pixel + 'Bit');
            
            if (width=='0'&&height=='0') {
            	$('.IPAV1100TxCont li:eq(' + (_num) + ') .DeviceBoxContOnceDisplayTxImg').addClass('DeviceBoxContOnceDisplayTxImgNoDevice');
            }else{
            	$('.IPAV1100TxCont li:eq(' + (_num) + ') .DeviceBoxContOnceDisplayTxImg').removeClass('DeviceBoxContOnceDisplayTxImgNoDevice');
            }
        }
		
		ReloadPosition(1,2);	
	}
}
/*************************************
*
*	从json对象中检测出要的数据
*	
* 	json:数据对象
* 	ParentNode:数据父节点
* 	tagName:数据所在模块的标识类型
* 	jsonName:数据所在模块的标识Name
* 	dataName:所需要的数据位置
* 
*
***************************************/
function checkReceiveJsonDataToString(json,ParentNode,tagName,jsonName,dataName){
	// (_json,'nodes','type','NETWORK_INTERFACE','configuration.hostname')
	var _i=0;
	// var _data = 'json.'+ParentNode+'.length';
	// var _length = eval('('+_data+')');
	var _length = json.length
	var _dataTmp='';
	for (var i = 0; i < _length; i++) {
		if (json[i].type==jsonName&&jsonName=='NETWORK_INTERFACE') {
			switch(dataName){
			case 'configuration.hostname':
				_dataTmp = json[i].configuration.hostname;				
				return _dataTmp;
			break;
			case 'configuration.ip.address':
				_dataTmp = json[i].configuration.ip.address;				
				return _dataTmp;
			break;
			case 'configuration.ip.mask':
				_dataTmp = json[i].configuration.ip.mask;				
				return _dataTmp;
			break;
			case 'configuration.ip.gateway':
				_dataTmp = json[i].configuration.ip.gateway;				
				return _dataTmp;
			case 'configuration.ip.mode':
				_dataTmp = json[i].configuration.ip.mode;				
				return _dataTmp;
			break;
			}			
		}
		else if (json[i].type==jsonName&&jsonName=='HDMI') {
			switch(dataName){
			case 'configuration.address':
				_dataTmp = json[i].configuration.address;
				return _dataTmp;
			break;
			case 'status.state':
				_dataTmp = json[i].status.state;				
				return _dataTmp;
			break;
			}			
		}
		else if (json[i].type==jsonName&&jsonName=='HDMI_ENCODER') {
			switch(dataName){
			case 'inputs[1].configuration.source.value':
				_dataTmp = json[i].inputs[1].configuration.source.value;	

				return _dataTmp;
			break;
			case 'inputs[0].configuration.source.value':
				_dataTmp = json[i].inputs[0].configuration.source.value;	

				return _dataTmp;
			break;
			case 'status.video.width':
				_dataTmp = json[i].status.video.width;				
				return _dataTmp;
			break;
			case 'status.video.height':
				_dataTmp = json[i].status.video.height;				
				return _dataTmp;
			break;
			case 'status.video.frames_per_second':
				_dataTmp = json[i].status.video.frames_per_second;				
				return _dataTmp;
			break;
			case 'status.video.color_space':
				_dataTmp = json[i].status.video.color_space;				
				return _dataTmp;
			break;
			case 'status.video.bits_per_pixel':
				_dataTmp = json[i].status.video.bits_per_pixel;				
				return _dataTmp;
			break;
			case 'status.hdcp_version':
				_dataTmp = json[i].status.hdcp_version;				
				return _dataTmp;
			break;
			}			
		}
		else if (json[i].type==jsonName&&jsonName=='HDMI_DECODER') {
			switch(dataName){			
			case 'status.video.width':
				_dataTmp = json[i].status.video.width;				
				return _dataTmp;
			break;
			case 'status.video.height':
				_dataTmp = json[i].status.video.height;				
				return _dataTmp;
			break;
			case 'status.video.frames_per_second':
				_dataTmp = json[i].status.video.frames_per_second;				
				return _dataTmp;
			break;
			case 'status.video.color_space':
				_dataTmp = json[i].status.video.color_space;				
				return _dataTmp;
			break;
			case 'status.video.bits_per_pixel':
				_dataTmp = json[i].status.video.bits_per_pixel;				
				return _dataTmp;
			break;
			case 'status.hdcp_version':
				_dataTmp = json[i].status.hdcp_version;				
				return _dataTmp;
			break;
			// 获取具体设备数据-----------------------------------------------------
			case 'configuration.hdcp_support_enable':
				_dataTmp = json[i].configuration.hdcp_support_enable;				
				return _dataTmp;
			break;
			case 'configuration.hdcp_22_support_disable':
				_dataTmp = json[i].configuration.hdcp_22_support_disable;				
				return _dataTmp;
			break;
			case 'configuration.edid':
				_dataTmp = json[i].configuration.edid;				
				return _dataTmp;
			break;
			}			
		}
		else if (json[i].type==jsonName&&jsonName=='FRAME_BUFFER') {
			switch(dataName){
			case 'configuration.display_mode':
				_dataTmp = json[i].configuration.display_mode;		
				return _dataTmp;
			break;			
			}	
		}
		else if (json[i].type==jsonName&&jsonName=='ANALOG_AUDIO_OUTPUT') {
			switch(dataName){
			case 'inputs[0].configuration.source.value':
				_dataTmp = json[i].inputs[0].configuration.source.value;		
				return _dataTmp;
			break;			
			}	
		}
		else if (json[i].type==jsonName&&jsonName=='HDMI_MONITOR') {
			switch(dataName){
			case 'status.edid':
				_dataTmp = json[i].status.edid;		
				return _dataTmp;
			case 'status.connected':
				_dataTmp = json[i].status.connected;		
				return _dataTmp;
			break;			
			}	
		}
		else if (json[i].type==jsonName&&jsonName=='UART') {
			switch(dataName){
			case 'configuration.baud_rate':
				if (json[i].index==1) {
					_dataTmp = json[i].configuration.baud_rate;	
					return _dataTmp;
				}
				
			break;
			case 'configuration.data_bits':
				if (json[i].index==1) {
					_dataTmp = json[i].configuration.data_bits;	
					return _dataTmp;
				}			
				
			break;
			case 'configuration.stop_bits':
				if (json[i].index==1) {
					_dataTmp = json[i].configuration.stop_bits;	
					return _dataTmp;
				}			
				
			break;
			case 'configuration.parity':
				if (json[i].index==1) {
					_dataTmp = json[i].configuration.parity;	
					return _dataTmp;
				}			
				
			break;
			}			
		}
		else if (json[i].type==jsonName&&jsonName=='HDMI_AUDIO') {
			switch(dataName){
			case 'configuration.address':
				_dataTmp = json[i].configuration.address;		
				return _dataTmp;
			break;	
			case 'status.state':
				_dataTmp = json[i].status.state;		
				return _dataTmp;
			break;	
			}	
		}
		else if (json[i].type==jsonName&&jsonName=='AUDIO') {
			switch(dataName){
			case 'configuration.address':
				_dataTmp = json[i].configuration.address;		
				return _dataTmp;
			break;	
			case 'status.state':
				_dataTmp = json[i].status.state;		
				return _dataTmp;
			break;	
			}	
		}
		else if (json[i].type==jsonName&&jsonName=='INFRARED') {
			switch(dataName){
			case 'configuration.address':
				_dataTmp = json[i].configuration.address;		
				return _dataTmp;
			break;	
			case 'status.state':
				_dataTmp = json[i].status.state;		
				return _dataTmp;
			break;	
			}	
		}
		else if (json[i].type==jsonName&&jsonName=='RS232') {
			switch(dataName){
			case 'configuration.address':
				if (json[i].index==1) {
					_dataTmp = json[i].configuration.address;
					return _dataTmp;	
				}
				
			break;
			case 'status.state':
				if (json[i].index==1) {
					_dataTmp = json[i].status.state;	
					return _dataTmp;
				}
				
			break;			
			}			
		}
			// _data = 'json.'+ParentNode+'['+i+'].'+tagName;
			// _data = eval('('+_data+')');
			// if (_data == jsonName) {
			// 	_data = 'json.'+ParentNode+'['+i+'].'+dataName;
			// 	_data = eval('('+_data+')');
			// 	return _data;
			// }
			
	}
}