Commit e7aee8fa authored by Gino Tosti's avatar Gino Tosti
Browse files

added listener on change

parent 71afde90
Loading
Loading
Loading
Loading
+22 −1
Original line number Diff line number Diff line
@@ -262,6 +262,12 @@ public class ${Assembly}BaseImpl extends TCSHardwareDeviceImpl implements ${Asse
#set $type=$x.GetSheet["OPC UA Data type"][$idx].upper()
		try {
			$x.GetSheet["Short name"][$idx] = baciH.createRO${y[$type][0]}Prop("$x.GetSheet["Short name"][$idx]","$x.GetSheet["OPC_UA node"][$idx]");

#if str($x.GetSheet["Alarm high"][$idx]) !="nan" and str($x.GetSheet["Alarm high"][$idx]).strip() !="NA" and str($x.GetSheet["Alarm high"][$idx]).strip() !="" and $y[$type][1] != "S"
#if str($x.GetSheet["Alarm high"][$idx]) !="nan" and str($x.GetSheet["Alarm high"][$idx]).strip() !="NA" and str($x.GetSheet["Alarm high"][$idx]).strip() !="" and $y[$type][1] != "S"
			baciH.addValueListener("$x.GetSheet["Short name"][$idx]",$x.GetSheet["Sampling Interval (s)"][$idx],$x.GetSheet["Sampling Interval (s)"][$idx]);
  #end if
 #end if
		} catch (IllegalArgumentException|PropertyInitializationFailed e){
			m_logger.log(Level.SEVERE, "Exception in creating Property:"+"$x.GetSheet["Short name"][$idx]"+":"+e.getMessage());
		}		
@@ -269,6 +275,11 @@ public class ${Assembly}BaseImpl extends TCSHardwareDeviceImpl implements ${Asse
#set $type=$x.GetSheet["OPC UA Data type"][$idx].upper()
		try {
			$x.GetSheet["Short name"][$idx] = baciH.createRO${y[$type][0]}Prop("$x.GetSheet["Short name"][$idx]","$x.GetSheet["OPC_UA node"][$idx]");
#if str($x.GetSheet["Alarm high"][$idx]) !="nan" and str($x.GetSheet["Alarm high"][$idx]).strip() !="NA" and str($x.GetSheet["Alarm high"][$idx]).strip() !="" and $y[$type][1] != "S"
#if str($x.GetSheet["Alarm high"][$idx]) !="nan" and str($x.GetSheet["Alarm high"][$idx]).strip() !="NA" and str($x.GetSheet["Alarm high"][$idx]).strip() !="" and $y[$type][1] != "S"
			baciH.addValueListener("$x.GetSheet["Short name"][$idx]",$x.GetSheet["Sampling Interval (s)"][$idx],$x.GetSheet["Sampling Interval (s)"][$idx]);
  #end if
 #end if
		} catch (IllegalArgumentException|PropertyInitializationFailed e){
			m_logger.log(Level.SEVERE, "Exception in creating Property:"+"$x.GetSheet["Short name"][$idx]"+":"+e.getMessage());
		}
@@ -276,6 +287,11 @@ public class ${Assembly}BaseImpl extends TCSHardwareDeviceImpl implements ${Asse
#set $type=$x.GetSheet["OPC UA Data type"][$idx].upper()
		try {
			$x.GetSheet["Short name"][$idx] = baciH.createRO${y[$type][0]}Prop("$x.GetSheet["Short name"][$idx]","$x.GetSheet["OPC_UA node"][$idx]");
#if str($x.GetSheet["Alarm high"][$idx]) !="nan" and str($x.GetSheet["Alarm high"][$idx]).strip() !="NA" and str($x.GetSheet["Alarm high"][$idx]).strip() !="" and $y[$type][1] != "S"
#if str($x.GetSheet["Alarm high"][$idx]) !="nan" and str($x.GetSheet["Alarm high"][$idx]).strip() !="NA" and str($x.GetSheet["Alarm high"][$idx]).strip() !="" and $y[$type][1] != "S"
			baciH.addValueListener("$x.GetSheet["Short name"][$idx]",$x.GetSheet["Sampling Interval (s)"][$idx],$x.GetSheet["Sampling Interval (s)"][$idx]);
  #end if
 #end if
		} catch (IllegalArgumentException|PropertyInitializationFailed e){
			m_logger.log(Level.SEVERE, "Exception in creating Property:"+"$x.GetSheet["Short name"][$idx]"+":"+e.getMessage());
		}
@@ -283,6 +299,11 @@ public class ${Assembly}BaseImpl extends TCSHardwareDeviceImpl implements ${Asse
#set $type=$x.GetSheet["OPC UA Data type"][$idx].upper()
		try {
			$x.GetSheet["Short name"][$idx] = baciH.createRO${y[$type][0]}Prop("$x.GetSheet["Short name"][$idx]","$x.GetSheet["OPC_UA node"][$idx]");
#if str($x.GetSheet["Alarm high"][$idx]) !="nan" and str($x.GetSheet["Alarm high"][$idx]).strip() !="NA" and str($x.GetSheet["Alarm high"][$idx]).strip() !="" and $y[$type][1] != "S"
#if str($x.GetSheet["Alarm high"][$idx]) !="nan" and str($x.GetSheet["Alarm high"][$idx]).strip() !="NA" and str($x.GetSheet["Alarm high"][$idx]).strip() !="" and $y[$type][1] != "S"
			baciH.addValueListener("$x.GetSheet["Short name"][$idx]",$x.GetSheet["Sampling Interval (s)"][$idx],$x.GetSheet["Sampling Interval (s)"][$idx]);
  #end if
 #end if
		} catch (IllegalArgumentException|PropertyInitializationFailed e){
			m_logger.log(Level.SEVERE, "Exception in creating Property:"+"$x.GetSheet["Short name"][$idx]"+":"+e.getMessage());
		}	
@@ -434,7 +455,7 @@ public class ${Assembly}BaseImpl extends TCSHardwareDeviceImpl implements ${Asse
			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();
			throw new IllegalParameterErrorEx();
		}
		
	}