V 10
1
LANG:1 8 (NoName)
PANEL,258 108 548 362 N "_3DFace" 0
EEE E E 1 -1 -1 0  -1 -1
"" 0 1
EE 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
13 0
"Button1"
""
1 140 90 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E E
1 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 ""
138 88 432 152
T 
1
LANG:1 24 get parameters in alerts
"main()
{
   dyn_string parametersInWarn, parametersInAlarm;
   
   
   getChannelParametersInAlert(parametersInWarn, parametersInAlarm);
   DebugN(\"========================1 parametersInWarn = \", parametersInWarn);
   DebugN(\"========================1 parametersInAlarm = \", parametersInAlarm);
   
   //clear array, because there is an append action below!
   dynClear(parametersInWarn);
   dynClear(parametersInAlarm);
   
   getLV_cardParametersInAlert(parametersInWarn, parametersInAlarm);
   DebugN(\"========================2 parametersInWarn = \", parametersInWarn);
   DebugN(\"========================2 parametersInAlarm = \", parametersInAlarm);
}

//get the parameters of a given channel in alerts
getChannelParametersInAlert(dyn_string& parametersInWarn, dyn_string& parametersInAlarm)
{
   int parameter, alarmRange;
   string channelPath;
   
   dyn_string LV_cardParametersNames, channelParametersNames;
	
   channelParametersNames = makeDynString(\"LVch_Vcc\", \"LVps_Vcc\", \"LVretVcc\", \"LVch_Icc\", 
				\"LVch_Vdd\", \"LVps_Vdd\", \"LVretVdd\", \"LVch_Idd\", \"LVchVCSV\", \"LVchVCSI\", 
				\"LVchPINV\", \"LVchPINI\", \"MOch_Tm0\", \"MOch_Tm1\", \"HVchVolt\", \"HVchCurr\");
   
   //form channel path
   //channelPath = $dpSystem+\":Crate\"+$dpCrate+\".Channel\"+$dpChannel;
   channelPath = \"Crate00.Channel00\";
   //find how many  channel parameters are in alerts
   for(parameter=1; parameter<=dynlen(channelParametersNames); parameter++)
      {  
          //get parameter range of the alarm: alrm low, warn low, ok, warn high or alrm high
          dpGet(channelPath+\".\"+channelParametersNames[parameter]
               		          +\".Recv:_alert_hdl.._act_range\", alarmRange);
          //warn ranges
          if(alarmRange==2 || alarmRange==4)
            {
               dynAppend(parametersInWarn, channelParametersNames[parameter]);
            }
          //alrm ranges
          else if(alarmRange==1 || alarmRange==5)
            {
               dynAppend(parametersInAlarm, channelParametersNames[parameter]);
            }
      }
  
}

//get the parameters of a given LV card in alerts
getLV_cardParametersInAlert(dyn_string& parametersInWarn, dyn_string& parametersInAlarm)
{
   int parameter, alarmRange;
   string lvcardPath;
   dyn_string LV_cardParametersNames;
	
   LV_cardParametersNames = makeDynString(\"LVcaTemp\", \"LVcaPowr\");
   
   //form LV card path
   //lvcardPath = $dpSystem+\":Crate\"+$dpCrate+\".LV_card\"+$LV_card;
   lvcardPath = \"Crate00.LV_card00\";
   //find how many  LV card parameters are in alerts
   for(parameter=1; parameter<=dynlen(LV_cardParametersNames); parameter++)
      {  
          //get parameter range of the alarm: alrm low, warn low, ok, warn high or alrm high
          dpGet(lvcardPath+\".\"+LV_cardParametersNames[parameter]
               		          +\".Recv:_alert_hdl.._act_range\", alarmRange);
          //warn ranges
          if(alarmRange==2 || alarmRange==4)
            {
               dynAppend(parametersInWarn, LV_cardParametersNames[parameter]);
            }
          //alrm ranges
          else if(alarmRange==1 || alarmRange==5)
            {
               dynAppend(parametersInAlarm, LV_cardParametersNames[parameter]);
            }
      }
  
}" 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