Package xal.smf.proxy

Class PrimaryPropertyAccessor

java.lang.Object
xal.smf.proxy.PrimaryPropertyAccessor

public class PrimaryPropertyAccessor extends Object
Author:
Craig McChesney
  • Constructor Details

    • PrimaryPropertyAccessor

      public PrimaryPropertyAccessor()
      Constructor
  • Method Details

    • requestValuesForNodes

      public void requestValuesForNodes(Collection<AcceleratorNode> nodes, String syncMode)
      request values for the nodes and the specified sync mode
    • valueMapFor

      public Map<String,Double> valueMapFor(Object objNode)
      Returns a Map of property values for the supplied node.The map's keys are the property names as defined by the node class' propertyNames method, values are the Double value for that property on aNode.
      Parameters:
      objNode - the AcclereatorNode whose properties to return
      Returns:
      a Map of node property values
    • getWhatifValueMapFromCache

      public Map<String,Double> getWhatifValueMapFromCache(Object objNode)
      Use the cache rather than other sources for the value map and then apply the model inputs
    • getAccessorFor

      public PropertyAccessor getAccessorFor(AcceleratorNode node)
      get the accessor for the specified node
    • hasAccessorFor

      public boolean hasAccessorFor(AcceleratorNode aNode)
      Returns true if there is an accessor for the specified node type, false otherwise.
      Parameters:
      aNode - AcceleratorNode whose type to find an accessor for
      Returns:
      true if there is an accessor for the supplied node, false otherwise
    • setModelInput

      public ModelInput setModelInput(AcceleratorNode aNode, String property, double val)
      Sets the specified node's property to the specified value. Replaces the existing value if there is one.
      Parameters:
      aNode - node whose property to set
      property - name of property to set
      val - double value for property
    • getInput

      public ModelInput getInput(AcceleratorNode aNode, String propName)
      Returns the ModelInput for the specified node's property, or null if there is none.
      Parameters:
      aNode - node whose property to get a ModelInput for
      propName - name of property to get a ModelInput for
    • addInput

      protected void addInput(ModelInput anInput)
    • removeInput

      public void removeInput(AcceleratorNode aNode, String property)