Commit 71afde90 authored by Gino Tosti's avatar Gino Tosti
Browse files

added check on set input values

parent 347dad64
Loading
Loading
Loading
Loading
+20 −1
Original line number Diff line number Diff line
@@ -416,7 +416,26 @@ public class ${Assembly}BaseImpl extends TCSHardwareDeviceImpl implements ${Asse
	}
	@Override
	public void ${x.SetSheet["Name of command"][$idx]}($($y[$type][4]) arg0) throws IllegalParameterErrorEx,INACTErrorEx {
#if str($x.SetSheet["Alarm high"][$idx]) !="nan" and str($x.SetSheet["Alarm high"][$idx]).strip() !="NA" and str($x.SetSheet["Alarm high"][$idx]).strip() !="" and $y[$type][1] != "S"
   #if $type[0]=="I" or $type[0]=="U"
         	$y[$type][4] maxval=str($x.SetSheet["Alarm high"][$idx]).split(".")[0];
   #else
		$y[$type][4] maxval=$x.SetSheet["Alarm high"][$idx];
  #end if
 #end if
#if str($x.SetSheet["Alarm low"][$idx]).strip() !="nan" and  str($x.SetSheet["Alarm low"][$idx]).strip() !="NA" and  str($x.SetSheet["Alarm low"][$idx]).strip() !="" and $y[$type][1] != "S"
#if $type[0]=="I" or $type[0]=="U" 
		$y[$type][4] minval=str($x.SetSheet["Alarm low"][$idx]).split(".")[0];
#else
		$y[$type][4] minval=$x.SetSheet["Alarm low"][$idx];
#end if
#end if
		if (arg0>=minval && arg0<=maxval){
			baciH.set$(($y[$type][4]).capitalize())ValSync(${x.SetSheet["Short name"][$idx]},arg0);
		} else {
			m_logger.log(Level.SEVERE, "Value outside range for:"+"$x.SetSheet["Short name"][$idx]");
			throws new IllegalParameterErrorEx();
		}
		
	}
#end if
+2 −1
Original line number Diff line number Diff line
@@ -107,8 +107,9 @@
 #else
	units=""
#end if

        min_timer_trig="0"
    #if $y[$type][1] != 's'
    #if $y[$type][1] != "S"
        min_delta_trig="0"
        min_step="1"
    #end if
+41.5 KiB

File added.

No diff preview for this file type.