V 10 1 LANG:1 8 (NoName) PANEL,-1 -1 367 104 N "dcsUiWindowBack" 1 "$DOMAINNODE" E E E E E 1 0 0 0 15 20 ""0 1 E E 2 "CBRef""1" "EClose"E "" DISPLAY_LAYER, 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 LAYER, 0 1 LANG:1 6 Layer1 0 LAYER, 1 1 LANG:1 6 Layer2 0 LAYER, 2 1 LANG:1 6 Layer3 0 LAYER, 3 1 LANG:1 6 Layer4 0 LAYER, 4 1 LANG:1 6 Layer5 0 LAYER, 5 1 LANG:1 6 Layer6 0 LAYER, 6 1 LANG:1 6 Layer7 0 LAYER, 7 1 LANG:1 6 Layer8 2 0 "Text40" "" 1 15 20 E E E 1 E 1 E N "dcsUiWindowFore" E N "_Transparent" E E E E 1 0 0 0 0 0 E E E 0 1 LANG:1 0 1 "dashclr"N "_Transparent" E E 0 1 1 0 1 E U 0 E 10 24 81 40 0 2 0 "0s" 0 0 0 64 0 0 10 24 1 1 LANG:1 87 -*-Arial-bold-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,697,0,0,0,0,0,0,0,0,Arial 0 "" 1 LANG:1 12 Config. file 30 1 "Frame6" "" 1 10 96 E E E 1 E 1 E N "_3DText" E N "_Transparent" E E E E 2 0 0 0 0 0 E E E 1 1 LANG:1 0 1 "dashclr"N "_Transparent" E E 0 1 1 0 1 E 0.997134670487106 0 1.11764705882353 -6.97134670487106 -9.1764705882353 0 E 10 10 360 96 1 LANG:1 87 -*-Arial-bold-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,697,0,0,0,0,0,0,0,0,Arial 0 "" 1 LANG:1 18 MODE CONFIGURATION 2 2 "txtActionMonitor" "" 1 14 52 E E E 1 E 1 E N "dcsUiDisplayFore" E N "dcsUiDisplayBack" E E E E 3 0 0 0 0 0 E E E 0 1 LANG:1 0 1 "dashclr"N "_Transparent" E E 0 1 1 0 1 E U 1 E 9 80 341 90 1 2 0 "0s" 0 0 0 64 0 0 9 80 1 1 LANG:1 84 -*-Arial-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,404,0,0,0,0,0,0,0,0,Arial 0 "" 1 LANG:1 0 13 3 "cmdCreate" "" 1 192 49 E E E 1 E 1 E N "dcsUiButtonFore" E N "dcsUiButtonBack" E E E E 4 0 0 0 0 0 E E E 0 1 LANG:1 0 0 1 LANG:1 87 -*-arial-bold-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,697,0,0,0,0,0,0,0,0,arial 0 "" 190 47 343 77 T 1 LANG:1 20 Create Configuration "main() { EP_childPanelOn(); } EP_childPanelOn() { string sRootNode = $DOMAINNODE; ChildPanelOnCentral(\"dcsFsmTools/dcsFSMTailoring.pnl\", \"FSM-Hierarchy\", makeDynString(\"$DOMAINNODE:\"+sRootNode )); } // SimpleCtrlScript {EP_childPanelOn} // Function {ChildPanelOnCentral} // File {hmpFSMSynoptics/hmpSynopticsFSM.pnl} // Panel {} // Parent {} // Module {} // OffsetX {0} // OffsetY {0} // PanelPara1 {$DOMAINNODE:HMPID} // SimpleCtrlScriptEnd {EP_childPanelOn} " 0 E E E 13 4 "cmdApply" "" 1 8 49 E E E 1 E 1 E N "dcsUiButtonFore" E N "dcsUiButtonBack" E E E E 5 0 0 0 0 0 E E E 0 1 LANG:1 0 0 1 LANG:1 87 -*-arial-bold-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,697,0,0,0,0,0,0,0,0,arial 0 "" 6 47 155 77 T 1 LANG:1 19 Apply Configuration "main() { string sStat1,sStat2; bool flag; int i; // First try to verify if Servers are busy dyn_string dsNames; dyn_uint diIds; dyn_errClass err; // This was put in order to sincronize ... /* getSystemNames(dsNames,diIds); flag = true; while(flag) { flag = false; for(i=1;i<=dynlen(dsNames);i++) { dpGet(dsNames[i]+\":ToDo.status:_original.._value\",sStat1); if(sStat1 == \"working\") flag = true; } delay(2); } */ // then open the config file file f; f = fopen(txtConfFileName.text, \"r\"); i=ferror(f); if (i!=0) { txtActionMonitor.text = \" Error in Config File !\"; DebugTN(\"ALICE - FSMConfiguration : Error on file no. \",i,\" occurred\"); fclose(f); return; } // Disable buttons cmdApply.enabled(false); cmdCreate.enabled(false); cmdSelection.enabled(false); string sIdManager; dyn_string dsLine,dsTemp; flag = _ReadAndFormat(f, dsLine); // Discharge the first line flag = _ReadAndFormat(f, dsLine); while(flag) { txtActionMonitor.text = \"I/E:\"+dsLine[1]; switch(dsLine[4]) { case \"DU\": if(dsLine[1]== \"ENABLED\") fwCU_enableObj(dsLine[2],dsLine[3]); else fwCU_disableObj(dsLine[2],dsLine[3]); break; case \"CU\": dsTemp = strsplit(dsLine[3],\"/\"); fwUi_getOwnership(dsLine[2], sIdManager); if(dsLine[1]== \"INCLUDED\") fwCU_includeTree(dsLine[2], dsLine[2], sIdManager); else fwCU_excludeTree(dsLine[2], dsLine[2], sIdManager); break; } flag = _ReadAndFormat(f, dsLine); } fclose(f); txtActionMonitor.text = \" End of definition phase\"; txtActionMonitor.text = \" OK \"; // enabled buttons cmdApply.enabled(true); cmdCreate.enabled(true); cmdSelection.enabled(true); } bool _ReadAndFormat(file f,dyn_string &line) { string sBuf = \"\"; int i; dyn_string dsAppo; i = fgets(sBuf,1000,f); if (i==0) return(false); sBuf = substr(sBuf,0,strlen(sBuf)-1); dsAppo = strsplit(sBuf,\"=\"); if(dynlen(dsAppo) < 2) { line[4] = \"\"; return(true); } line[1] = dsAppo[2]; dsAppo = strsplit(dsAppo[1],\":\"); line[2] = dsAppo[1]; line[3] = dsAppo[3]; line[4] = (line[2] == line[3]) ? \"CU\" : \"DU\"; return(true); }" 0 E E E 14 5 "txtConfFileName" "" 1 83 22 E E E 0 E 1 E N "dcsUiChartFore" E N "dcsUiChartBack" E E E E 6 0 0 0 0 0 E E E 0 1 LANG:1 0 0 1 LANG:1 87 -*-Arial-bold-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,697,0,0,0,0,0,0,0,0,Arial 0 "" 81 20 305 47 3 "0s" 0 0 0 0 0 -1 E E E 13 6 "cmdSelection" "" 1 302 20 E E E 1 E 1 E N "dcsUiButtonFore" E N "dcsUiButtonBack" E E E E 7 0 0 0 0 0 E E E 0 2 LANG:1 23 Open file name selector LANG:0 0 0 2 LANG:1 84 -*-arial-*-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,404,0,0,0,0,0,0,0,0,arial LANG:0 107 -microsoft windows-arial-normal-r-normal-*-*-120-100-100-*-*-iso8859-1|-13,0,0,0,400,0,0,0,0,0,0,0,16,arial 0 "" 302 20 342 49 P 4294967295 "pictures/file_opened_en.gif" 1 LANG:1 0 "main() { string Quer,ext; file fl1; int i; fileSelector(Quer, \"\", false, \"*.hye\", true); if (Quer == \"\") { DebugTN(\"ALICE - FSM Configuration : Configuration filename not valid !\"); setValue(\"txtConfFileName\",\"text\",\"\"); return; } fl1 = fopen(Quer,\"r\"); i=ferror(fl1); if (i!=0) { DebugTN(\"ALICE - FSM Configuration : Error on file no. \",i,\" occurred\"); fclose(fl1); setValue(\"txtConfFileName\",\"text\",\"\"); return; } i = fgets(ext,1000,fl1); if (i==0) { DebugN(\"ALICE - FSM Configuration : Error reading file \",Quer,\" occurred\"); fclose(fl1); setValue(\"txtConfFileName\",\"text\",\"\"); return; } fclose(fl1); if (Quer != \"\"); setValue(\"txtConfFileName\",\"text\",Quer); }" 0 E E E 0 0