V 10 1 LANG:1 8 (NoName) PANEL,-1 -1 1024 650 N "dcsUiWindowBack" 0 "main() { //***************************************************************************************************** // Initialize the controls //****************************************************************************** // this function is here for debugging, for the moment just creates all spdDomains // The domains in the begining should be configurable, // either all domains or the ones with the fwConfigurator domain = dcsCaenDetector_getFSMRootName(); //FsmDomains.items = dcsCaen_getFSMDomains(domain); FsmDomains.items = dcsCaen_getDomainsForRecipe(domain); FsmTypes.items = dcsCaen_getFSMCaenTypes(); FsmTypes.selectedPos = 1; FsmStates.items = dcsCaen_getFSMCaenStates(FsmTypes.text); FsmStates.selectedPos = 1; // if the dollar parameter is not defined them it can create the message FsmDomains.selectedPos=1; __loadRecipe(FsmDomains.text,FsmTypes.text, FsmStates.text); RecipeName.text = FsmDomains.text + \"/\" + FsmTypes.text + \"/\"+FsmStates.text; // read the Coords system and save dsCoords = dcsCaenDetector_getCoordTypes(); CoordList.items = dsCoords; CoordList.selectedPos = 1; // read Settings systems __readSettingsByType(FsmTypes.text); // Set the Header __tableSetHeaders(dsCoords,dsItemsDescription,diItemsTypes); // Load the recipe RecipeName.text = FsmDomains.text + \"/\" + FsmTypes.text + \"/\"+FsmStates.text; // Graphic locator detectorLocatorInitialize(); } " 0 E E E E 1 0 0 0 30 30 ""0 1 E "//Function Load_EventClick() #uses \"dcsCaenDetector.ctl\" //#uses \"dcsFsmDbDetector.ctl\" //#uses \"dcsCaenDBConfig.ctl\" // Global Variables definition string domain = \"\"; // root domain node neme dyn_string dsCoords; // list of coord names dyn_string dsItemsDpe; // list of Items DPe dyn_string dsItemsDescription; // list of Items description dyn_int diItemsTypes; // list of Items Type dyn_string logicNames; // List of LOGICAL Names in the table lines // ----- int lastLine; const string headerColor = \"Green\"; const string highLightColor=\"Yellow\"; // *************************************************************************************** // add your code here for initializtion of your detector locator detectorLocatorInitialize(){ pnlClearSelTable(); ChannelTable.setCurrentLine(0); dyn_string currLine = highLightCurrLine(); DebugTN(currLine); if(dynlen(currLine) > 0) dcsCaenDetector_setImageLocator(currLine[1]); } //***************************************************************************************** // Table management // sets the color of one line in the Table of the Channel Recipe Panel setTableLineColor(int line, string color){ int i; if(color == \"white\") { setValue(\"ChannelTable\", \"cellBackColRC\", line,\"LogicName\",\"{221,221,221}\"); for (i = 1 ; i <= dynlen(dsCoords) ; i ++) setValue(\"ChannelTable\", \"cellBackColRC\", line,\"arg\"+i,\"{221,221,221}\"); for (i = dynlen(dsCoords)+1 ; i < 18 ; i ++) setValue(\"ChannelTable\", \"cellBackColRC\", line,\"arg\"+i,color); } else { setValue(\"ChannelTable\", \"cellBackColRC\", line,\"LogicName\",color); for (i = 1 ; i < 18 ; i ++){ setValue(\"ChannelTable\", \"cellBackColRC\", line,\"arg\"+i,color); } } } // function to clear the selection in the table pnlClearSelTable(){ int lineCount; int n; getValue(\"ChannelTable\", \"lineCount\", lineCount); for(n = 0; n < lineCount; n ++){ setTableLineColor(n,\"white\"); } } //function to high Light current line // returns the currunte line values dyn_string highLightCurrLine(){ int x,y; dyn_string currLine; getValue(\"ChannelTable\",\"currentCell\", y,x); getValue(\"ChannelTable\", \"getLineN\", y, currLine); if (lastLine != -1) setTableLineColor(lastLine,\"white\"); setTableLineColor( y, highLightColor); lastLine = y; return currLine; } //***************************************************************************************** // function that creates the default settings acording to type // gets the logic names of the devices in the table from dcsGetCaenLogicNamesForRecipe function __makeDefaultSettings(string domain, string type) { int i,n; dyn_string info; dyn_string caenDefaults; ChannelTable.deleteAllLines(); logicNames = dcsCaenDetector_genLogicNamesForRecipe(domain, type); n = dynlen(logicNames); for (i = 1; i <= n ; i++){ dynClear(info); // adds the rest of the information to the table info = makeDynString(logicNames[i]); dynAppend(info, dcsCaenDetector_getCoordsFromLogicName(logicNames[i])); caenDefaults = dcsCaenDetector_getDefaultSettingsChannel( logicNames[i], FsmStates.text ); dynAppend( info, caenDefaults); // default settings for the recipe __appendTableLine(info); } } // ------------------------------------------------------------ // read Settings systems void __readSettingsByType(string Type) { dyn_string dsFormat; dsItemsDpe = dcsCaen_getCaenRecipeSettings(Type, dsItemsDescription, diItemsTypes, dsFormat); SettingsList.items = dsItemsDpe; SettingsList.selectedPos = 1; } // ------------------------------------------------------------ // ------------------------------------------------------------ // function to create the headers in the table, // loads the values from the fucntion dcsGetDetectorCoordTypes() void __tableSetHeaders(dyn_string Coords,dyn_string Items,dyn_int diDpeTypes) { int i,j,n; dyn_string headers; ChannelTable.deleteAllLines(); ChannelTable.columnEditable(0,false); ChannelTable.columnHeader(0,\"LogicName\"); ChannelTable.columnWidth(0,350); for(i=1;i<=dynlen(Coords);i++) { ChannelTable.columnHeader(i,Coords[i]); ChannelTable.columnEditable(i,false); ChannelTable.columnWidth(i, __columnWidth() ); } for(i=1;i<=dynlen(Items);i++) { j = dynlen(Coords) + i; ChannelTable.columnHeader(j,Items[i]); ChannelTable.columnEditable(j,true); ChannelTable.columnWidth(j,__columnWidth(diDpeTypes[i]) ); } // setTableLineColor(0, headerColor); for(i=dynlen(Coords)+dynlen(Items)+1;i<=ChannelTable.columnCount();i++) { ChannelTable.columnHeader(i,\"\"); ChannelTable.columnVisibility(i,false); } } int __columnWidth(int dpeType = -1) { switch(dpeType) { case DPEL_INT: return(45); break; case DPEL_FLOAT: return(60); break; case DPEL_BOOL: return(45); break; case DPEL_STRING: return(350); break; default: return(60); break; } } // ----------------------------------------------------------- // --------------------------------------------------------- // loads a recipe acording to domain type state int __loadRecipe(string domain, string type, string state) { dyn_string exceptionInfo; if(domain==\"\"||type==\"\"||state==\"\") return; dyn_dyn_mixed recipeObj = dcsCaen_getFSMRecipeFromCache(domain, type, state, exceptionInfo); if (dynlen(exceptionInfo)) { // if there is a problem with the recipe, loads the default values dynAppend(exceptionInfo, \"loading default values for type \" + FsmTypes.text); fwExceptionHandling_display(exceptionInfo); DebugTN(\"could not load recipe\", RecipeName.text, \"loading default values for type \", FsmTypes.text); __makeDefaultSettings(FsmDomains.text, type); return -1; } __dataFromRecipeObj(recipeObj); return 0; } // ----------------------------------------------------------- // ----------------------------------------------------------- //Function to append a table line through a dyn_mixed __appendTableLine(dyn_string line) { dyn_string columns; int n; for(n = 1 ; n < 19 ; n++){ columns[n]= \"arg\"+n; } for(n = dynlen(line) ; n < 19 ; n++){ dynAppend(line, \"\"); } //DebugTN(\"TableLine - \", line); setValue( \"ChannelTable\",\"appendLine\",\"LogicName\",line[1], columns[1],line[2], columns[2],line[3], columns[3],line[4], columns[4],line[5], columns[5],line[6], columns[6],line[7], columns[7],line[8], columns[8],line[9], columns[9],line[10], columns[10],line[11], columns[11],line[12], columns[12],line[13], columns[13],line[14], columns[14],line[15], columns[15],line[16], columns[16],line[17], columns[17],line[18]); int line = ChannelTable.lineCount()-1; int i; setValue(\"ChannelTable\", \"cellBackColRC\", line,\"LogicName\",\"{221,221,221}\"); for (i = 1 ; i <= dynlen(dsCoords) ; i ++) setValue(\"ChannelTable\", \"cellBackColRC\", line,\"arg\"+i,\"{221,221,221}\"); for (i = dynlen(dsCoords)+1 ; i < 18 ; i ++) setValue(\"ChannelTable\", \"cellBackColRC\", line,\"arg\"+i,\"white\"); } // ----------------------------------------------------------- // ----------------------------------------------------------- // function to change a setting from an array to be applied to the table // gets the value of the header and loops over it untill finding the element // them changes the value __lineChangeSetting(string setting, string value, dyn_string &line){ dyn_string headers; int i,j,n; n = dynlen(dsCoords)+1; // where starts settings param in the line j = dynlen(dsItemsDpe); // Numbers of settings params for(i=1;i<=j;i++) { if(dsItemsDpe[i] == setting) { switch(diItemsTypes[i]) { case DPEL_FLOAT: line[n+i] = (string)((float)value); break; case DPEL_INT: line[n+i] = (string)((int)value); break; case DPEL_STRING: line[n+i] = value; break; case DPEL_BOOL: if(strtolower(value) == \"true\" || value != -1) line[n+i] = \"true\"; else line[n+i] = \"false\"; break; } } } } // ----------------------------------------------------------- // ----------------------------------------------------------- //fills up the table values from the recipe object __dataFromRecipeObj(dyn_dyn_mixed recipeObj){ // gets the data from the recipe obj into a bi dimmentional array dyn_dyn_mixed data = dcsCaen_getDataFromRecipe(recipeObj); int i,j; dyn_string dataLine ; dyn_string tableRow; dyn_string coordinates; dyn_string dsGhost; // Get the list of all channels logicNames = dcsCaenDetector_genLogicNamesForRecipe(FsmDomains.text, FsmTypes.text); dsGhost = logicNames; ChannelTable.deleteAllLines(); for (i = 1 ; i <= dynlen(data); i++){ dataLine = data[i]; tableRow = makeDynString( dataLine[1]); coordinates = dcsCaenDetector_getCoordsFromLogicName(dataLine[1]); dynAppend( tableRow, coordinates); int dsIndex = dynContains(logicNames, dataLine[1]); if (dsIndex > 0)dsGhost[dsIndex] = \"\"; // Exclude recipe that exists dynRemove( dataLine, 1); // removes the logicName from the line to not have it again dynAppend(tableRow, dataLine); // and inserts the data from the recipe finally __appendTableLine(tableRow); // appends a line in the recipe } // Display the Ghost for (i = 1 ; i <= dynlen(dsGhost); i++){ if(dsGhost[i] != \"\") { tableRow = makeDynString( dsGhost[i] ); coordinates = dcsCaenDetector_getCoordsFromLogicName(dsGhost[i]); dynAppend( tableRow, coordinates); __appendTableLine(tableRow); // appends an empty line in the recipe } } } // ----------------------------------------------------------- // ------------------------------------------------------------------------- // function that creates the recipe object from the values in the table dyn_dyn_mixed __createRecipeObj(){ dyn_dyn_mixed recipeObj; int nRows =dynlen(logicNames); int n,i,m; dyn_mixed currLine; string logicNode; dyn_dyn_mixed recipeChannel; dyn_string exceptionInfo; for(n = 0 ; n < nRows; n ++ ){ getValue(\"ChannelTable\", \"getLineN\", n, currLine); logicNode = currLine[1]; for(i = 0 ; i <= dynlen(dsCoords); i++ ) dynRemove(currLine,1); m = dynlen(currLine); for(i = dynlen(dsItemsDpe)+1 ; i <= m ; i++ ) dynRemove(currLine,dynlen(dsItemsDpe)+1); recipeChannel = dcsCaen_createRecipeObj(logicNode, currLine); // here post the system name fwConfigurationDB_combineRecipes( recipeObj, recipeObj, recipeChannel, exceptionInfo); if(dynlen(exceptionInfo)){ fwExceptionHandling_display(exceptionInfo); return; } } return recipeObj; } // -------------------------------------------------------------------------- // ================== Function not Used ========================= /* //Function to edit a table line through a dyn_mixed editTableLine( dyn_string line){ dyn_string columns; for (int n = 1 ; n < 19 ; n++){ columns[n]= \"arg\"+n; } for (int n = dynlen(line) ; n < 19 ; n++){ dynAppend(line, \"\"); } //DebugTN(\"TableLine - \", line); setValue( \"ChannelTable\",\"updateLine\",\"LogicName\",line[1], columns[1],line[2], columns[2],line[3], columns[3],line[4], columns[4],line[5], columns[5],line[6], columns[6],line[7], columns[7],line[8], columns[8],line[9], columns[9],line[10], columns[10],line[11], columns[11],line[12], columns[12],line[13], columns[13],line[14], columns[14],line[15], columns[15],line[16], columns[16],line[17], columns[17],line[18]); } */ // ====================================================== " 0 2 "CBRef" "1" "EClose" "main() { //fwTreeView_close(); }" 0 "" 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 2 41 "Text2" "" 1 40 515 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E E E 30 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 567 86 593 0 2 0 "0s" 0 0 0 64 0 0 10 567 1 1 LANG:1 87 -*-Arial-bold-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,758,0,0,0,0,0,0,0,0,Arial 0 "" 1 LANG:1 11 Change All 2 44 "Text4" "" 1 478 515 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E E E 33 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 480 567 516 593 0 2 0 "0s" 0 0 0 64 0 0 480 567 1 1 LANG:1 87 -*-Arial-bold-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,758,0,0,0,0,0,0,0,0,Arial 0 "" 1 LANG:1 3 To 2 68 "Text1" "" 1 232 939 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E E E 46 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 215 567 271 590 0 2 0 "0s" 0 0 0 64 0 0 215 567 1 1 LANG:1 87 -*-Arial-bold-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,758,0,0,0,0,0,0,0,0,Arial 0 "" 1 LANG:1 5 Where 2 69 "Text3" "" 1 584 1408 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E E E 47 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 350 567 406 590 0 2 0 "0s" 0 0 0 64 0 0 350 567 1 1 LANG:1 87 -*-Arial-bold-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,758,0,0,0,0,0,0,0,0,Arial 0 "" 1 LANG:1 2 is 25 27 "ChannelTable" "" 1 -50.2040816326531 -870 E E E 1 E 1 E N "_WindowText" E N "_Window" E E "main(){ dyn_string currLine= highLightCurrLine(); if(dynlen(currLine) > 0) dcsCaenDetector_setImageLocator(currLine[1]); }" 0 "main() { dyn_string currLine= highLightCurrLine(); if(dynlen(currLine) > 0) dcsCaenDetector_setImageLocator(currLine[1]); }" 0 16 0 0 0 0 0 "main(){ pnlClearSelTable(); dyn_string currLine = highLightCurrLine(); if(dynlen(currLine) > 0) dcsCaenDetector_setImageLocator(currLine[1]); }" 0 E E 0 1 LANG:1 0 0 1 LANG:1 84 -*-Arial-*-r-normal-*-12-*-100-100-*-*-iso8859-1|-12,0,0,0,505,0,0,0,0,0,0,0,0,Arial 0 "" 8 178 1012 532 EE 1 0 1 18 1 "LogicName" 34 1 1 "s" 1 LANG:1 11 Device Node E 1 LANG:1 0 315 "arg1" 6 1 1 "s" 1 LANG:1 4 arg1 E 1 LANG:1 0 70 "arg2" 5 1 1 "s" 1 LANG:1 4 arg2 E 1 LANG:1 0 55 "arg3" 5 1 1 "s" 1 LANG:1 4 arg3 E 1 LANG:1 0 55 "arg4" 5 1 1 "s" 1 LANG:1 4 arg4 E 1 LANG:1 0 55 "arg5" 4 1 1 "s" 1 LANG:1 4 arg5 E 1 LANG:1 0 50 "arg6" 4 1 1 "s" 1 LANG:1 4 arg6 E 1 LANG:1 0 50 "arg7" 4 1 1 "s" 1 LANG:1 4 arg7 E 1 LANG:1 0 50 "arg8" 4 1 1 "s" 1 LANG:1 4 arg8 E 1 LANG:1 0 50 "arg9" 4 1 1 "s" 1 LANG:1 4 arg9 E 1 LANG:1 0 50 "arg10" 4 1 1 "s" 1 LANG:1 5 arg10 E 1 LANG:1 0 50 "arg11" 4 1 1 "s" 1 LANG:1 5 arg11 E 1 LANG:1 0 50 "arg12" 4 1 1 "s" 1 LANG:1 5 arg12 E 1 LANG:1 0 50 "arg13" 4 1 1 "s" 1 LANG:1 5 arg13 E 1 LANG:1 0 50 "arg14" 4 1 1 "s" 1 LANG:1 5 arg14 E 1 LANG:1 0 50 "arg15" 4 1 1 "s" 1 LANG:1 5 arg15 E 1 LANG:1 0 50 "arg16" 4 1 1 "s" 1 LANG:1 5 arg16 E 1 LANG:1 0 50 "arg17" 3 1 1 "s" 1 LANG:1 5 arg17 E 1 LANG:1 0 40 26 26 "" 1 1 LANG:1 7 Channel 8 44 1 LANG:1 84 -*-Arial-*-r-normal-*-12-*-100-100-*-*-iso8859-1|-12,0,0,0,505,0,0,0,0,0,0,0,0,Arial 0 "" 0 1 1 1 7 1 0 14 31 "RecipeName" "" 1 110 150 E E E 1 E 1 E N "dcsUiDisplayFore" E N "dcsUiDisplayBack" E E E E 20 0 0 0 0 0 E E E 0 1 LANG:1 0 1 "textChangedCB" "main(string newText) { __loadRecipe(FsmDomains.text,FsmTypes.text,FsmStates.text ); highLightCurrLine(); }" 1 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 0 "" 108 148 507 177 3 "0s" 0 0 0 0 0 -1 E E E 22 32 "FsmStates" "" 1 105 115 E E E 1 E 1 E N "dcsUiDisplayFore" E N "dcsUiDisplayBack" E E E E 21 0 0 0 0 0 E E E 0 1 LANG:1 0 0 1 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 0 "" 103 113 332 142 0 E "main() { RecipeName.text = FsmDomains.text + \"/\" + FsmTypes.text + \"/\"+FsmStates.text; }" 0 E 0 0 13 33 "StoreToDB" "" 1 164.875 960 E E E 1 E 1 E N "_ButtonText" E N "_Button" E E E E 22 0 0 0 0 0 E E E 0 1 LANG:1 0 0 1 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 0 "" 148 608 292 642 T 1 LANG:1 13 Save to Cache "main(){ dyn_string exceptionInfo; string hierarchyType=fwDevice_LOGICAL; this.enabled = false; dyn_dyn_mixed recipeObj = __createRecipeObj(); // DebugN(\">>_recipeObj_>\"); // for(int i=1;i<=dynlen(recipeObj);i++) DebugN(\">\"+i+\" \",recipeObj[i]);return; fwConfigurationDB_storeRecipeInCache(recipeObj, RecipeName.text , hierarchyType, exceptionInfo); if (dynlen(exceptionInfo)) {fwExceptionHandling_display(exceptionInfo); return;} this.enabled = true; }" 0 E E E 13 34 "EditObj" "" 1 655.384615384615 1322 E E E 1 E 1 E N "_ButtonText" E N "_Button" E E E E 23 0 0 0 0 0 E E E 0 1 LANG:1 0 0 1 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 0 "" 438 608 582 642 T 1 LANG:1 8 Edit Obj "main(){ this.enabled = false; dyn_dyn_mixed recipeObj = __createRecipeObj(); fwConfigurationDB_editRecipe( recipeObj); __dataFromRecipeObj(recipeObj); this.enabled = false; }" 0 E E E 13 35 "SetToHardware" "" 1 841 1603 E E E 1 E 1 E N "_ButtonText" E N "_Button" E E E E 24 0 0 0 0 0 E E E 0 1 LANG:1 0 0 1 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 0 "" 293 608 437 642 T 1 LANG:1 15 Set To Hardware "main(){ dyn_string exceptionInfo; string hierarchyType=fwDevice_LOGICAL; this.enabled = false; dyn_dyn_mixed recipeObj = __createRecipeObj(); dyn_string deviceList; dyn_dyn_mixed recipe2; fwConfigurationDB_saveRecipeToCache( recipeObj, hierarchyType, RecipeName.text, exceptionInfo); fwConfigurationDB_loadRecipeFromCache( RecipeName.text, deviceList, hierarchyType, recipe2, exceptionInfo); fwConfigurationDB_applyRecipe( recipe2, hierarchyType, exceptionInfo); if (dynlen(exceptionInfo)) {fwExceptionHandling_display(exceptionInfo); return;} this.enabled = true; }" 0 E E E 22 36 "FsmTypes" "" 1 705 171.95652173913 E E E 1 E 1 E N "dcsUiDisplayFore" E N "dcsUiDisplayBack" E E E E 25 0 0 0 0 0 E E E 0 1 LANG:1 0 0 1 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 0 "" 103 83 242 112 0 E "main() { // read Settings systems __readSettingsByType(FsmTypes.text); __tableSetHeaders(dsCoords,dsItemsDescription,diItemsTypes); FsmStates.items = dcsCaen_getFSMCaenStates(FsmTypes.text); FsmStates.selectedPos = 1; RecipeName.text = FsmDomains.text + \"/\" + FsmTypes.text + \"/\" +FsmStates.text; }" 0 E 0 0 22 40 "SettingsList" "" 1 90 562 E E E 1 E 1 E N "_WindowText" E N "_Window" E E E E 29 0 0 0 0 0 E E E 0 1 LANG:1 0 0 1 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 0 "" 88 560 212 587 0 E E E 0 0 14 45 "NewValue" "" 1 505 562 E E E 1 E 1 E N "_WindowText" E N "_Window" E E E E 34 0 0 0 0 0 E E E 0 1 LANG:1 0 0 1 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 0 "" 503 560 645 587 3 "0s" 0 0 0 0 0 -1 E E E 13 46 "ChangeAll" "" 1 655 560 E E E 1 E 1 E N "_ButtonText" E N "_Button" E E E E 35 0 0 0 0 0 E E E 0 1 LANG:1 0 0 1 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 0 "" 653 558 737 587 T 1 LANG:1 6 --> GO "main() { int n; int nRows = dynlen(logicNames); dyn_dyn_mixed tableData; dyn_string currLine; int nLines = 0; dyn_dyn_string lines; this.enabled = false; for(n = 0 ; n < nRows; n++ ){ getValue(\"ChannelTable\", \"getLineN\", n, currLine); // gets the current line if (__isCoord(currLine)) { __lineChangeSetting( SettingsList.text, NewValue.text, currLine); // changes the setting for this line //DebugN(\">\", n, currLine, __isCoord(currLine) ? \"vero\":\"falso\" ); __lineReplaceSettings( n, currLine); } } this.enabled = true; } bool __isCoord(dyn_string currLine){ if (currLine[CoordList.selectedPos +1] == CoordValue.text ) return true; else return false; } void __lineReplaceSettings(int n, dyn_string currline) { int m = dynlen(currline); int i; for(i = 1 ; i < m ; i++ ){ setValue(\"ChannelTable\",\"cellValueRC\",n,\"arg\"+i,currline[i+1]); } }" 0 E E E 13 48 "Close" "" 1 905 610 E E E 1 E 1 E N "_ButtonText" E N "_Button" E E E E 36 0 0 0 0 0 E E E 0 1 LANG:1 0 0 1 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 0 "" 903 608 1018 644 T 1 LANG:1 5 Close "main() { //close the current panel PanelOff(); }" 0 E E E 22 67 "CoordList" "" 1 382.1875 1035 E E E 1 E 1 E N "_WindowText" E N "_Window" E E E E 45 0 0 0 0 0 E E E 0 1 LANG:1 0 0 1 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 0 "" 258 560 347 587 0 "main() { // Keep the Coordinates descriptions CoordList.items = dcsCaenDetector_getCoordTypes(); CoordList.selectedPos = 1; }" 0 E E 0 0 14 70 "CoordValue" "" 1 370 562 E E E 1 E 1 E N "_WindowText" E N "_Window" E E E E 48 0 0 0 0 0 E E E 0 1 LANG:1 0 0 1 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 0 "" 368 560 462 587 3 "0s" 0 0 0 0 0 -1 E E E 6 83 "RECTANGLE1" "" 1 0 0 E E E 1 E 1 E N {0,0,0} E N "alarmKamQuit" E E E E 50 0 0 0 0 0 E E E 2 1 LANG:1 0 1 "dashclr"N "_Transparent" E E 0 1 1 2 1 E 0.8 0 1 0 0 2 1 0 "pictures/logospd2_clean.GIF" 4294967295 E 0 0 75 45 2 84 "PRIMITIVE_TEXT5" "" 1 -64 -44 E E E 1 E 1 E N "dcsUiTitleFore" E N "dcsUiTitleBack" E E E E 52 0 0 0 0 0 E E E 0 1 LANG:1 0 1 "dashclr"N "_Transparent" E E 0 1 1 2 1 E U 1 E 70 5 506 21 0 2 2 "0s" 0 0 0 65 0 0 70 5 1 1 LANG:1 87 -*-Arial-bold-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,758,0,0,0,0,0,0,0,0,Arial 0 "" 1 LANG:1 40 ALICE DCS - CAEN FSM DOMAIN Recipe Table 2 85 "PRIMITIVE_TEXT2" "" 1 10 35 E E E 1 E 1 E N "dcsUiLabelFore" E N "dcsUiLabelBack" E E E E 54 0 0 0 0 0 E E E 0 1 LANG:1 0 1 "dashclr"N "_Transparent" E E 0 1 1 2 1 E U 1 E 10 57 100 77 0 2 2 "0s" 0 0 0 64 0 0 10 57 1 1 LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-15-*-100-100-*-*-iso8859-1|-15,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg 0 "" 1 LANG:1 10 FSM DOMAIN 2 86 "PRIMITIVE_TEXT6" "" 1 10 35 E E E 1 E 1 E N "dcsUiLabelFore" E N "dcsUiLabelBack" E E E E 56 0 0 0 0 0 E E E 0 1 LANG:1 0 1 "dashclr"N "_Transparent" E E 0 1 1 2 1 E U 1 E 10 87 100 107 0 2 2 "0s" 0 0 0 64 0 0 10 87 1 1 LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-15-*-100-100-*-*-iso8859-1|-15,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg 0 "" 1 LANG:1 10 CHAN. TYPE 2 87 "PRIMITIVE_TEXT7" "" 1 10 35 E E E 1 E 1 E N "dcsUiLabelFore" E N "dcsUiLabelBack" E E E E 58 0 0 0 0 0 E E E 0 1 LANG:1 0 1 "dashclr"N "_Transparent" E E 0 1 1 2 1 E U 1 E 10 117 100 137 0 2 2 "0s" 0 0 0 64 0 0 10 117 1 1 LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-15-*-100-100-*-*-iso8859-1|-15,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg 0 "" 1 LANG:1 5 STATE 2 88 "PRIMITIVE_TEXT8" "" 1 10 35 E E E 1 E 1 E N "dcsUiLabelFore" E N "dcsUiLabelBack" E E E E 60 0 0 0 0 0 E E E 0 1 LANG:1 0 1 "dashclr"N "_Transparent" E E 0 1 1 2 1 E U 1 E 10 147 100 167 0 2 2 "0s" 0 0 0 64 0 0 10 147 1 1 LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-15-*-100-100-*-*-iso8859-1|-15,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg 0 "" 1 LANG:1 6 RECIPE 22 89 "FsmDomains" "" 1 105 55 E E E 1 E 1 E N "dcsUiDisplayFore" E N "dcsUiDisplayBack" E E E E 62 0 0 0 0 0 E E E 0 1 LANG:1 0 0 1 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 0 "" 103 53 457 82 0 E "main() { RecipeName.text = FsmDomains.text + \"/\"+ FsmTypes.text + \"/\" + FsmStates.text; }" 0 E 0 0 30 90 "FRAME1" "" 1 5 483 E E E 1 E 1 E N "_WindowText" E N {0,0,0} E E E E 63 0 0 0 0 0 E E E 1 1 LANG:1 0 1 "dashclr"N "_Transparent" E E 0 0 1 0 1 E 0.973684210526316 0 0.573170731707317 0.131578947368421 268.158536585366 0 E 5 483 766 566 1 LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-12-*-100-100-*-*-iso8859-1|-12,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg 0 "" 1 LANG:1 14 COLUMN SETTING 13 91 "PUSH_BUTTON1" "" 1 19.875 960 E E E 1 E 1 E N "_ButtonText" E N "_Button" E E E E 64 0 0 0 0 0 E E E 0 1 LANG:1 0 0 1 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 0 "" 3 608 147 642 T 1 LANG:1 13 Reload Recipe "main(){ this.enabled = false; __loadRecipe(FsmDomains.text,FsmTypes.text,FsmStates.text ); highLightCurrLine(); this.enabled = true; }" 0 E E E 13 110 "PUSH_BUTTON2" "" 1 925.384615384615 1322 E E E 1 E 1 E N "_ButtonText" E N "_Button" E E E E 66 0 0 0 0 0 E E E 0 1 LANG:1 0 0 1 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 0 "" 708 608 852 642 T 1 LANG:1 13 Delete Recipe "main(){ dyn_string exceptionInfo; string hierarchyType=fwDevice_LOGICAL; this.enabled = false; fwConfigurationDB_dropRecipeInCache(RecipeName.text, hierarchyType, exceptionInfo); this.enabled = true; }" 0 E E E 13 129 "PUSH_BUTTON3" "" 1 1106.92307692308 1247 E E E 1 E 1 E N "_ButtonText" E N "_Button" E E E E 68 0 0 0 0 0 E E E 0 1 LANG:1 0 0 1 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 0 "" 828 533 1012 567 T 1 LANG:1 25 Open Channel Recipe Table "main(){ int x,y; dyn_string currLine; string device; this.enabled = false; getValue(\"ChannelTable\",\"currentCell\", y,x); getValue(\"ChannelTable\", \"getLineN\", y, currLine); device = dpAliasToName(currLine[1]); device = substr(device,0,strlen(device)-1); EP_childPanelOn( FsmDomains.text, device ); } EP_childPanelOn(string s1,string s2) { dyn_float retf; dyn_string rets; ChildPanelOnCentralModalReturn(\"dcsCaen/spdCaenChanRecipeTable.pnl\", \"dcs CAEN Channel Recipes Table\", makeDynString(\"$device:\" + s2, \"$domain:\" + s1), retf, rets); __loadRecipe(FsmDomains.text,FsmTypes.text,FsmStates.text ); highLightCurrLine(); this.enabled = true; } // SimpleCtrlScript {EP_childPanelOn} // Function {ChildPanelOnCentral} // File {dcsCaen/dcsCaenChanRecipeTable.pnl} // Panel {ChannelRecipeTable} // Parent {} // Module {} // OffsetX {0} // OffsetY {0} // PanelPara1 {$device:$device} // PanelPara2 {$domain:$domain} // SimpleCtrlScriptEnd {EP_childPanelOn} " 0 E E E 1 130 2 "" 31 0 1 131 2 "" 21 0 1 132 2 "" 22 0 1 133 2 "" 23 0 1 134 2 "" 24 0 1 135 2 "" 25 0 1 136 2 "" 26 1 "message" 1 1 "main() { }" 0 0 1 137 2 "" 27 0 1 138 2 "" 28 0 1 139 2 "" 29 0 1 140 2 "" 30 0 1 141 2 "" 33 1 "message" 1 1 "main() { }" 0 0 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 0 3 2 "PANEL_REF3" "spdLocators/SectorImage_Xsmall.pnl" 1116 155 T 69 1 0 1 -40 0 2 "$Show2dImg""true" "$ShowChannel""true" 0