V 10
1
LANG:1 8 HistPlot
PANEL,278 86 984 752 N "_3DFace" 0
"/* Histogram Panel for MoPS
123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456*/
/*===================================-======================================*/
/*                        HISTOGRAM PANEL FOR SCT_DCS                       */
/*-----------------------------------=--------------------------------------*/
/* AUTHORs:        Abdel Abessalam

   DESIGN ISSUEs:  
   MODIF_HISTORY:  27.06.2003 - first version
  ===================================-======================================*/
main()
{
	int index;


	//initialise Histograms: from 01 to 04 
	for(index=1; index<= 4; index++)
	  {		
		setValue(\"Compression0\"+index, \"text\", 600);
	  }
      
}" 0
EE E E 1 -1 -1 0  60 50
"" 0 1
E"
//set the start time for archive enquiry: defaut is yesterday (ie 24h in the part)
setStartTime()
 {
    string local_time_date;
    time yesterday;
    dyn_string string_split;

	//calculate the yesterday time
	setPeriod(yesterday, period(getCurrentTime()) - 24*3600);
	local_time_date = formatTime(\"%H:%M %d/%m/%Y\", yesterday);
	
	string_split = strsplit(local_time_date, \" \");

    setValue(\"yesterday_time\", \"text\", string_split[1]);
    setValue(\"yesterday_date\", \"text\", string_split[2]);
 }
 
//set the end time for archive enquiry: defaut time now!
setEndTime()
 {
    string local_time_date;
    dyn_string string_split;

	local_time_date = formatTime(\"%H:%M %d/%m/%Y\", getCurrentTime());
	
	string_split = strsplit(local_time_date, \" \");

    setValue(\"now_time\", \"text\", string_split[1]);
    setValue(\"now_date\", \"text\", string_split[2]);
 }
 
//this function gets the user input start and end tine for the
//archived data enquiry.. it reads correspondent textfields...etc.
getStartAndEndTime(time& startTime, time& endTime)
 {
   int n_year, n_month, n_day, n_hour, n_minute;
   string yesterday_time, yesterday_date, now_time, now_date;
   dyn_string time_split, date_split;
 
   //get the start time
   getValue(\"yesterday_time\", \"text\", yesterday_time);
   //get hour and munite
   time_split = strsplit(yesterday_time, \":\");
   sscanf(time_split[1], \"%d\", n_hour);
   sscanf(time_split[2], \"%d\", n_minute);
   //get the start date
   getValue(\"yesterday_date\", \"text\", yesterday_date);
   //get day, month and year
   date_split = strsplit(yesterday_date, \"/\");  
   sscanf(date_split[1], \"%d\", n_day);
   sscanf(date_split[2], \"%d\", n_month);
   sscanf(date_split[3], \"%d \", n_year);
   //make start time
   startTime = makeTime(n_year, n_month, n_day, n_hour, n_minute);
   
   //get the end time
   getValue(\"now_time\", \"text\", now_time);
   //get hour and munite
   time_split = strsplit(now_time, \":\");
   sscanf(time_split[1], \"%d\", n_hour);
   sscanf(time_split[2], \"%d\", n_minute);
   //get the end date
   getValue(\"now_date\", \"text\", now_date);
   //get day, month and year
   date_split = strsplit(now_date, \"/\");
   sscanf(date_split[1], \"%d\", n_day);
   sscanf(date_split[2], \"%d\", n_month);
   sscanf(date_split[3], \"%d\", n_year);
   //make end time
   endTime = makeTime(n_year, n_month, n_day, n_hour, n_minute);
 }


getAndPlotArchivedData(string logFileName, time startTime, time endTime, dyn_string dpePaths, dyn_string parametersNames)
{
   int index, sub_index, number_of_items, err;
   int int_time, hours, int_time_milli;
   float time_in_second, timePb, timeTl, timePl;
   dyn_int evt;
   dyn_dyn_float data_array;
   dyn_dyn_time time_array;
   
   file log_file;
 
   //get archived data
   for(index=1; index<=dynlen(dpePaths); index++)
      {
   		 dpGetPeriod(startTime, endTime, -1, dpePaths[index]+\":_original.._value\", 
				                                 data_array[index], time_array[index], evt);
	     // print an warning message if no archived data was found			                        
         if(dynlen(data_array[index])==0)
     	   {
     	      DebugN(\"=========== WARNING: no archived data for \"+ dpePaths[index]+\", try to start the archive!! \");
           }
	  }

/*
   //Debug: to compare times
   for(i=1; i<=dynlen(time_array[2]);	i++)
      {		                           
   		 DebugN(\"==================== time_array[2] = \", time_array[2][i]);
   		 DebugN(\"==================== time_array[1]    = \", time_array[1][i]);
   	  }
*/

   //open archived data log file (for writitng). this is a text file.
   log_file = fopen(logFileName, \"w\"); 
   err=ferror(log_file);
   if(err != 0) DebugN(\"log file not oppend. Error no. \", err, \" occurred\");
   
   //get the number of choosen items, to be used many times later!
   number_of_items = dynlen(dpePaths);

   //print the titles of the columns
   for(index=1; index<=number_of_items; index++)
      {
      	  fprintf(log_file,   \"   Change Time     \"+parametersNames[index]);
      	  if(index != number_of_items) fprintf(log_file, \"   |    \");
      }
   //print return line and one blank line!
   fprintf(log_file, \"\\n\\n\");
   
   for(index=1; index<=dynlen(time_array[1]);	index++)
      {
         for(sub_index=1; sub_index<=number_of_items; sub_index++)//sub_index varies from 1 up to 4
            {
              int_time = period(time_array[sub_index][index]);
              sscanf(formatTime(\"%H \", time_array[sub_index][index], \"%04d\"), \"%d %d\", hours, int_time_milli);
              time_in_second = int_time + int_time_milli / 1000.0 ;
              
              fprintf(log_file, \"%16.3f   %7.3f\", time_in_second, data_array[sub_index][index]);
              if(sub_index != number_of_items) fprintf(log_file, \"     |    \");
            }
         //print return line
         fprintf(log_file, \"\\n\");
      }
   //close log file
   fclose(log_file); 
   
   //plot archived data as curvre: data against time
   for(index=1; index<=number_of_items;	index++)
      {
	     plotY_vs_Time(index, parametersNames[index], data_array[index], time_array[index]);
	  }
}

//this function draw a cruve, it uses other function. 
drawCurve(int curve)
{
	string dpeName, parameterName;
	time startTime, endTime;
	dyn_float Y_array;
	dyn_string paths_split;
	dyn_time  X_array;

	
	//set red color: script is running
    setValue(\"\", \"backCol\", \"red\");

    //get the start and end enquiry time
    //this function is defined te general part
    getStartAndEndTime(startTime, endTime);
 
    // get the name selected from in the comboxes
    getValue(\"dpePaths\", \"text\", dpeName);
    if(dpeName == \"All\")
      {
         DebugN(\"============= Please, Choose a Parameter !!\");
         //set normal color: script finished
         setValue(\"\",\"backCol\",\"{204,204,102}\");
         return;
      }
      
	dpGetPeriod(startTime, endTime, -1, dpeName+\":_online.._value\", Y_array, X_array);
	// print a warning message if no archived data was found			                        
    if(dynlen(Y_array)==0)
      {
     	 DebugN(\"=========== WARNING: no archived data for \"+ dpeName +\", try to start the archive!! \");
      }
    
    //take the name of the parameter, ie the name after the last dot
    //remember that the format is (for example): Liquid.paraName
      	 paths_split = strsplit(dpeName, \".\");
      	 parameterName = paths_split[dynlen(paths_split)];
      
    //plot data vs time
    //this function is defined te general part
	plotY_vs_Time(curve, parameterName, Y_array, X_array);
	
	//set normal color: script finished
    setValue(\"\",\"backCol\",\"{204,204,102}\");
}

//this function plot Y against time. a time compression factor can be used, all the data in time are sum up and 
//normalized
plotY_vs_Time(int curve_index, string dpeName, dyn_float Y_array, dyn_time X_array)
 {
	int index, number_of_bins, x_bin, x_compression;
	int time_min, time_max;
	float sum;
	float x_step, y_step, x_max, x_min, y_max, y_min, data_mean, data_RMS;
	string Entries, Nb_bins, Mean, RMS, Xmin, Xmax, Ymax, Ymin, local_time;
	time timeNow, timePast;
	
	dyn_int evt;
	dyn_float y_coordinate, normalisation, x_coordinate, X, Y, data_square_array;
 	dyn_string statBox;
 	
    //get the curve graphical object
	shape curve = getShape(\"Curve0\"+curve_index);
	shape stat = getShape(\"StatBox0\"+curve_index);
	shape compression = getShape(\"Compression0\"+curve_index);
	
	//set the Curve label
	setValue(\"Label0\"+curve_index, \"text\", dpeName);
	
    //get the X compression time: the mean of data falling in this time is take Y
    getValue(compression, \"text\", x_compression);

 	//some intitialisation
 	x_max = 0;
 	y_max = 0;
		
	//take the square for later RMS calculation
	for(index=1; index<=dynlen(Y_array); index++)
		{
			data_square_array[index] = Y_array[index]*Y_array[index];
		}
	//calculate data mean for later use (in statistique box)
	data_mean = dynAvg(Y_array);
	
	//find the maximum and minimum 
	// I assume that X_array is oredred in incresing time
	time_max = period(X_array[dynlen(X_array)]);
	time_min = period(X_array[1]);

	//how many bins are expected
	number_of_bins = (time_max - time_min)/x_compression + 1; //take integer part + 1
	//initialise the y_coordinate to zero and the X coordinate to the defined binning
	for(index=1; index<=number_of_bins+2; index++) // add 2 bins (1 underflow bins and 1 overflow)
		{
			dynAppend(y_coordinate, 0.0);
			dynAppend(normalisation, 0.0);
			dynAppend(x_coordinate, 0 + (index-1)*x_compression); 
		}
		
	//fill the y_coordinate
	x_bin = 1 + 1; // underflow bin!

	for(index=1; index<=dynlen(X_array); index++)
		{
			//caluculate in which bin the actual value goes
			if(period(X_array[index])-time_min > (x_bin-1)*x_compression)
			  {
			  	 x_bin = x_bin + 1;
			  }
			
			//increment the y_coordinate and noramalisation factor of the actual bin
			if(Y_array[index] != 0.0)
			  {
				 y_coordinate[x_bin] = y_coordinate[x_bin] + Y_array[index];
				 normalisation[x_bin] = normalisation[x_bin] + 1;
			  }
		}
	
	//normalisation and finding of Y_min
	y_min = 999999999.9999;
	for(index=1; index<=dynlen(y_coordinate); index++)
		{
			if(normalisation[index] != 0) y_coordinate[index] = y_coordinate[index]/normalisation[index];
			//remark: this is not always the Y minimum, but the one different from zero!
			if(y_coordinate[index]<y_min && y_coordinate[index] != 0.0) y_min = y_coordinate[index];
		}
		
	//y_coordinate box attributes
	sprintf(Entries, \"Entries  %d\", dynlen(X_array));
	sprintf(Nb_bins, \"Nb bins  %d\", dynlen(y_coordinate)-2);//2 overflow bins
	
	sprintf(Mean,    \"Mean     %f\", data_mean);
	//RMS
	data_RMS = dynAvg(data_square_array);
    data_RMS = sqrt(data_RMS - data_mean*data_mean);
    sprintf(RMS,     \"RMS      %f\", data_RMS);
    sprintf(Ymax,    \"Ymax     %f\", dynMax(y_coordinate));
    sprintf(Ymin,    \"Ymin     %f\", y_min);
    setPeriod(timePast, time_min);
    local_time = formatTime(\"%H:%M:%S %d/%m/%Y\", timePast);
    sprintf(Xmin,    \"Xmin     %s\", local_time);
    setPeriod(timeNow, time_max);
    local_time = formatTime(\"%H:%M:%S %d/%m/%Y\", timeNow);
    sprintf(Xmax,    \"Xmax     %s\", local_time);
	statBox = makeDynString(Entries, Nb_bins, Mean, RMS, Ymax, Ymin, Xmin, Xmax); 
	setValue(stat, \"items\", statBox);
	
	//clear the data array. may be huge!!
	dynClear(Y_array);

	//calculate the Y spep
	y_max = dynMax(y_coordinate);
	y_step = 1;
	//if(y_max>5) y_step = y_max/5;
	
	// Y-axis coordinates stuff
	setValue(curve, \"yOrigin\", BAR_BOTTOM);
	setValue(curve, \"yCenter\", 0);
	setValue(curve, \"yRange\",  y_max+y_step);
	//setValue(curve, \"yStep\",   y_step);
	setValue(curve, \"yPrec\",   0);
	setValue(curve, \"yGrid\",   FALSE);

	x_max = dynMax(x_coordinate);
	x_min = dynMin(x_coordinate);

	// X-axis coordiantes stuff
	setValue(curve, \"xOrigin\", BAR_LEFT);
	//setValue(curve, \"xStep\",   x_step);
	//setValue(curve, \"xCenter\", x_min-x_step);
	setValue(curve, \"xCenter\", x_min);
	setValue(curve, \"xRange\",  x_max);
	setValue(curve, \"xPrec\",   0);
	setValue(curve, \"xGrid\",   FALSE);
	
	// set the value to the barTrend object
	setValue(curve, \"data\", x_coordinate, y_coordinate);

	// step curve
	setValue(curve, \"connection\", BAR_STEPS);
 	// Fill the area
	setValue(curve, \"fill\", FALSE);
 	// Update bar trend
	curve.flush();
 }
 
//This function match the selected Names in the comboxes to PVSS Addresses                                                                     
getPVSSAddress(string Name05, string Name04, string Name03, string Name02, 
                                                 string Name01, string & dpeName)
 { 
   int    ID, host, node, port, unit, chan, error;
   string line, level05, level04, level03, level02, level01, level00;
   file   conf_file;

   // open channel config file for reading
   conf_file = fopen(\"Cnf_Chan.txt\", \"r\");
   //conf_file = fopen($FilePath+\"/Cnf_Chan.txt\", \"r\");
   error = ferror(conf_file); 
   if(error)
     { 
   	    DebugN(\" LOCAL CONFIG_FILE IS ABSENT, TRYING TO OPEN COMMON CONFIG_FILE \");
        conf_file = fopen(\"C:/SCT_DCS/Configs/Barr/Cnf_Chan.txt\", \"r\");
        error = ferror(conf_file);
     } 
   if(error) 
     {
        DebugN(\"Append_button script: Cnf_Chan.txt has been not opened\"); 
     }    
   
   // skip the first line
   fgets(line, 200 , conf_file);	
   while(feof(conf_file) == 0) // up to the end of file
     {    
        // read one line
        fgets(line, 200 , conf_file); 
        // read the first item in the line
        sscanf(line, \"%d %s %s %s %s %s %s %d %d %d %d %d\", ID, level05, level04,
                                      level03, level02, level01, level00, host, node, port, unit, chan);
        // get rid from some umplesant carracters
        level05 = substr(level05, 1, strlen(level05) - 2);
        level04 = substr(level04, 1, strlen(level04) - 2);
        level03 = substr(level03, 1, strlen(level03) - 2);
        level02 = substr(level02, 1, strlen(level02) - 2);
        level01 = substr(level01, 1, strlen(level01) - 2);
        // compare the input names to the file names and get the PVSS 
        // address when the wanted line found
       if(level05 == Name05) 
         {   
           if(level04 == Name04) 
             {   
               if(level03 == Name03) 
                 {   
                   if(level02 == Name02) 
                     {   
                       if(level01 == Name01) 
                         {   
                           if(unit < 10)
                             {   
                               if(chan < 10)
                                 { 
                                    sprintf(dpeName, \"h%d_n%d_p%d_Unit0%d.Chan0%d.Data\",
                                                                 host, node, port, unit, chan);
                                 } 
                               else
                                 { 
                                    sprintf(dpeName, \"h%d_n%d_p%d_Unit0%d.Chan%d.Data\",
                                                                        host, node, port, unit, chan);
                                 }
                             } 
                           else
                             {   
                               if(chan < 10)
                                 { 
                                    sprintf(dpeName, \"h%d_n%d_p%d_Unit%d.Chan0%d.Data\",
                                                                        host, node, port, unit, chan);
                                 } 
                               else
                                 { 
                                    sprintf(dpeName, \"h%d_n%d_p%d_Unit%d.Chan%d.Data\",
                                                                        host, node, port, unit, chan);
                             }
                         }
                       //DebugN(\"============================dpeName = \", dpeName);
                       // stop the search
                       break;
                    }
                 }
              }
           }
        }
     } // end of while(...)
   fclose(conf_file);
 }" 0
 2
"CBRef""0"
"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
6 213
"Border1"
""
1 11 477 E E E 1 E 1 E N {0,0,0} E N {51,102,153} E E
 E E
103 0 0 0 0 0
EE E
0
1
LANG:1 21 Vers.01.1, 27-06-2003
1
"dashclr"N "_Transparent"
E E 0 1 1 0 1 E U  1 E 11 0 980 709
27 916
"Curve03"
""
1 881 -1091 E E E 1 E 1 E N {0,255,255} E N {0,0,0} E E
 E E
793 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 119 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,49,Courier New
0 ""
8 418 462 692
2 0 50 10 0 "%H:%M" 1 1
LANG:1 118 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,0,0,0,0,Courier New
0 ""
0 2 1 1 0 1 N {153,153,153}
0 0 50 10 0 "%H:%M" 1 1
LANG:1 118 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,0,0,0,0,Courier New
0 ""
0 2 1 1 0 1 N {153,153,153}
1 1 1 0 1
LANG:1 118 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,0,0,0,0,Courier New
0 ""
2 1 1 0 1 N {153,153,153}
0 1 1 0 1 N {153,153,153}
5 0 0 100 0 N {0,0,0} N {0,0,0} N {255,0,0} 1
1 0 1 1 0 1 N {255,255,0} 1 E
27 915
"Curve04"
""
1 1392 -1091 E E E 1 E 1 E N {0,255,255} E N {0,0,0} E E
 E E
792 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 119 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,49,Courier New
0 ""
518 418 972 692
2 0 50 10 0 "%H:%M" 1 1
LANG:1 118 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,0,0,0,0,Courier New
0 ""
0 2 1 1 0 1 N {153,153,153}
0 0 50 10 0 "%H:%M" 1 1
LANG:1 118 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,0,0,0,0,Courier New
0 ""
0 2 1 1 0 1 N {153,153,153}
1 1 1 0 1
LANG:1 118 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,0,0,0,0,Courier New
0 ""
2 1 1 0 1 N {153,153,153}
0 1 1 0 1 N {153,153,153}
5 0 0 100 0 N {0,0,0} N {0,0,0} N {255,0,0} 1
1 0 1 1 0 1 N {255,255,0} 1 E
27 917
"Curve02"
""
1 1392 -1405 E E E 1 E 1 E N {0,255,255} E N {0,0,0} E E
 E E
794 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 119 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,49,Courier New
0 ""
518 103 972 377
2 0 50 10 0 "%H:%M" 1 1
LANG:1 118 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,0,0,0,0,Courier New
0 ""
0 2 1 1 0 1 N {153,153,153}
0 0 50 10 0 "%H:%M" 1 1
LANG:1 118 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,0,0,0,0,Courier New
0 ""
0 2 1 1 0 1 N {153,153,153}
1 1 1 0 1
LANG:1 118 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,0,0,0,0,Courier New
0 ""
2 1 1 0 1 N {153,153,153}
0 1 1 0 1 N {153,153,153}
5 0 0 100 0 N {0,0,0} N {0,0,0} N {255,0,0} 1
1 0 1 1 0 1 N {255,255,0} 1 E
27 823
"Curve01"
""
1 902 -1291 E E E 1 E 1 E N {0,255,255} E N {0,0,0} E E
 E E
704 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 119 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,49,Courier New
0 ""
8 103 462 377
2 0 50 10 0 "%H:%M" 1 1
LANG:1 118 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,0,0,0,0,Courier New
0 ""
0 2 1 1 0 1 N {153,153,153}
0 0 50 10 0 "%H:%M" 1 1
LANG:1 118 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,0,0,0,0,Courier New
0 ""
0 2 1 1 0 1 N {153,153,153}
1 1 1 0 1
LANG:1 118 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,0,0,0,0,Courier New
0 ""
2 1 1 0 1 N {153,153,153}
0 1 1 0 1 N {153,153,153}
5 0 0 100 0 N {0,0,0} N {0,0,0} N {255,0,0} 1
1 0 1 1 0 1 N {255,255,0} 1 E
13 574
"Button2"
""
1 -20 0 E E E 1 E 1 E N "_Window" E N {51,102,153} E E
 E E
461 0 0 0 0 0
EE E
1
1
LANG:1 0 
0
1
LANG:1 119 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,49,Courier New
0 ""
-22 -2 2 652
T 
1
LANG:1 0 
E E E E
13 790
"Stat04"
""
1 876 394 E E E 1 E 1 E N {0,51,255} E N {204,204,102} E E
 E E
673 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 117 -microsoft windows-Courier New-bold-r-normal-*-*-120-100-100-*-*-iso8859-1|-13,0,0,0,700,0,0,0,0,3,2,1,49,Courier New
0 ""
874 392 972 422
T 
1
LANG:1 10 Statistics
"main()
{
	bool visible;
	getValue(\"StatBox04\", \"visible\", visible);

	if(visible)
		setValue(\"StatBox04\", \"visible\", FALSE);
	else
		setValue(\"StatBox04\", \"visible\", TRUE);
}" 0
 E E E
13 791
"Stat03"
""
1 368 394 E E E 1 E 1 E N {0,51,255} E N {204,204,102} E E
 E E
674 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 117 -microsoft windows-Courier New-bold-r-normal-*-*-120-100-100-*-*-iso8859-1|-13,0,0,0,700,0,0,0,0,3,2,1,49,Courier New
0 ""
366 392 463 422
T 
1
LANG:1 10 Statistics
"main()
{
	bool visible;
	getValue(\"StatBox03\", \"visible\", visible);

	if(visible)
		setValue(\"StatBox03\", \"visible\", FALSE);
	else
		setValue(\"StatBox03\", \"visible\", TRUE);
}" 0
 E E E
13 792
"Stat02"
""
1 876 80 E E E 1 E 1 E N {0,51,255} E N {204,204,102} E E
 E E
675 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 117 -microsoft windows-Courier New-bold-r-normal-*-*-120-100-100-*-*-iso8859-1|-13,0,0,0,700,0,0,0,0,3,2,1,49,Courier New
0 ""
874 78 972 108
T 
1
LANG:1 10 Statistics
"main()
{
	bool visible;
	getValue(\"StatBox02\", \"visible\", visible);

	if(visible)
		setValue(\"StatBox02\", \"visible\", FALSE);
	else
		setValue(\"StatBox02\", \"visible\", TRUE);
}" 0
 E E E
13 793
"Stat01"
""
1 368 80 E E E 1 E 1 E N {0,51,255} E N {204,204,102} E E
 E E
676 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 117 -microsoft windows-Courier New-bold-r-normal-*-*-120-100-100-*-*-iso8859-1|-13,0,0,0,700,0,0,0,0,3,2,1,49,Courier New
0 ""
366 78 463 108
T 
1
LANG:1 10 Statistics
"main()
{
	bool visible;
	getValue(\"StatBox01\", \"visible\", visible);

	if(visible)
		setValue(\"StatBox01\", \"visible\", FALSE);
	else
		setValue(\"StatBox01\", \"visible\", TRUE);
}" 0
 E E E
17 814
"StatBox01"
""
1 180 109 E E E 1 E 0 E N {0,255,255} E N {102,102,102} E E
 E E
696 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 109 -microsoft windows-Courier-bold-r-normal-*-*-100-100-100-*-*-iso8859-1|-13,0,0,0,700,0,0,0,0,1,2,1,49,Courier
0 ""
178 107 460 234
1
1
LANG:1 17 press Go first !!
 0
E
E
E

3 1
17 815
"StatBox02"
""
1 703 109 E E E 1 E 0 E N {0,255,255} E N {102,102,102} E E
 E E
697 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 109 -microsoft windows-Courier-bold-r-normal-*-*-100-100-100-*-*-iso8859-1|-13,0,0,0,700,0,0,0,0,1,2,1,49,Courier
0 ""
701 107 970 234
1
1
LANG:1 17 press Go first !!
 0
E
E
E

3 1
17 817
"StatBox03"
""
1 179 424 E E E 1 E 0 E N {0,255,255} E N {102,102,102} E E
 E E
699 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 109 -microsoft windows-Courier-bold-r-normal-*-*-100-100-100-*-*-iso8859-1|-13,0,0,0,700,0,0,0,0,1,2,1,49,Courier
0 ""
177 422 460 549
1
1
LANG:1 17 press Go first !!
 0
E
E
E

3 1
17 818
"StatBox04"
""
1 704 424 E E E 1 E 0 E N {0,255,255} E N {102,102,102} E E
 E E
700 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 109 -microsoft windows-Courier-bold-r-normal-*-*-100-100-100-*-*-iso8859-1|-13,0,0,0,700,0,0,0,0,1,2,1,49,Courier
0 ""
702 422 970 549
1
1
LANG:1 17 press Go first !!
 0
E
E
E

3 1
13 830
"Button3"
""
1 0 0 E E E 1 E 1 E N {51,102,153} E N {51,102,153} E E
 E E
711 0 0 0 0 0
EE E
1
1
LANG:1 0 
0
1
LANG:1 119 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,49,Courier New
0 ""
-2 -2 13 712
T 
1
LANG:1 0 
E E E E
13 769
"Button16"
""
1 465 0 E E E 1 E 1 E N {51,102,153} E N {51,102,153} E E
 E E
653 0 0 0 0 0
EE E
1
1
LANG:1 0 
0
1
LANG:1 119 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,49,Courier New
0 ""
463 -2 497 692
T 
1
LANG:1 0 
E E E E
13 756
"Button56"
""
1 11 80 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E E
642 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
9 78 123 108
T 
1
LANG:1 17 T compression (s)
E E E E
13 853
"Button7"
""
1 325 80 E E E 1 E 1 E N {0,51,255} E N {204,204,102} E E
 E E
732 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 117 -microsoft windows-Courier New-bold-r-normal-*-*-120-100-100-*-*-iso8859-1|-13,0,0,0,700,0,0,0,0,3,2,1,49,Courier New
0 ""
323 78 370 108
T 
1
LANG:1 2 Go
"/* Histogram_1 'Go' for MoPS
123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456*/

main()
{
	//draw the first curve
	//this function is defined in the general part
	drawCurve(1);
}" 0
 E E E
13 858
"Button6"
""
1 832 80 E E E 1 E 1 E N {51,0,255} E N {204,204,102} E E
 E E
737 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 117 -microsoft windows-Courier New-bold-r-normal-*-*-120-100-100-*-*-iso8859-1|-13,0,0,0,700,0,0,0,0,3,2,1,49,Courier New
0 ""
830 78 878 108
T 
1
LANG:1 2 Go
"/* Histogram_2 'Go' for MoPS
123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456*/

main()
{
	//draw the first curve
	//this function is defined in the general part
	drawCurve(2);
 }
//Function Button7_EventClick()" 0
 E E E
13 862
"Button5"
""
1 325 394 E E E 1 E 1 E N {0,51,255} E N {204,204,102} E E
 E E
741 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 117 -microsoft windows-Courier New-bold-r-normal-*-*-120-100-100-*-*-iso8859-1|-13,0,0,0,700,0,0,0,0,3,2,1,49,Courier New
0 ""
323 392 370 422
T 
1
LANG:1 2 Go
"/* Histogram_3 'Go' for MoPS
123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456*/

main()
{
	//draw the first curve
	//this function is defined in the general part
	drawCurve(3);
 }
" 0
 E E E
13 866
"Button1"
""
1 834 395 E E E 1 E 1 E N {0,0,255} E N {204,204,102} E E
 E E
745 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 117 -microsoft windows-Courier New-bold-r-normal-*-*-120-100-100-*-*-iso8859-1|-13,0,0,0,700,0,0,0,0,3,2,1,49,Courier New
0 ""
832 393 878 423
T 
1
LANG:1 2 Go
"/* Histogram_4 'Go' for MoPS
123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456*/

main()
{
	//draw the first curve
	//this function is defined in the general part
	drawCurve(4);
 }
//Function Button7_EventClick()" 0
 E E E
13 867
"Button11"
""
1 505 33 E E E 1 E 1 E N {0,51,255} E N {204,204,102} E E
 E E
746 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
503 31 597 79
T 
1
LANG:1 12 Read Archive
"main()
{
   int index;
   string logFilePath, logFileName;
   time startTime, endTime;
   dyn_string selctionBoxItems, dpePaths, parametersNames;
   dyn_string paths_split;
   
   //set red color: script is running
   setValue(\"\",\"backCol\",\"red\");

   //get the start and end enquiry time
   //this function is defined te general part
   getStartAndEndTime(startTime, endTime);

   //setTime(startTime,2003,11,24);
   //setTime(startTime,2003,11,25);
   logFilePath = getPath(LOG_REL_PATH);
   getValue(\"fileName\", \"text\", logFileName);
   
   //get the choosen dpe paths (names)
   getValue(\"PVSS_Addresses\", \"items\", selctionBoxItems);
   
   if(dynlen(selctionBoxItems) == 2)
     {
     	//for instance, return if the no datpoint elemenet was chosed
     	DebugN(\"======= no item has been choosen! you have to choose at least ome item :-)\");
     	//set normal color: script finished
        setValue(\"\",\"backCol\",\"{204,204,102}\");
        
      	return;
     }
   //we know the format of the lines in \"PVSS_Addresses\" selecton box. we consider only the four
   //last lines. (one may have to see first the format in the selection box!!)
   for(index=3; index<=dynlen(selctionBoxItems); index++)
      {
      	 //take PVSS path
      	 dpePaths[index-2] = selctionBoxItems[index];
      	 //take the name of the parameter, ie the name after the last dot
      	 //remember that the format is (for example): Liquid.paraName
      	 paths_split = strsplit(selctionBoxItems[index], \".\");
      	 parametersNames[index-2] = paths_split[dynlen(paths_split)];
      }

   //call archive function
   //this function is defined te general part
   getAndPlotArchivedData(logFilePath+logFileName, startTime, endTime, dpePaths, parametersNames);

   //set normal color: script finished
   setValue(\"\",\"backCol\",\"{204,204,102}\");
}
" 0
 E E E
13 868
"Button12"
""
1 11 10 E E E 1 E 1 E N {0,51,255} E N {204,204,102} E E
 E E
747 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
9 8 153 40
T 
1
LANG:1 9 Yesterday
"main()
{
   //set the start time for archive enquiry: defaut is yesterday (ie 24h in the part)
   //this function is defined in the general part
   setStartTime();
}" 0
 E E "main()
{
   //set the start time for archive enquiry: defaut is yesterday (ie 24h in the part)
   //this function is defined in the general part
   setStartTime();
}" 0

13 869
"Button13"
""
1 153 10 E E E 1 E 1 E N {0,51,255} E N {204,204,102} E E
 E E
748 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
151 8 295 40
T 
1
LANG:1 3 Now
"main()
{
   //set the end time for archive enquiry: defaut time now!
   //this function is defined in the generqal part
   setEndTime();
}" 0
 E E "main()
{
   //set the end time for archive enquiry: defaut time now!
   //this function is defined in the generqal part
   setEndTime();
}" 0

14 870
"yesterday_time"
""
1 10 39 E E E 1 E 1 E N "_WindowText" E N {204,204,204} E E
 E E
749 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-140-100-100-*-*-iso8859-1|-15,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
8 37 61 66
3 "s" 0 0 0 0 0 0 
E
E
E
13 877
"Button19"
""
1 295 10 E E E 1 E 1 E N {0,51,255} E N {204,204,102} E E
 E E
755 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
293 8 491 40
T 
1
LANG:1 9 File Name
"main()
{
    setValue(\"fileName\", \"text\", \"archived_data_log.txt\");
}" 0
 E E "main()
{
    setValue(\"fileName\", \"text\", \"archived_data_log.txt\");
}" 0

14 878
"fileName"
""
1 293 39 E E E 1 E 1 E N "_WindowText" E N {204,204,204} E E
 E E
756 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
291 37 490 65
3 "s" 0 0 0 0 0 0 
E
E
E
14 882
"Compression01"
""
1 120 79 E E E 1 E 1 E N "_WindowText" E N {204,204,204} E E
 E E
759 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 117 -microsoft windows-Courier New-bold-r-normal-*-*-130-100-100-*-*-iso8859-1|-15,0,0,0,700,0,0,0,0,3,2,1,49,Courier New
0 ""
118 77 206 107
3 "s" 0 0 0 0 0 0 
E
E
E
22 892
"dpePaths"
""
1 600 2 E E E 1 E 1 E N "Schwarz" E N {204,204,204} E E
 E E
769 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-140-100-100-*-*-iso8859-1|-16,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
598 0 954 32
5
1
LANG:1 3 All
 0
1
LANG:1 15 Buffer.Pressure
 0
1
LANG:1 18 Buffer.Temperature
 0
1
LANG:1 15 Liquid.Pressure
 0
1
LANG:1 18 Liquid.Temperature
 0
"main()
{
	dyn_string items_list;
	
    //intialise the choice list
	items_list = makeDynString(\"All\", 
	                           \"Buffer.Pressure\",
							   \"Buffer.Temperature\",
				  	           \"Liquid.Pressure\", 
				  	           \"Liquid.Temperature\");
				  	           
	setValue(\"\", \"items\", items_list);
/*	
	//intialse the PVSS addresses list
	items_list = makeDynString(\"PVSS Addresses:\", 
	                           \" \",
	                           \"Buffer.Pressure\",
							   \"Buffer.Temperature\",
				  	           \"Liquid.Pressure\", 
				  	           \"Liquid.Temperature\");
				  	           
	setValue(\"PVSS_Addresses\", \"items\", items_list);
*/
}" 0

E
E
 0 0
13 900
"Addresses_Ok"
""
1 750 123 E E E 1 E 0 E N {0,51,255} E N {204,204,102} E E
 E E
777 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-140-100-100-*-*-iso8859-1|-16,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
748 121 852 151
T 
1
LANG:1 2 Ok
"/* Hist_1 TempsOK for Barr
123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456*/
main()
{
	string parameter;
	
  //set choice boxes visible
  setValue(\"PVSS_Addresses\", \"visible\", FALSE);
  setValue(\"Addresses_Ok\", \"visible\", FALSE);
  setValue(\"delete_item\", \"visible\", FALSE);
	
}" 0
 E E E
13 901
"Button20"
""
1 520 80 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E E
778 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
518 78 632 108
T 
1
LANG:1 17 T compression (s)
E E E E
14 902
"Compression02"
""
1 630 79 E E E 1 E 1 E N "_WindowText" E N {204,204,204} E E
 E E
779 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 117 -microsoft windows-Courier New-bold-r-normal-*-*-130-100-100-*-*-iso8859-1|-15,0,0,0,700,0,0,0,0,3,2,1,49,Courier New
0 ""
628 77 716 107
3 "s" 0 0 0 0 0 0 
E
E
E
13 903
"Button21"
""
1 11 394 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E E
780 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
9 392 123 422
T 
1
LANG:1 17 T compression (s)
E E E E
14 904
"Compression03"
""
1 121 393 E E E 1 E 1 E N "_WindowText" E N {204,204,204} E E
 E E
781 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 117 -microsoft windows-Courier New-bold-r-normal-*-*-130-100-100-*-*-iso8859-1|-15,0,0,0,700,0,0,0,0,3,2,1,49,Courier New
0 ""
119 391 206 421
3 "s" 0 0 0 0 0 0 
E
E
E
13 905
"Button22"
""
1 520 394 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E E
782 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
518 392 632 422
T 
1
LANG:1 17 T compression (s)
E E E E
14 906
"Compression04"
""
1 630 393 E E E 1 E 1 E N "_WindowText" E N {204,204,204} E E
 E E
783 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 117 -microsoft windows-Courier New-bold-r-normal-*-*-130-100-100-*-*-iso8859-1|-15,0,0,0,700,0,0,0,0,3,2,1,49,Courier New
0 ""
628 391 716 421
3 "s" 0 0 0 0 0 0 
E
E
E
14 907
"yesterday_date"
""
1 60 39 E E E 1 E 1 E N "_WindowText" E N {204,204,204} E E
 E E
784 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-140-100-100-*-*-iso8859-1|-15,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
58 37 151 66
3 "s" 0 0 0 0 0 0 
E
E
E
14 908
"now_time"
""
1 152 38 E E E 1 E 1 E N "_WindowText" E N {204,204,204} E E
 E E
785 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-140-100-100-*-*-iso8859-1|-15,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
150 36 203 65
3 "s" 0 0 0 0 0 0 
E
E
E
14 909
"now_date"
""
1 202 38 E E E 1 E 1 E N "_WindowText" E N {204,204,204} E E
 E E
786 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-140-100-100-*-*-iso8859-1|-15,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
200 36 293 65
3 "s" 0 0 0 0 0 0 
E
E
E
13 918
"delete_item"
""
1 855 123 E E E 1 E 0 E N {0,51,255} E N {204,204,102} E E
 E E
794 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 117 -microsoft windows-Courier New-bold-r-normal-*-*-120-100-100-*-*-iso8859-1|-13,0,0,0,700,0,0,0,0,3,2,1,49,Courier New
0 ""
853 121 957 151
T 
1
LANG:1 11 Delete Item
"/* Histogram_1 'Go' for Barr
123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456*/

main()
{ 
  int    selectedPosition, number_of_items;
  shape PVSS_Addresses;
   
  PVSS_Addresses = getShape(\"PVSS_Addresses\");
  
  //get the selected item
  getValue(PVSS_Addresses, \"selectedPos\", selectedPosition);
  
  if(selectedPosition > 2) //an item is selected
    {
 	   //detelete the selected item
 	   PVSS_Addresses.deletePos(selectedPosition);
    }
  else //no item is selected
    {
       number_of_items = PVSS_Addresses.itemCount();
       //delete the last item
       if(number_of_items > 2) PVSS_Addresses.deletePos(number_of_items);
    }
}
" 0
 E E E
14 921
"Label01"
""
1 205 79 E E E 1 E 1 E N {204,0,0} E N {234,234,234} E E
 E E
797 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 117 -microsoft windows-Courier New-bold-r-normal-*-*-140-100-100-*-*-iso8859-1|-16,0,0,0,700,0,0,0,0,3,2,1,49,Courier New
0 ""
203 77 326 106
3 "s" 0 0 0 0 0 0 
E
E
E
14 926
"Label04"
""
1 714 393 E E E 1 E 1 E N {204,0,0} E N {234,234,234} E E
 E E
802 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 117 -microsoft windows-Courier New-bold-r-normal-*-*-140-100-100-*-*-iso8859-1|-16,0,0,0,700,0,0,0,0,3,2,1,49,Courier New
0 ""
712 391 835 420
3 "s" 0 0 0 0 0 0 
E
E
E
14 927
"Label03"
""
1 205 393 E E E 1 E 1 E N {204,0,0} E N {234,234,234} E E
 E E
803 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 117 -microsoft windows-Courier New-bold-r-normal-*-*-140-100-100-*-*-iso8859-1|-16,0,0,0,700,0,0,0,0,3,2,1,49,Courier New
0 ""
203 391 326 420
3 "s" 0 0 0 0 0 0 
E
E
E
14 928
"Label02"
""
1 711 79 E E E 1 E 1 E N {204,0,0} E N {234,234,234} E E
 E E
804 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 117 -microsoft windows-Courier New-bold-r-normal-*-*-140-100-100-*-*-iso8859-1|-16,0,0,0,700,0,0,0,0,3,2,1,49,Courier New
0 ""
709 77 832 106
3 "s" 0 0 0 0 0 0 
E
E
E
17 898
"PVSS_Addresses"
""
1 600 31 E E E 1 E 0 E N {0,255,255} E N {102,102,102} E E
 E E
775 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 109 -microsoft windows-Courier-bold-r-normal-*-*-100-100-100-*-*-iso8859-1|-13,0,0,0,700,0,0,0,0,1,2,1,49,Courier
0 ""
598 29 956 123
2
1
LANG:1 16 PVSS Addresses: 
 0
1
LANG:1 0 
 0
E
E
E

3 1
13 894
"Button23"
""
1 854 31 E E E 1 E 1 E N {0,51,255} E N {204,204,102} E E
 E E
771 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 117 -microsoft windows-Courier New-bold-r-normal-*-*-120-100-100-*-*-iso8859-1|-13,0,0,0,700,0,0,0,0,3,2,1,49,Courier New
0 ""
852 29 956 59
T 
1
LANG:1 8 Add Item
"/* Histogram_1 'Go' for Barr
123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456*/

main()
{ 
  int    number_of_items;
  string dpePath, systemName;
  dyn_string items_list;
  shape PVSS_Addresses;
   
  // get system name
  systemName = getSystemName();
  
  // get the name selected from in the comboxes
  getValue(\"dpePaths\", \"text\", dpePath);

  
  //set choice boxes visible
  setValue(\"PVSS_Addresses\", \"visible\", TRUE);
  setValue(\"Addresses_Ok\", \"visible\", TRUE);
  setValue(\"delete_item\", \"visible\", TRUE);
  PVSS_Addresses = getShape(\"PVSS_Addresses\");
  
  if(dpePath == \"All\") //no item is selected
    {
	   //delete the existent items
       PVSS_Addresses.deleteAllItems();
       
       //make the new items list
       items_list = makeDynString(\"PVSS Addresses:\", 
                                  \" \",
	                              \"Buffer.Pressure\",
							      \"Buffer.Temperature\",
				  	              \"Liquid.Pressure\", 
				  	              \"Liquid.Temperature\");
	  PVSS_Addresses.items(items_list);
    }    
  else
    {
       //check if there are already four items (maximum allowed here)
       number_of_items = PVSS_Addresses.itemCount(); 

       if(number_of_items == 6) //four items + 2 title lines
         {
            //put the item at the last position
            PVSS_Addresses.replacePos(6, dpePath);
         }
       else
         {
            //append the item at the end of the list
            PVSS_Addresses.appendItem(dpePath);
         }
    }
}
" 0
 E E E
13 919
"show_items"
""
1 750 31 E E E 1 E 1 E N {0,51,255} E N {204,204,102} E E
 E E
795 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 117 -microsoft windows-Courier New-bold-r-normal-*-*-120-100-100-*-*-iso8859-1|-13,0,0,0,700,0,0,0,0,3,2,1,49,Courier New
0 ""
748 29 852 59
T 
1
LANG:1 10 Show Items
"/* Histogram_1 'Go' for Barr
123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456*/

main()
{ 
	bool visible;
	
	getValue(\"PVSS_Addresses\", \"visible\", visible);

	if(visible)
	  {
		 setValue(\"PVSS_Addresses\", \"visible\", FALSE);
		 setValue(\"delete_item\", \"visible\", FALSE);
		 setValue(\"Addresses_Ok\", \"visible\", FALSE);
	  }
	else
	  {
		 setValue(\"PVSS_Addresses\", \"visible\", TRUE); 
		 setValue(\"delete_item\", \"visible\", TRUE); 
		 setValue(\"Addresses_Ok\", \"visible\", TRUE);
	  }
}
" 0
 E E E
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
0