}
public static int addToWatchTable(
String context,String server, String property, String device,
int datasiz,int datafmt,int severity,float hiThreshold,float loThreshold)
{
TSrvEntry srv = new TSrvEntry(device,server,context);
TAlarmWatchEntry[] awe = new TAlarmWatchEntry[1];
TAlarmWatchThreshold awt = new TAlarmWatchThreshold(5,hiThreshold,(float)(hiThreshold*0.9),loThreshold,(float)(loThreshold*0.9));
awe[0] = new TAlarmWatchEntry(srv.getEqmName(),device, property, datasiz, datafmt, TArrayType.AT_UNKNOWN,0,severity,awt);
String dev = "/"+context+"/"+server;
TLink lnk = new TLink(dev,"ALMWATCHTBL",null,new TDataType(awe),TAccess.CA_WRITE);
return lnk.executeAndClose();
}