Package de.desy.tine.client

Examples of de.desy.tine.client.TLink


    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


    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

    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

    startstop[0] = (double)(starttime/1000) + ((double)(starttime%1000)/1000);
    startstop[1] = (double)(stoptime/1000) + ((double)(stoptime%1000)/1000);

    TDataType npts = new TDataType(npoints);
    TDataType din = new TDataType(startstop);
    TLink nl = new TLink(srv,key,npts,din,TAccess.CA_READ);
    cc = nl.execute(1000,true); // number of points in region
    if (cc != 0) return -cc;

    TDataType dout = new TDataType(fiArray);
    TLink tl = new TLink(srv,key,dout,din,TAccess.CA_READ);
    cc = tl.execute(1000,true); // data returned
    if (cc != 0) return -cc;
   
    return npoints[0];
  }
View Full Code Here

  }
  private LinkedList<TLink> lnks = new LinkedList<TLink>();
  private byte[] dBytes = new byte[maxPayloadSizeInBytes];
  public TLink[] toStruct(InetAddress gaddr, byte[] data, int length)
  {
    TLink glb;
    boolean isLegacy = false;
    int bytesread = 0;
    int ghdrsize = glbhdrSizeInBytes;
    int nlen = TStrings.KEYWORD_NAME_SIZE;
    TLinkFactory.GlobalInfo gi = tf.getGlobalsInfo(gaddr);
View Full Code Here

  }
  private LinkedList<TLink> lnks = new LinkedList<TLink>();
  private byte[] dBytes = new byte[maxPayloadSizeInBytes];
  public TLink[] toStruct(InetAddress gaddr, byte[] data, int length)
  {
    TLink glb;
    boolean isLegacy = false;
    int bytesread = 0;
    int ghdrsize = glbhdrSizeInBytes;
    int nlen = TStrings.KEYWORD_NAME_SIZE;
    TLinkFactory.GlobalInfo gi = tf.getGlobalsInfo(gaddr);
View Full Code Here

   */
  public static int systemStartGlobalSynchronization()
  {
    if (gSynchronizationStarted) return 0;
    TDataType sdt = new TDataType(gSyncTimeStamp);
    TLink tl = new TLink("/SITE","SYSTIME",sdt,null,TAccess.CA_READ);
    int id = tl.attach(TMode.CM_GLOBAL, new TSyncCallback(), 1000);
    if (id < 0) return -id;
    gSynchronizationStarted = true;
    return 0;
  }
View Full Code Here

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

  {
    if (context == null || recs == null) return TErrorList.argument_list_error;
    if (!isInitialized) initStructs();
    TDataType dtrecs = new TDataType(recs);
    String dname = "/" + context + "/HISTORY";
    TLink tl = new TLink(dname,"RECORD.INFO",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

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.