
var errSID=0,errNRC=0;
FuncGetNrc = function(){
	return errSID,errNRC;
}
FuncClrNrc = function(){
	//return errSID,errNRC;
	errSID = 0;
	errNRC = 0;
}
var TableToStr = function(data){
	if(data == null){
		return " "; 
	}
	if(#data == 0){
		return " "; 
	}
	var str = "data:"
	for(i=1;#data;1){
		str += " "
		str += tostring(data[i],16);
	}
	return str; 
	
}

//接收
FuncDiag7FPro = function(data){
	//console.dumpJson(data);
	errSID = data[1];
	errNRC = data[2];
	select(errNRC) {
		case 0x78 {
			if(errSID != 0x36){
				FuncDisplay("服务正忙")
			}
			
		}
		else {
			FuncDisplay("SID:" + tostring(errSID,16))
			FuncDisplay("错误 - NRC:" + tostring(errNRC,16))
			FuncDisplay(TableToStr(data));
		}
	}
	
}