return getDevicePropertyInformationX("STOCKPROPS", context,server,device,property,TLink.defaultTimeout);
}
private static ServerQuery[] getXTagList(String context,String tagtype,String subsys,String importance,int timeout)
{
int cc,n,i;
TDataType dout;
TDataType din;
TLink tl;
StringBuffer host = new StringBuffer(32);
StringBuffer query = new StringBuffer(32);
short[] numout = new short[1];
TDataType numoutData = new TDataType(numout);
NAME16[] inplist = new NAME16[2];
USTRING[] taglist;
ServerQuery[] strlist;
boolean isFecRequest = tagtype.compareToIgnoreCase("FECS") == 0;
if (subsys == null || subsys.length() == 0)
{
inplist[0] = new NAME16("ALL");
}
else
{
inplist[0] = new NAME16(subsys);
}
if (importance == null || importance.length() == 0)
{
inplist[1] = new NAME16("ALL");
}
else
{
inplist[1] = new NAME16(importance);
}
boolean allreq = false;
if (inplist[0].name.compareToIgnoreCase("ALL") == 0 &&
inplist[1].name.compareToIgnoreCase("ALL") == 0)
allreq = true;
din = new TDataType(inplist);
host.delete(0,31); query.delete(0,31);
if (context != null && context.length() != 0)
{
host.insert(0,"ENS/" + context);
}
else
{
host.insert(0,"ENS");
}
query.insert(0,"N" + tagtype);
try
{
tl = new TLink(host.toString(),query.toString(),numoutData,din,TAccess.CA_READ);
cc = tl.execute(timeout,true);
srvAddr = tl.srvAddr;
tl.close();
}
catch (Exception e)
{
MsgLog.log("getXTagList", e.getMessage(),TErrorList.non_existent_elem,e,0);
cc = TErrorList.non_existent_elem;
}
if (cc != 0) return null;
if (numout[0] == 0 && subsys != null && subsys.length() > 0) numout[0] = 100;
// Get Tags from name server (synchronous call)
query.delete(0,31);
query.insert(0,tagtype);
n = numout[0];
taglist = new USTRING[n];
for (i=0; i<n; i++) taglist[i] = new USTRING();
if (taglist.length == 0) return null;
if (numout[0] > taglist.length) numout[0] = (short)taglist.length;
dout = new TDataType(taglist);
tl = new TLink(host.toString(),query.toString(),dout,din,TAccess.CA_READ);
cc = tl.execute(TLink.defaultTimeout,true);
tl.close();
if (cc != 0) return null;
strlist = new ServerQuery[n];