Examples of FecCfg


Examples of de.desy.tine.xmlUtils.FecCfg

    return getExportInformationFromFile(moduleName);
  }
  public int getExportInformationFromFile(String eqmName)
  {
    getEquipmentModuleFactory().getFecXmlDocument();
    FecCfg cfg = gEqmFactory.getFecXmlCfg();
    if (cfg != null)
    { // has parsed a fec.xml config file ...
      LinkedList<EqmCfg> el = cfg.getEqmList();
      LinkedList<String> dv = null;
      float max, min;
      String grp, ctx, sub, exp, mstr, slav;
      String fctx = gEqmFactory.getFecContext();
      for( EqmCfg ec : el )
      {
        if (ec.getName().compareTo(eqmName) == 0)
        {
          LinkedList<PropertyCfg> pl = ec.getPropertyList();
          for (PropertyCfg pc : pl)
          {
            TExportProperty xp = new TExportProperty(
              pc.getId().getValue(),pc.getName(),pc.getDescription(),
              pc.getSizeOut().getValue(),(short)pc.getDTypeOut().getValue(),pc.getDTagOut(),
              pc.getSizeIn().getValue(),(short)pc.getDTypeIn().getValue(),pc.getDTagIn(),
              (short)pc.getAccess().getValue());
            if (pc.getDeadband().getValue() > 0)
              xp.setAccessDeadband(pc.getDeadband().getValue());
            xp.getDescription().setArrayType((short)pc.getDArrayTypeOut());
            max = pc.getXmax().getValue();
            min = pc.getXmin().getValue();
            if (min > max) TFecLog.log(eqmName,"x min > x max for property "+pc.getName());
            xp.getDescription().setXRange(new TPropertyEGU(pc.getXEgu(),min,max));
            max = pc.getMax().getValue();
            min = pc.getMin().getValue();
            if (min > max) TFecLog.log(eqmName,"min > max for property "+pc.getName());
            xp.getDescription().setYRange(new TPropertyEGU(pc.getEgu(),min,max));
            // TODO:
            //expp.getDescription().setArrayNumRows(pc.getNumRows().getValue());
            xp.getDescription().setRedirection(pc.getRedirection());
            xp.hasExclusiveRead = pc.hasExclusiveRead;
            xp.hasUnlockedExclusiveRead = pc.hasUnlockedExclusiveRead;
            xp.isEnforceOutput = pc.isEnforceOutput;
            registerProperty(xp,null);
           
            dv = pc.getDevices();
            if (dv != null && dv.size() > 0)
            {
              int nr = 0;
              ArrayList<String> lst = new ArrayList<String>(dv.size());
              for (String d : dv)
              {
                lst.add(nr++,d);
              }
              xp.setDeviceList(lst);
              getDeviceList().setPropertyOriented(true);
            }
          }
          grp = ec.getGroup();
          if (grp != null && grp.length() > 0)
          {
            setGroupName(grp);
            if (ec.getGroupIndex().isValid())
              setGroupIndex(ec.getGroupIndex().getValue());
            setGroupDevicePrefix(ec.getGroupDevicePrefix());
            setGroupDevicePostfix(ec.getGroupDevicePostfix());
          }
          exp = ec.getServer();
          if (exp != null && exp.length() > 0) setExportName(exp);
          ctx = ec.getContext();
          if (ctx == null || ctx.length() == 0)
          { // not specified for the eqm : use the default
            ctx = cfg.getContext();
            if (ctx == null || ctx.length() == 0) ctx = fctx; // hope for the best
          }
          if (fctx == null || fctx.length() == 0)
          { // make sure this is set
            gEqmFactory.setFecContext(ctx);
            fctx = ctx;
          }
          if (ctx != null && ctx.length() > 0) setContext(ctx);
          sub = ec.getSubsystem();
          if (sub == null || sub.length() == 0)
          { // not specified for the eqm : use the default
            sub = cfg.getSubsystem();
          }
          if (sub != null && sub.length() > 0) setSubsystem(sub);
          mstr = ec.getMaster();
          if (mstr != null && mstr.length() > 0)
          {
View Full Code Here

Examples of de.desy.tine.xmlUtils.FecCfg

    }
  }
 
  public boolean getRegisteredStringSetFromXml(LinkedList<String> lst,String set,String prp,String dev)
  {
    FecCfg cfg = gEqmFactory.getFecXmlCfg();
    String eqmName = getLocalName();
    if (cfg == null) return false;
    LinkedList<EqmCfg> el = cfg.getEqmList();
    if (el == null) return false;
    for( EqmCfg ec : el )
    { // run thru the list
      if (ec.getName().compareTo(eqmName) == 0)
      { // found the right EQM
View Full Code Here

Examples of de.desy.tine.xmlUtils.FecCfg

      return 0;
    }
  }
  public int getRegisteredAlarmDefinitionsFromFile()
  {
    FecCfg cfg = gEqmFactory.getFecXmlCfg();
    String eqmName = getLocalName();
    if (cfg != null)
    { // has parsed a fec.xml config file ...
      LinkedList<EqmCfg> el = cfg.getEqmList();
      for( EqmCfg ec : el )
      {
        if (ec.getName().compareTo(eqmName) == 0)
        {         
          LinkedList<AlarmDefinitionCfg> al = ec.getAlarmDefinitions();
View Full Code Here

Examples of de.desy.tine.xmlUtils.FecCfg

      return 0;
    }
  }
  public int getRegisteredDevicesFromFile()
  {
    FecCfg cfg = gEqmFactory.getFecXmlCfg();
    String eqmName = getLocalName();
    if (cfg != null)
    { // has parsed a fec.xml config file ...
      LinkedList<EqmCfg> el = cfg.getEqmList();
      String deviceRedirection;
      String deviceDescription;
      String prpSet;
      for( EqmCfg ec : el )
      {
View Full Code Here

Examples of de.desy.tine.xmlUtils.FecCfg

    return getExportInformationFromFile(moduleName);
  }
  public int getExportInformationFromFile(String eqmName)
  {
    getEquipmentModuleFactory().getFecXmlDocument();
    FecCfg cfg = gEqmFactory.getFecXmlCfg();
    if (cfg != null)
    { // has parsed a fec.xml config file ...
      LinkedList<EqmCfg> el = cfg.getEqmList();
      LinkedList<String> dv = null;
      float max, min;
      String grp, ctx, sub, exp, mstr, slav;
      String fctx = gEqmFactory.getFecContext();
      for( EqmCfg ec : el )
      {
        if (ec.getName().compareTo(eqmName) == 0)
        {
          LinkedList<PropertyCfg> pl = ec.getPropertyList();
          for (PropertyCfg pc : pl)
          {
            TExportProperty xp = new TExportProperty(
              pc.getId().getValue(),pc.getName(),pc.getDescription(),
              pc.getSizeOut().getValue(),(short)pc.getDTypeOut().getValue(),pc.getDTagOut(),
              pc.getSizeIn().getValue(),(short)pc.getDTypeIn().getValue(),pc.getDTagIn(),
              (short)pc.getAccess().getValue());
            if (pc.getDeadband().getValue() > 0)
              xp.setAccessDeadband(pc.getDeadband().getValue());
            xp.getDescription().setArrayType((short)pc.getDArrayTypeOut());
            max = pc.getXmax().getValue();
            min = pc.getXmin().getValue();
            if (min > max) TFecLog.log(eqmName,"x min > x max for property "+pc.getName());
            xp.getDescription().setXRange(new TPropertyEGU(pc.getXEgu(),min,max));
            max = pc.getMax().getValue();
            min = pc.getMin().getValue();
            if (min > max) TFecLog.log(eqmName,"min > max for property "+pc.getName());
            xp.getDescription().setYRange(new TPropertyEGU(pc.getEgu(),min,max));
            // TODO:
            //expp.getDescription().setArrayNumRows(pc.getNumRows().getValue());
            xp.getDescription().setRedirection(pc.getRedirection());
            xp.hasExclusiveRead = pc.hasExclusiveRead;
            xp.hasUnlockedExclusiveRead = pc.hasUnlockedExclusiveRead;
            xp.isEnforceOutput = pc.isEnforceOutput;
            registerProperty(xp,null);
           
            dv = pc.getDevices();
            if (dv != null && dv.size() > 0)
            {
              int nr = 0;
              ArrayList<String> lst = new ArrayList<String>(dv.size());
              for (String d : dv)
              {
                lst.add(nr++,d);
              }
              xp.setDeviceList(lst);
              getDeviceList().setPropertyOriented(true);
            }
          }
          grp = ec.getGroup();
          if (grp != null && grp.length() > 0)
          {
            setGroupName(grp);
            if (ec.getGroupIndex().isValid())
              setGroupIndex(ec.getGroupIndex().getValue());
            setGroupDevicePrefix(ec.getGroupDevicePrefix());
            setGroupDevicePostfix(ec.getGroupDevicePostfix());
          }
          exp = ec.getServer();
          if (exp != null && exp.length() > 0) setExportName(exp);
          ctx = ec.getContext();
          if (ctx == null || ctx.length() == 0)
          { // not specified for the eqm : use the default
            ctx = cfg.getContext();
            if (ctx == null || ctx.length() == 0) ctx = fctx; // hope for the best
          }
          if (fctx == null || fctx.length() == 0)
          { // make sure this is set
            gEqmFactory.setFecContext(ctx);
            fctx = ctx;
          }
          if (ctx != null && ctx.length() > 0) setContext(ctx);
          sub = ec.getSubsystem();
          if (sub == null || sub.length() == 0)
          { // not specified for the eqm : use the default
            sub = cfg.getSubsystem();
          }
          if (sub != null && sub.length() > 0) setSubsystem(sub);
          mstr = ec.getMaster();
          if (mstr != null && mstr.length() > 0)
          {
View Full Code Here

Examples of de.desy.tine.xmlUtils.FecCfg

    }
  }
 
  public boolean getRegisteredStringSetFromXml(LinkedList<String> lst,String set,String prp,String dev)
  {
    FecCfg cfg = gEqmFactory.getFecXmlCfg();
    String eqmName = getLocalName();
    if (cfg == null) return false;
    LinkedList<EqmCfg> el = cfg.getEqmList();
    if (el == null) return false;
    for( EqmCfg ec : el )
    { // run thru the list
      if (ec.getName().compareTo(eqmName) == 0)
      { // found the right EQM
View Full Code Here

Examples of de.desy.tine.xmlUtils.FecCfg

      return 0;
    }
  }
  public int getRegisteredAlarmDefinitionsFromFile()
  {
    FecCfg cfg = gEqmFactory.getFecXmlCfg();
    String eqmName = getLocalName();
    if (cfg != null)
    { // has parsed a fec.xml config file ...
      LinkedList<EqmCfg> el = cfg.getEqmList();
      for( EqmCfg ec : el )
      {
        if (ec.getName().compareTo(eqmName) == 0)
        {         
          LinkedList<AlarmDefinitionCfg> al = ec.getAlarmDefinitions();
View Full Code Here

Examples of de.desy.tine.xmlUtils.FecCfg

      return 0;
    }
  }
  public int getRegisteredDevicesFromFile()
  {
    FecCfg cfg = gEqmFactory.getFecXmlCfg();
    String eqmName = getLocalName();
    if (cfg != null)
    { // has parsed a fec.xml config file ...
      LinkedList<EqmCfg> el = cfg.getEqmList();
      String deviceRedirection;
      String deviceDescription;
      String prpSet;
      for( EqmCfg ec : el )
      {
View Full Code Here

Examples of de.desy.tine.xmlUtils.FecCfg

    return getExportInformationFromFile(moduleName);
  }
  public int getExportInformationFromFile(String eqmName)
  {
    getEquipmentModuleFactory().getFecXmlDocument();
    FecCfg cfg = gEqmFactory.getFecXmlCfg();
    if (cfg != null)
    { // has parsed a fec.xml config file ...
      LinkedList<EqmCfg> el = cfg.getEqmList();
      LinkedList<String> dv = null;
      float max, min;
      String grp, ctx, sub, exp, reg, mstr, slav;
      String fctx = gEqmFactory.getFecContext();
      for( EqmCfg ec : el )
      {
        if (ec.getName().compareTo(eqmName) == 0)
        {
          LinkedList<PropertyCfg> pl = ec.getPropertyList();
          for (PropertyCfg pc : pl)
          {
            TExportProperty xp = new TExportProperty(
              pc.getId().getValue(),pc.getName(),pc.getDescription(),
              pc.getSizeOut().getValue(),(short)pc.getDTypeOut().getValue(),pc.getDTagOut(),
              pc.getSizeIn().getValue(),(short)pc.getDTypeIn().getValue(),pc.getDTagIn(),
              (short)pc.getAccess().getValue());
            if (pc.getDeadband().getValue() > 0)
              xp.setAccessDeadband(pc.getDeadband().getValue());
            xp.getDescription().setArrayType((short)pc.getDArrayTypeOut());
            max = pc.getXmax().getValue();
            min = pc.getXmin().getValue();
            if (min > max) TFecLog.log(eqmName,"x min > x max for property "+pc.getName());
            xp.getDescription().setXRange(new TPropertyEGU(pc.getXEgu(),min,max));
            max = pc.getMax().getValue();
            min = pc.getMin().getValue();
            if (min > max) TFecLog.log(eqmName,"min > max for property "+pc.getName());
            xp.getDescription().setYRange(new TPropertyEGU(pc.getEgu(),min,max));
            // TODO:
            //expp.getDescription().setArrayNumRows(pc.getNumRows().getValue());
            xp.getDescription().setRedirection(pc.getRedirection());
            xp.hasExclusiveRead = pc.hasExclusiveRead;
            xp.hasUnlockedExclusiveRead = pc.hasUnlockedExclusiveRead;
            xp.isEnforceOutput = pc.isEnforceOutput;
            registerProperty(xp,null);           
            dv = pc.getDevices();
            if (dv != null && dv.size() > 0)
            {
              int nr = 0;
              ArrayList<String> lst = new ArrayList<String>(dv.size());
              for (String d : dv)
              {
                lst.add(nr++,d);
              }
              xp.setDeviceList(lst);
              getDeviceList().setPropertyOriented(true);
            }
          }
          grp = ec.getGroup();
          if (grp != null && grp.length() > 0)
          {
            setGroupName(grp);
            if (ec.getGroupIndex().isValid())
              setGroupIndex(ec.getGroupIndex().getValue());
            setGroupDevicePrefix(ec.getGroupDevicePrefix());
            setGroupDevicePostfix(ec.getGroupDevicePostfix());
          }
          exp = ec.getServer();
          if (exp != null && exp.length() > 0) setExportName(exp);
          ctx = ec.getContext();
          if (ctx == null || ctx.length() == 0)
          { // not specified for the eqm : use the default
            ctx = cfg.getContext();
            if (ctx == null || ctx.length() == 0) ctx = fctx; // hope for the best
          }
          if (fctx == null || fctx.length() == 0)
          { // make sure this is set
            gEqmFactory.setFecContext(ctx);
            fctx = ctx;
          }
          if (ctx != null && ctx.length() > 0) setContext(ctx);
          sub = ec.getSubsystem();
          if (sub == null || sub.length() == 0)
          { // not specified for the eqm : use the default
            sub = cfg.getSubsystem();
          }
          if (sub != null && sub.length() > 0) setSubsystem(sub);
          reg = ec.getRegion();
          if (reg != null && reg.length() > 0) setRegion(reg);
          mstr = ec.getMaster();
View Full Code Here

Examples of de.desy.tine.xmlUtils.FecCfg

    }
  }
 
  public boolean getRegisteredStringSetFromXml(LinkedList<String> lst,String set,String prp,String dev)
  {
    FecCfg cfg = gEqmFactory.getFecXmlCfg();
    String eqmName = getLocalName();
    if (cfg == null) return false;
    LinkedList<EqmCfg> el = cfg.getEqmList();
    if (el == null) return false;
    for( EqmCfg ec : el )
    { // run thru the list
      if (ec.getName().compareTo(eqmName) == 0)
      { // found the right EQM
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.