Package de.desy.tine.client

Examples of de.desy.tine.client.TLink.executeAndClose()


  {
    if (subsystems == null || subsystems.length == 0) throw new TineRuntimeErrorException(TErrorList.argument_list_error);
    USTRING[] ustr = new USTRING[200];
    TDataType dout = new TDataType(ustr);
    TLink tl = new TLink("/SITE/ENS/DEFAULT","SUBSYSTEMS.DESCRIPTIONS",dout,null,TAccess.CA_READ);
    int cc = tl.executeAndClose(1000);
    if (cc == TErrorList.link_timeout || cc == TErrorList.connection_timeout)
      throw new IOException("timed out while contacting the ENS");
    if (cc != 0) throw new TineRuntimeErrorException(cc);
    int n = dout.getCompletionLength();
    int m = subsystems.length;
View Full Code Here


    dt[1] = new NAME32(server);
    TDataType din = new TDataType(dt);
    NAME64[] lst = new NAME64[32]; // 32 = a nice query size
    TDataType dout = new TDataType(lst);
    TLink lnk = new TLink(dn,"EXPORTALIASLIST",dout,din,TAccess.CA_READ);
    if (lnk.executeAndClose(500) != 0) return null;
    int n = dout.getCompletionLength();
    String[] slst = new String[n];
    for (int i=0; i<n; i++) { slst[i] = lst[i].getName(); }
    return slst;
  }
View Full Code Here

    if (fec == null) return null;
    String dn = "/SITE/ENS/"+fec;
    NAME16[] lst = new NAME16[32]; // 32 = a nice query size
    TDataType dout = new TDataType(lst);
    TLink lnk = new TLink(dn,"FECALIASLIST",dout,null,TAccess.CA_READ);
    if (lnk.executeAndClose(500) != 0) return null;
    int n = dout.getCompletionLength();
    String[] slst = new String[n];
    for (int i=0; i<n; i++) { slst[i] = lst[i].getName(); }
    return slst;
  }
View Full Code Here

      if (isCentralArchiveServer(server) || isCentralArchiver(server))
      { // call to a central archive server
        String[] keysrcs = new String[100];
        dout = new TDataType(keysrcs);
        TLink tl = new TLink(dname,"KEYWORD.SOURCE",dout,null,TAccess.CA_READ);
        cc = tl.executeAndClose(timeout);
        if (cc == 0)
        {
          int len =dout.getCompletionLength();
          if (len < 100) keysrcs = Arrays.copyOf(keysrcs, len);
          src = keysrcs;
View Full Code Here

      FLTFLT[] dtols = new FLTFLT[1];
        dtols[0] = tols;
        din = new TDataType(startstop);
        dout = new TDataType(dtols);
        TLink tl = new TLink(dname,"KEYWORD.TOLERANCE",dout,din,TAccess.CA_READ);
        cc = tl.executeAndClose(timeout);
      }
      else
      {
        THistoryRecordStruct[] hrs = new THistoryRecordStruct[1];
        hrs[0] = new THistoryRecordStruct();
View Full Code Here

        THistoryRecordStruct[] hrs = new THistoryRecordStruct[1];
        hrs[0] = new THistoryRecordStruct();
        din = new TDataType(property);
        dout = new TDataType(hrs);
        TLink tl = new TLink(dname,"HISTORIES",dout,din,TAccess.CA_READ);
        cc = tl.executeAndClose(timeout);
        if (cc == 0)
        {
          tols.f1val = hrs[0].getAbsoluteTolerance();
          tols.f2val = hrs[0].getPercentTolerance();
        }
View Full Code Here

    {
      isActive = null;
      dout = new TDataType(data);
    }
    TLink tl = new TLink(dname,"RECORD.CMTS",dout,din,TAccess.CA_READ);
    int cc = tl.executeAndClose(timeout);
    if (cc != 0) return -cc;
    int n = dout.getCompletionLength();
    if (isActive != null)
    {
      for (int i=0; i<n; i++)
View Full Code Here

    dout = new TDataType(cmt);

    String dname = new String("/"+context+"/HISTORY/"+property+"@"+(int)target);

    TLink tl = new TLink(dname,"RECORD.CMT",dout,null,TAccess.CA_READ);
    int cc = tl.executeAndClose(timeout);
    if (cc != 0) return cc;
    int len = dout.getCompletionLength();
    data[0] = new String(cmt,0,len);
    return 0;
  }
View Full Code Here

    }
    String keepString = keepAlive ? "[KEEPALIVE]" : "";
    String dname = new String("/"+context+"/HISTORY/"+property+"@"+(int)targetTime+keepString);

    TLink tl = new TLink(dname,"RECORD.CMT",null,din,TAccess.CA_WRITE);
    return tl.executeAndClose(timeout);
  }
  private static String lastDataKey = null;
  private static NAME32DBLDBL[] ndd = null;
  private static double[] ats = null;
  private static boolean[] atsActive = null;
View Full Code Here

      tryAlternateProperty = true;
      if (!isArchiveQueryProperty(property))
        pname = pname + ".HIST"; // meta extension not given, try this ...
    }
    TLink tl = new TLink(dname,pname,dout,din,TAccess.CA_READ);
    cc = tl.executeAndClose(timeout);
    if (cc == TErrorList.un_allocated && tryAlternateProperty)
    {
      String[] hists = getArchivedProperties(context,server);
      if (hists != null)
      { // there are histories available ....
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.