Newer
Older
/**
* ASTRI - Template based on ALMA Software Templates
* (c) INAF/UNIPG, 2014
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY, without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
* WARNING! DO NOT MODIFY THIS FILE!
* ---------------------------------------------------------
* | This is generated code! Do not modify this file. |
* | Any changes will be lost when the file is re-generated. |
* ---------------------------------------------------------
*
* Generated by: $Author
* Date: $Date
* Description: $Description
*
*/
package ${prefix}.${module}.${Assembly}BaseImpl;
import alma.ACS.ROboolean;
import alma.ACS.ROdouble;
import alma.ACS.ROfloat;
import alma.ACS.ROlong;
import alma.ACS.ROlongLong;
import alma.ACS.ROstring;
import alma.ACS.RWboolean;
import alma.ACS.RWdouble;
import alma.ACS.RWfloat;
import alma.ACS.RWlong;
import alma.ACS.RWlongLong;
import alma.ACS.RWstring;
import alma.ACS.ROdoubleSeq;
import alma.ACS.ROfloatSeq;
import alma.ACS.ROlongSeq;
import alma.ACS.ROstringSeq;
import alma.ACS.RWdoubleSeq;
import alma.ACS.RWfloatSeq;
import alma.ACS.RWlongSeq;
import alma.ACS.ROuLongLong;
import alma.ACS.RWuLongLong;
import alma.ACS.NoSuchCharacteristic;
import alma.ACS.jbaci.PropertyInitializationFailed;
import alma.ACSErr.CompletionHolder;
import alma.acs.component.ComponentLifecycleException;
import alma.JavaContainerError.wrappers.AcsJContainerServicesEx;
import alma.acs.container.ContainerServices;
import alma.maciErrType.wrappers.AcsJComponentCleanUpEx;
import ${prefix}.${module}.${Assembly}BaseOperations;
import ${prefix}.${module}.TCSHardwareDeviceImpl.TCSHardwareDeviceImpl;
import ${prefix}.${module}.TCSHardwareDeviceImpl.PropErrorListener;
import ${prefix}.${module}.TCSHardwareDeviceImpl.ConnectionListener;
import ${prefix}.${module}.TCSHardwareDeviceImpl.baciHelper;
import ${prefix}.${module}.TCSHardwareDevicePackage.tcshwState;
import ${prefix}.TCSControlExceptions.INACTErrorEx;
import ${prefix}.TCSControlExceptions.OPCUAErrorEx;
import ${prefix}.TCSControlExceptions.IllegalParameterErrorEx;
import alma.acs.exceptions.AcsJCompletion;
import alma.acs.exceptions.AcsJException;
import alma.acs.util.UTCUtility;
import com.prosysopc.ua.ServiceException;
import com.prosysopc.ua.StatusException;
import cta.acs.opcua.da.UaClientPool;
import alma.ACSErr.Completion;
import java.io.IOException;
import alma.ACS.jbaci.DataAccess.OnChangeNotSupportedException;
/**
* @author Generated by: $Author
* @Date: $Date
* @Description: $Description
*
*/
public class ${Assembly}BaseImpl extends TCSHardwareDeviceImpl implements ${Assembly}BaseOperations {
// OPC-UA server url key in CDB
private static final String KEY_OPC_URL = "opc_url";
private static final String KEY_SERIAL_NUMBER = "SerialNumber";
private static final String KEY_MONITOR_COLLECTOR = "MonitoringCollectorName";
private String opc_url;
private String serial_number;
private String monitor_collector_name;
#silent L=[]
#for $idx in $range(0,$x.GetSheet["NRows"])
#silent L.append($x.GetSheet["Short name"][$idx])
#if ($x.GetSheet["OPC UA Data type"][$idx]).upper()[-1]==']' ## test for arrays
#set $type=($x.GetSheet["OPC UA Data type"][$idx].upper()).split("[")[0]+"[]"
#else
#set $type=$x.GetSheet["OPC UA Data type"][$idx].upper()
#end if
protected RO$y[$type][0] $x.GetSheet["Short name"][$idx];
#end for
#for $idx in $range(0,$x.SetSheet["NRows"])
#silent L.append($x.SetSheet["Short name"][$idx])
#if ($x.SetSheet["OPC UA Data type"][$idx]).upper()[-1]==']' ## test for arrays
#set $type=($x.SetSheet["OPC UA Data type"][$idx].upper()).split("[")[0]+"[]"
#else
#set $type=$x.SetSheet["OPC UA Data type"][$idx].upper()
#end if
protected RW$y[$type][0] $x.SetSheet["Short name"][$idx];
#end for
#for $idx in $range(0,$x.ModeSheet["NRows"])
#set $name=($x.ModeSheet["OPC_UA node"][$idx].split(";")[1]).split("=")[1].replace(".","_")
#if not $name in L
protected RW$y[$x.ModeSheet["OPC UA Data type"][$idx].upper()][0] $name;
#silent L.append($name)
#end if
#end for
#for $idx in $range(0,$x.CmdSheet["NRows"])
#set $name=($x.CmdSheet["OPC_UA node"][$idx].split(";")[1]).split("=")[1].replace(".","_")
#if not $name in L
protected RW$y[$x.CmdSheet["OPC UA Data type"][$idx].upper()][0] $name;
#silent L.append($name)
#end if
#end for
/*
* ACS Properties and DataAccess
*/
/* (non-Javadoc)
* @see alma.ACS.impl.CharacteristicComponentImpl#initialize(alma.acs.container.ContainerServices)
*/
public void initialize(ContainerServices cs) throws ComponentLifecycleException {
if (cs != null) {
m_logger=cs.getLogger();
configureFromCDB();
connectToDevice(opc_url);
} catch (ComponentLifecycleException e) {
m_logger.info("Error in Calling method: tcshwConfigure():"+e.getMessage());
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
public void cleanUp() throws AcsJComponentCleanUpEx {
baciH.closeConnection();
super.cleanUp();
}
public void connectToDevice(String url) {
if (url!=null) {
baciH.createConnection(url);
if (baciH.isConnected()){
try {
createDataPoints();
} catch (Exception e){
m_logger.log(Level.SEVERE, e.getMessage());
try {
throw new ComponentLifecycleException("Failed to create properties"+e);
} catch (ComponentLifecycleException e1) {
m_logger.log(Level.SEVERE, e1.getMessage());
}
}
}else {
m_logger.log(Level.SEVERE,"failed to connect to"+url);
}
}
}
protected void addConnectionListener(ConnectionListener cL) {
baciH.addConnectionListener(cL);
}
protected void addErrListener(PropErrorListener el) {
baciH.addErrorListener(el);
}
private void configureFromCDB() throws ComponentLifecycleException {
try {
monitor_collector_name = loadFromCDB(KEY_MONITOR_COLLECTOR);
if(!monitor_collector_name.equals("TDB")){
setMonitoringCollectorName(monitor_collector_name);
}else{
m_logger.log(Level.SEVERE, "MONITOR_COLLECTOR_NAME is not defined in CDB ");
throw new ComponentLifecycleException();
}
} catch (NoSuchCharacteristic e) {
m_logger.log(Level.SEVERE, "MONITOR_COLLECTOR_NAME found in CDB "+e);
}
try {
serial_number = loadFromCDB(KEY_SERIAL_NUMBER);
setSerialNumber(serial_number);
} catch (NoSuchCharacteristic e) {
m_logger.log(Level.SEVERE, "No SERIAL NUMBER found in CDB "+e);
}
try {
this.opc_url = loadFromCDB(KEY_OPC_URL);
} catch (NoSuchCharacteristic e) {
m_logger.log(Level.SEVERE, "No OPC-UA url found in CDB "+e);
}
public String getOpc_url() {
return opc_url;
}
public void setOpc_url(String opc_url) {
this.opc_url = opc_url;
}
public String getSerial_number() {
return serial_number;
}
public void setSerial_number(String serial_number) {
this.serial_number = serial_number;
}
public String getMonitor_collector_name() {
return monitor_collector_name;
}
public void setMonitor_collector_name(String monitor_collector_name) {
this.monitor_collector_name = monitor_collector_name;
}
private void createDataPoints() throws IllegalArgumentException,PropertyInitializationFailed, ServiceException, StatusException, StatusException, IOException, OnChangeNotSupportedException{
#silent L=[]
#for $idx in $range(0,$x.GetSheet["NRows"])
#silent L.append($x.GetSheet["Short name"][$idx])
#if ($x.GetSheet["OPC UA Data type"][$idx]).upper()[-1]==']' ## test for arrays
#set $type=($x.GetSheet["OPC UA Data type"][$idx].upper()).split("[")[0]+"[]"
try {
$x.GetSheet["Short name"][$idx] = baciH.createRO${y[$type][0]}Prop("$x.GetSheet["Short name"][$idx]","$x.GetSheet["OPC_UA node"][$idx]");
} catch (IllegalArgumentException|PropertyInitializationFailed e){
m_logger.log(Level.SEVERE, "Exception in creating Property:"+"$x.GetSheet["Short name"][$idx]"+":"+e.getMessage());
}
#else if ($x.GetSheet["OPC UA Data type"][$idx]).upper()=='INT16'
#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());
}
#else if ($x.GetSheet["OPC UA Data type"][$idx]).upper()=='UINT16'
#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 low"][$idx]) !="nan" and str($x.GetSheet["Alarm low"][$idx]).strip() !="NA" and str($x.GetSheet["Alarm low"][$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());
}
#else if ($x.GetSheet["OPC UA Data type"][$idx]).upper()=='UINT32'
#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 low"][$idx]) !="nan" and str($x.GetSheet["Alarm low"][$idx]).strip() !="NA" and str($x.GetSheet["Alarm low"][$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());
}
#else
#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 low"][$idx]) !="nan" and str($x.GetSheet["Alarm low"][$idx]).strip() !="NA" and str($x.GetSheet["Alarm low"][$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());
}
#end if
#end for
#for $idx in $range(0,$x.SetSheet["NRows"])
#silent L.append($x.SetSheet["Short name"][$idx])
#if ($x.SetSheet["OPC UA Data type"][$idx]).upper()[-1]==']' ## test for arrays
#set $type=($x.SetSheet["OPC UA Data type"][$idx].upper()).split("[")[0]+"[]"
try{
$x.SetSheet["Short name"][$idx] = baciH.createRW${y[$type][0]}Prop("$x.SetSheet["Short name"][$idx]","$x.SetSheet["OPC_UA node"][$idx]");
} catch (IllegalArgumentException|PropertyInitializationFailed e){
m_logger.log(Level.SEVERE, "Exception in creating Property:"+"$x.SetSheet["Short name"][$idx]"+":"+e.getMessage());
}
#else if ($x.SetSheet["OPC UA Data type"][$idx]).upper()=='INT16'
#set $type=$x.SetSheet["OPC UA Data type"][$idx].upper()
try{
$x.SetSheet["Short name"][$idx] = baciH.createRW${y[$type][0]}Prop("$x.SetSheet["Short name"][$idx]","$x.SetSheet["OPC_UA node"][$idx]");
} catch (IllegalArgumentException|PropertyInitializationFailed e){
m_logger.log(Level.SEVERE, "Exception in creating Property:"+"$x.SetSheet["Short name"][$idx]"+":"+e.getMessage());
}
#else if ($x.SetSheet["OPC UA Data type"][$idx]).upper()=='UINT16'
#set $type=$x.SetSheet["OPC UA Data type"][$idx].upper()
try{
$x.SetSheet["Short name"][$idx] = baciH.createRW${y[$type][0]}Prop("$x.SetSheet["Short name"][$idx]","$x.SetSheet["OPC_UA node"][$idx]");
} catch (IllegalArgumentException|PropertyInitializationFailed e){
m_logger.log(Level.SEVERE, "Exception in creating Property:"+"$x.SetSheet["Short name"][$idx]"+":"+e.getMessage());
}
#else if ($x.SetSheet["OPC UA Data type"][$idx]).upper()=='UINT32'
#set $type=$x.SetSheet["OPC UA Data type"][$idx].upper()
try{
$x.SetSheet["Short name"][$idx] = baci.HcreateRW${y[$type][0]}Prop("$x.SetSheet["Short name"][$idx]","$x.SetSheet["OPC_UA node"][$idx]");
} catch (IllegalArgumentException|PropertyInitializationFailed e){
m_logger.log(Level.SEVERE, "Exception in creating Property:"+"$x.SetSheet["Short name"][$idx]"+":"+e.getMessage());
}
#else
#set $type=$x.SetSheet["OPC UA Data type"][$idx].upper()
try{
$x.SetSheet["Short name"][$idx] = baciH.createRW${y[$type][0]}Prop("$x.SetSheet["Short name"][$idx]","$x.SetSheet["OPC_UA node"][$idx]");
} catch (IllegalArgumentException|PropertyInitializationFailed e){
m_logger.log(Level.SEVERE, "Exception in creating Property:"+"$x.SetSheet["Short name"][$idx]"+":"+e.getMessage());
}
#end if
#end for
#for $idx in $range(0,$x.ModeSheet["NRows"])
#set $name=($x.ModeSheet["OPC_UA node"][$idx].split(";")[1]).split("=")[1].replace(".","_")
#if not $name in L
try{
#if ($x.ModeSheet["OPC UA Data type"][$idx]).upper()=='INT16'
$name = baciH.createRW${y[$x.ModeSheet["OPC UA Data type"][$idx].upper()][0]}Prop("$name","$x.ModeSheet["OPC_UA node"][$idx]","INT16");
#else
$name = baciH.createRW${y[$x.ModeSheet["OPC UA Data type"][$idx].upper()][0]}Prop("$name","$x.ModeSheet["OPC_UA node"][$idx]");
#end if
} catch (IllegalArgumentException|PropertyInitializationFailed e){
m_logger.log(Level.SEVERE, "Exception in creating Property:"+"$x.ModeSheet["Short name"][$idx]"+":"+e.getMessage());
}
#silent L.append($name)
#end if
#end for
#for $idx in $range(0,$x.CmdSheet["NRows"])
#set $name=($x.CmdSheet["OPC_UA node"][$idx].split(";")[1]).split("=")[1].replace(".","_")
#if not $name in L
#if ($x.CmdSheet["OPC UA Data type"][$idx]).upper()=='INT16'
$name = baciH.createRW${y[$x.ModeSheet["OPC UA Data type"][$idx].upper()][0]}Prop("$name","$x.ModeSheet["OPC_UA node"][$idx]","INT16");
$name = baciH.createRW${y[$x.CmdSheet["OPC UA Data type"][$idx].upper()][0]}Prop("$name", "$x.CmdSheet["OPC_UA node"][$idx]");
#end if
} catch (IllegalArgumentException|PropertyInitializationFailed e){
m_logger.log(Level.SEVERE, "Exception in creating Property:"+"$x.CmdSheet["Short name"][$idx]"+":"+e.getMessage());
}
#silent L.append($name)
#end if
#end for
}
#silent L=[]
#for $idx in $range(0,$x.GetSheet["NRows"])
#if ($x.GetSheet["OPC UA Data type"][$idx]).upper()[-1]==']' ## test for arrays
#set $type=($x.GetSheet["OPC UA Data type"][$idx].upper()).split("[")[0]+"[]"
@Override
public $($y[$type][4])$([]) ${x.GetSheet["Name of command"][$idx]}(LongHolder arg0) {
$($y[$type][4])$([]) val = baciH.get$(($y[$type][4]).capitalize())ArrayValSync(${x.GetSheet["Short name"][$idx]},arg0);
return val;
}
#else
#set $type=$x.GetSheet["OPC UA Data type"][$idx].upper()
@Override
public $($y[$type][4]) ${x.GetSheet["Name of command"][$idx]}(LongHolder arg0) {
#if $y[$type][4] == "boolean"
$($y[$type][4]) val = false;
#else if $y[$type][4] == "String"
$($y[$type][4]) val = null;
#else
$($y[$type][4]) val = 0;
#end if
val = baciH.get$(($y[$type][4]).capitalize())ValSync(${x.GetSheet["Short name"][$idx]},arg0);
return val;
}
#end if
#end for
#for $idx in $range(0,$x.SetSheet["NRows"])
#if ($x.SetSheet["OPC UA Data type"][$idx]).upper()[-1]==']' ## test for arrays
#set $type=($x.SetSheet["OPC UA Data type"][$idx].upper()).split("[")[0]+"[]"
@Override
public $($y[$type][4])$([]) G${x.SetSheet["Name of command"][$idx][1:]}(LongHolder arg0) {
$($y[$type][4])$([]) val=baciH.get$(($y[$type][4]).capitalize())ArrayValSync(${x.SetSheet["Short name"][$idx]},arg0);
@Override
public void ${x.SetSheet["Name of command"][$idx]}($($y[$type][4])$([]) arg0) throws IllegalParameterErrorEx,INACTErrorEx {
baciH.set$(($y[$type][4]).capitalize())ArrayValSync(${x.SetSheet["Short name"][$idx]},arg0);
}
#else
#set $type=$x.SetSheet["OPC UA Data type"][$idx].upper()
@Override
public $($y[$type][4]) G${x.SetSheet["Name of command"][$idx][1:]}(LongHolder arg0) {
#if $y[$type][4] == "boolean"
val = baciH.get$(($y[$type][4]).capitalize())ValSync(${x.SetSheet["Short name"][$idx]},arg0);
return val;
}
@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" and 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"
$($y[$type][4]) minval = ${str($x.SetSheet["Alarm low"][$idx]).split(".")[0]};
$($y[$type][4]) maxval = ${str($x.SetSheet["Alarm high"][$idx]).split(".")[0]};
$($y[$type][4]) minval = ${str($x.SetSheet["Alarm low"][$idx])};
$($y[$type][4]) maxval = ${str($x.SetSheet["Alarm high"][$idx])};
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]");
#else
baciH.set$(($y[$type][4]).capitalize())ValSync(${x.SetSheet["Short name"][$idx]},arg0);
#end if
}
#end if
#end for
#for $idx in $range(0,$x.ModeSheet["NRows"])
#set $name=($x.ModeSheet["OPC_UA node"][$idx].split(";")[1]).split("=")[1].replace(".","_")
#set $type=$x.ModeSheet["OPC UA Data type"][$idx].upper()
#if $x.ModeSheet["OPC UA Data type"][$idx].upper()=="INT16"
#set $value=$x.ModeSheet["CMD/MODE value"][$idx].split('.')[0]
#else if $x.ModeSheet["OPC UA Data type"][$idx].upper()=="INT32"
#set $value=$x.ModeSheet["CMD/MODE value"][$idx].split('.')[0]
#else if $x.ModeSheet["OPC UA Data type"][$idx].upper()=="BOOLEAN"
#set $value=str($x.ModeSheet["CMD/MODE value"][$idx]).lower()
#else
#set $value=str($x.ModeSheet["CMD/MODE value"][$idx])
#end if
@Override
public void ${x.ModeSheet["Name of command"][$idx]}() throws IllegalParameterErrorEx,INACTErrorEx {
baciH.set$(($y[$type][4]).capitalize())ValSync(${name},$value);
}
#end for
#for $idx in $range(0,$x.CmdSheet["NRows"])
#set $name=($x.CmdSheet["OPC_UA node"][$idx].split(";")[1]).split("=")[1].replace(".","_")
#set $type=$x.CmdSheet["OPC UA Data type"][$idx].upper()
#if $x.CmdSheet["OPC UA Data type"][$idx].upper()=="INT16"
#set $value=$x.CmdSheet["CMD/MODE value"][$idx].split('.')[0]
#else if $x.CmdSheet["OPC UA Data type"][$idx].upper()=="INT32"
#set $value=$x.CmdSheet["CMD/MODE value"][$idx].split('.')[0]
#else if $x.CmdSheet["OPC UA Data type"][$idx].upper()=="BOOLEAN"
#set $value=str($x.CmdSheet["CMD/MODE value"][$idx]).lower()
#else
#set $value=str($x.CmdSheet["CMD/MODE value"][$idx])
#end if
@Override
public void ${x.CmdSheet["Name of command"][$idx]}() throws IllegalParameterErrorEx,INACTErrorEx {
baciH.set$(($y[$type][4]).capitalize())ValSync(${name},$value);