Package de.desy.tine.client

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


    if (!isInitialized) initStructs();
    for (DAQPrm p : prms) p.clear();
    TDataType dtprms = new TDataType(prms);
    String dname = "/" + context + "/HISTORY/"+keyFile;
    TLink tl = new TLink(dname,"KEYWORD.INFO",dtprms,null,TAccess.CA_READ);
    if (tl.executeAndClose(1000) != 0) throw new IOException(tl.getLastError());
    int len = dtprms.getCompletionLength();
    DAQPrm[] results = new DAQPrm[len];
    for (int i=0; i<len; i++) results[i] = new DAQPrm(prms[i]);
    return results;
  }
View Full Code Here


    if (!isInitialized) initStructs();
    TDataType dtprms = new TDataType(prms);
    if (!keyFile.endsWith(".csv")) keyFile += ".csv";
    String dname = "/" + context + "/HISTORY/"+keyFile;
    TLink tl = new TLink(dname,"KEYWORD.INFO",null,dtprms,TAccess.CA_WRITE);
    int cc = tl.executeAndClose(2000);
    if (cc == TErrorList.connection_timeout || cc == TErrorList.link_timeout)
      throw new IOException(tl.getLastError());
    return cc;
  }
  public static TDataType getDAQRecInput(String context,DAQRec rec) throws IOException
View Full Code Here

    if (context == null || rec == null) return null;
    if (!isInitialized) initStructs();
    TDataType dtinpt = new TDataType(rec.getInputLength(),(short)rec.getInputFormat());
    String dname = "/" + context + "/HISTORY/"+rec.getInputFileName();
    TLink tl = new TLink(dname,"KEYWORD.INPT",dtinpt,null,TAccess.CA_READ);
    if (tl.executeAndClose(1000) != 0) throw new IOException(tl.getLastError());
    return dtinpt;
  }
  public static int setDAQRecInput(String context,DAQRec rec,TDataType din) throws IOException
  {
    if (context == null || rec == null || din == null)
View Full Code Here

    if (context == null || rec == null || din == null)
      return TErrorList.argument_list_error;
    if (!isInitialized) initStructs();
    String dname = "/" + context + "/HISTORY/"+rec.getInputFileName();
    TLink tl = new TLink(dname,"KEYWORD.INPT",null,din,TAccess.CA_WRITE);
    int cc = tl.executeAndClose(2000);
    if (cc == TErrorList.connection_timeout || cc == TErrorList.link_timeout)
      throw new IOException(tl.getLastError());
    return cc;   
  }
  public static DAQFltr[] getDAQFilterTable(String context) throws IOException
View Full Code Here

    if (!isInitialized) initStructs();
    for (DAQFltr f : fltrs) f.clear();
    TDataType dtfltrs = new TDataType(fltrs);
    String dname = "/" + context + "/HISTORY";
    TLink tl = new TLink(dname,"FILTERTABLE",dtfltrs,null,TAccess.CA_READ);
    if (tl.executeAndClose(1000) != 0) throw new IOException(tl.getLastError());
    int len = dtfltrs.getCompletionLength();
    DAQFltr[] results = new DAQFltr[len];
    for (int i=0; i<len; i++) results[i] = new DAQFltr(fltrs[i]);
    return results;
  }
View Full Code Here

    if (context == null || fltrs == null) return TErrorList.argument_list_error;
    if (!isInitialized) initStructs();
    TDataType dtfltrs = new TDataType(fltrs);
    String dname = "/" + context + "/HISTORY";
    TLink tl = new TLink(dname,"FILTERTABLE",null,dtfltrs,TAccess.CA_WRITE);
    int cc = tl.executeAndClose(2000);
    if (cc == TErrorList.connection_timeout || cc == TErrorList.link_timeout)
      throw new IOException(tl.getLastError());
    return cc;
  }
  public int getFilterOptionFromString(DAQFltr[] fltrs,String filterString)
View Full Code Here

  {
    if (context == null) return TErrorList.argument_list_error;
    if (!isInitialized) initStructs();
    String dname = "/" + context + "/HISTORY";
    TLink tl = new TLink(dname,"DB.RELOAD",null,null,TAccess.CA_WRITE);
    int cc = tl.executeAndClose(3000);
    if (cc == TErrorList.connection_timeout || cc == TErrorList.link_timeout)
      throw new IOException(tl.getLastError());
    if (cc != 0) return cc;
    dname = "/" + context + "/ARCHIVER";
    tl = new TLink(dname,"DB.RELOAD",null,null,TAccess.CA_WRITE);
View Full Code Here

    if (cc == TErrorList.connection_timeout || cc == TErrorList.link_timeout)
      throw new IOException(tl.getLastError());
    if (cc != 0) return cc;
    dname = "/" + context + "/ARCHIVER";
    tl = new TLink(dname,"DB.RELOAD",null,null,TAccess.CA_WRITE);
    cc = tl.executeAndClose(3000);
    if (cc == TErrorList.connection_timeout || cc == TErrorList.link_timeout)
      throw new IOException(tl.getLastError());
    return cc;
  }
  public static int updateServer(String context) throws IOException
View Full Code Here

  {
    if (context == null) return TErrorList.argument_list_error;
    if (!isInitialized) initStructs();
    String dname = "/" + context + "/HISTORY";
    TLink tl = new TLink(dname,"RESTART",null,null,TAccess.CA_WRITE);
    int cc = tl.executeAndClose(3000);
    if (cc == TErrorList.connection_timeout || cc == TErrorList.link_timeout)
      throw new IOException(tl.getLastError());
     return cc;
  }
  public static int getNumberStockFilters()
View Full Code Here

  {
    String dn = "/SITE/ENS";
    int[] dt = new int[1];
    TDataType dout = new TDataType(dt);
    TLink lnk = new TLink(dn,"ALLOWEDDEADTIME",dout,null,TAccess.CA_READ);
    int cc = lnk.executeAndClose(500);
    return cc == 0 ? dt[0] : -cc;
  }
  /**
   * Provides a list of the available allowed subsystems at the ENS and an
   * associated list of subsystem descriptions (depending on input).
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.