
function yk(tagVarName, state) {
	var value = true;
	if (typeof(state) == "string") {
		value = (state == "1");
	} else if (typeof(state) == "number") {
		value = (state == 1);
	} else if (typeof(state) == "boolean") {
		value = state;
	}
	if (typeof(tagVarName) == "string") {
//Packages.com.ht.ui.MainApplication.getMainApp().showMessage("========");
		Packages.com.ht.svg.action.ActionUtil.ykFromScript(tagVarName, value);
	}
}


/****************************************/
/*********** 图表控件操作函数 ***********/
/****************************************/

/*
 * @description 打开单个变量的实时曲线窗口
 */
function RealTimeLineChartWnd() {
	//println("打开实时曲线窗口");
	
	var title = arguments[0];
	var updatePeriod = arguments[1];
	var tagVarName = [];
	for (var i = 2; i < arguments.length; i++) {
         tagVarName[i - 2]= arguments[i];
    }
	Packages.com.ht.ui.monitor.RealTimeLineChartViewer.showWindow(title, updatePeriod * 1000, tagVarName); 
}

/*
 * @description 打开单个变量的历史曲线窗口
 */
function HistoryLineChartWnd() {
	//println("打开历史曲线窗口");
	
	var title = arguments[0];
	var tagVarName = [];
	for (var i = 1; i < arguments.length; i++) {
         tagVarName[i - 1]= arguments[i];
    }
	Packages.com.ht.ui.monitor.HistoryLineChartViewer.showWindow(title, tagVarName); 
}
