Examples of TDeviceList


Examples of de.desy.tine.server.devices.TDeviceList

      prp = property;
      isPrpOriented = prp == null ? false : true;
    }
    public int process(int index)
    {
      TDeviceList dlst = getDeviceList();
      if (dlst == null) return TErrorList.device_not_connected;
      int ndevs = dlst.getNumberOfDevices();
      if (ndevs == 0) return TErrorList.device_not_connected;
      if (deviceNumber < 0 && deviceNumber >= ndevs) return TErrorList.illegal_equipment_number;
      if (!isPrpOriented)
      {
        TDevice tdv = dlst.getDevice(deviceNumber);
        if (tdv == null) return TErrorList.device_not_connected;
        String oldName = tdv.getName();
        if (deviceName.compareTo(oldName) != 0)
        {
          dlst.renameDevice(oldName,deviceName);
        }
        if (deviceRedirection != null && deviceRedirection.length() > 0)
        {
          tdv.setRedirection(deviceRedirection);
          deviceRedirection = null; // reset this !
        }
        if (deviceDescription != null && deviceDescription.length() > 0)
        {
          tdv.setDescription(deviceDescription);
          deviceDescription = null; // reset this !
        }
        if (prpListFile != null && prpListFile.length() > 0)
        {
          getRegisteredPropertyListFromFile(tdv,prpListFile);
          propertyList.setDeviceOriented(true);
          prpListFile = null; // reset this !
        }
        if (deviceLocation != null && deviceLocation.length() > 0)
        {
          tdv.setLocation(deviceLocation);
        }
        if (deviceMask != 0) tdv.setMask(deviceMask);
        if (deviceOffline != 0) tdv.setOffline(true);
        if (deviceZPosition != 0) tdv.setZposition(deviceZPosition);
      }
      else
      {
        if (prp != null)
        {
          int prplen = prp.getOutputSize();
          ArrayList<String> lst = prp.getDeviceList();
          if (lst == null)
          {
            lst = new ArrayList<String>(prplen);
            prp.setDeviceList(lst)
          }
          if (deviceName.length() == 0)
          {
            deviceName = deviceNameAlt;
            if (deviceNumber == 0) deviceNumber = deviceNumberAlt;
          }
          if (deviceNumber < prplen) lst.add(deviceNumber,deviceName);
          dlst.setPropertyOriented(true);
        }
      }
      return 0;
    }
View Full Code Here

Examples of de.desy.tine.server.devices.TDeviceList

      for( EqmCfg ec : el )
      {
        if (ec.getName().compareTo(eqmName) == 0)
        {   
          LinkedList<NameCfgList> nl = ec.getNameCfgList();
          TDeviceList dlst = getDeviceList();
          if (dlst == null) return TErrorList.device_not_connected;
          int ndevs = dlst.getNumberOfDevices();
          if (ndevs == 0) return TErrorList.device_not_connected;
          LinkedList<DeviceCfg> dl = ec.getDeviceList();
          for (DeviceCfg dc : dl)
          {
            TDevice tdv = dlst.getDevice(dc.getNumber().getValue());
            if (tdv == null) return TErrorList.device_not_connected;
            prpSet = dc.getPropertySet();
            if (prpSet != null && prpSet.length() > 0)
            { // is there a device-specific property list ?
              for (NameCfgList nc : nl)
              { // yes ! find it
                if (nc.getName().compareToIgnoreCase(prpSet) == 0)
                { // assign the names list
                  tdv.setPropertyList(nc.getMembers());
                }
              }
              propertyList.setDeviceOriented(true);
            }
            String oldName = tdv.getName();
            if (dc.getName().compareTo(oldName) != 0)
            {
              dlst.renameDevice(oldName,dc.getName());
            }
            deviceRedirection = dc.getRedirection();
            if (deviceRedirection != null && deviceRedirection.length() > 0)
            {
              tdv.setRedirection(deviceRedirection);
View Full Code Here

Examples of de.desy.tine.server.devices.TDeviceList

      srData = dt;
      prp = property;
    }
    public int process(int index)
    {
      TDeviceList dlst = getDeviceList();
      if (dlst == null) return TErrorList.device_not_connected;
      int ndevs = dlst.getNumberOfDevices();
      if (ndevs == 0) return TErrorList.device_not_connected;
      if (devNumber < 0 && devNumber >= ndevs) return TErrorList.illegal_equipment_number;
      if (srData == nullreturn TErrorList.not_implemented;
      int i = index;
      int len = srData.getArrayLength();
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.