Package de.desy.tine.client

Examples of de.desy.tine.client.TLink


   */
  public static String[] getAccessLockInformation(String context, String server)
  {
    NAME32[] n32 = new NAME32[3];
    TDataType dout = new TDataType(n32);
    TLink lnk = new TLink("/"+context+"/"+server,"ACCESSLOCK",dout,null,TAccess.CA_READ);
    int rc = lnk.execute(TLink.defaultTimeout);
    lnk.close();
    if (rc != 0) return null;
    String[] rs = new String[3];
    rs[0] = n32[0].getName();
    rs[1] = n32[1].getName();
    rs[2] = n32[2].getName();
View Full Code Here


    if (context == null || name == null) return null;
    if (!isInitialized) initCfgs();
    TDataType dtcfg = new TDataType(mcacfgs);
    String dname = "/" + context + "/HISTORY/" + name;
    String dprop = "CONFIGURATION.MCA";
    TLink tl = new TLink(dname,dprop,dtcfg,null,TAccess.CA_READ);
    int cc = tl.execute(800, true);
    tl.close();
    if (cc != 0)
    { // TODO: throw an exception here
      DbgLog.log("getMcaViewerConfiguration",TErrorList.getErrorString(cc));
      return null;
    }
View Full Code Here

  public static synchronized int getThresholds(String context,String server, String property,float[] tmax,float[] tmin)
  {
    if (tmax == null || tmin == null) return TErrorList.invalid_parameter;
    if (tmax.length == 0 || tmin.length == 0) return TErrorList.dimension_error;
    TDataType dt = new TDataType(tmax);
    TLink tl = new TLink("/"+context+"/"+server+"/#0",property+".TMAX",dt,null,TAccess.CA_READ);
    int cc = tl.execute();
    tl.close();
    int dlen = dt.getCompletionLength();
    boolean pifDone = false;
    TPropertyQuery[] tpq = null;
    switch (cc)
    {
      default:
        return cc;
      case TErrorList.link_blacklisted:
      case TErrorList.illegal_property:
        tpq = getPropertyInformation(context,server,"#0",property);
        if (tpq == null) return TErrorList.io_error;
        tmax[0] = tpq[0].prpMaxValue;
        tmin[0] = tpq[0].prpMinValue;
        cc = 0; dlen = 1;
        pifDone = true;
      case TErrorList.success:
        break;
    }
    if (dlen == 1)
    { // one threshold applies to all elements
      for (int i=1; i<tmax.length; i++)
      { // so fill them in ...
        tmax[i] = tmax[0];
      }
    }
    dt = new TDataType(tmin);
    tl = new TLink("/"+context+"/"+server+"/#0",property+".TMIN",dt,null,TAccess.CA_READ);
    cc = tl.execute();
    tl.close();
    dlen = dt.getCompletionLength();
    switch (cc)
    {
      default:
      case TErrorList.illegal_property:
View Full Code Here

    if (context == null || name == null) return TErrorList.argument_list_error;
    if (!isInitialized) initCfgs();
    TDataType dtcfg = new TDataType(mcaCfgs);
    String dname = "/" + context + "/HISTORY/" + name;
    String dprop = "CONFIGURATION.MCA";
    TLink tl = new TLink(dname,dprop,null,dtcfg,TAccess.CA_WRITE);
    return tl.executeAndClose(800);
  }
View Full Code Here

    if (context == null || name == null) return null;
    if (!isInitialized) initCfgs();
    TDataType dtcfg = new TDataType(mcacfgs);
    String dname = "/" + context + "/STATE/" + name;
    String dprop = "CONFIGURATION";
    TLink tl = new TLink(dname,dprop,dtcfg,null,TAccess.CA_READ);
    int cc = tl.execute(800, true);
    tl.close();
    if (cc != 0)
    { // TODO: throw an exception here
      DbgLog.log("getOperationHistoryConfiguration",TErrorList.getErrorString(cc));
      return null;
    }
View Full Code Here

  }
  public static SelfTestItem[] getServerSelfTest(String context, String server)
  {
    char[] stChars = new char[32000];
    TDataType dout = new TDataType(stChars);
    TLink lnk = new TLink("/"+context+"/"+server,"SRVSELFTEST",dout,null,TAccess.CA_READ);
    int rc = lnk.executeAndClose(TLink.defaultTimeout);
    if (rc != 0) return null;
    int p = dout.getCompletionLength();
    String stString = new String(stChars,0,p);
   
    csvColumn[] stCols = new csvColumn[26];
View Full Code Here

    if (context == null || name == null) return null;
    if (!isInitialized) initCfgs();
    TDataType dtcfg = new TDataType(prfcfgs);
    String dname = "/" + context + "/STATE/" + name;
    String dprop = "PROFILE";
    TLink tl = new TLink(dname,dprop,dtcfg,null,TAccess.CA_READ);
    int cc = tl.execute(800, true);
    tl.close();
    if (cc != 0)
    { // TODO: throw an exception here
      DbgLog.log("getOperationHistoryProfile",TErrorList.getErrorString(cc));
      return null;
    }
View Full Code Here

    if (context == null) return null;
    if (!isInitialized) initStructs();
    for (CasDb p : databases) p.clear();
    TDataType dtdb = new TDataType(databases);
    String dname = "/" + context + "/CAS";
    TLink tl = new TLink(dname,"SERVER.DB",dtdb,null,TAccess.CA_READ);
    if (tl.executeAndClose(1000) != 0) throw new IOException(tl.getLastError());
    int len = dtdb.getCompletionLength();
    CasDb[] results = new CasDb[len];
    for (int i=0; i<len; i++) results[i] = new CasDb(databases[i]);
    return results;
  }
View Full Code Here

  {
    if (context == null || dbItems == null) return TErrorList.argument_list_error;
    if (!isInitialized) initStructs();
    TDataType dtrecs = new TDataType(dbItems);
    String dname = "/" + context + "/CAS";
    TLink tl = new TLink(dname,"SERVER.DB",null,dtrecs,TAccess.CA_WRITE);
    int cc = tl.executeAndClose(2000);
    if (cc == TErrorList.connection_timeout || cc == TErrorList.link_timeout)
      throw new IOException(tl.getLastError());
    return cc;
  }
View Full Code Here

    if (context == null || server == null) return null;
    if (!isInitialized) initStructs();
    for (CasAction p : actions) p.clear();
    TDataType dtact = new TDataType(actions);
    String dname = "/" + context + "/CAS/" + server;
    TLink tl = new TLink(dname,"ACTION.DB",dtact,null,TAccess.CA_READ);
    if (tl.executeAndClose(1000) != 0) throw new IOException(tl.getLastError());
    int len = dtact.getCompletionLength();
    CasAction[] results = new CasAction[len];
    for (int i=0; i<len; i++) results[i] = new CasAction(actions[i]);
    return results;
  }
View Full Code Here

TOP

Related Classes of de.desy.tine.client.TLink

Copyright © 2018 www.massapicom. 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.