Package xal.smf.proxy
Class PrimaryPropertyAccessor
java.lang.Object
xal.smf.proxy.PrimaryPropertyAccessor
- Author:
- Craig McChesney
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addInput
(ModelInput anInput) get the accessor for the specified nodegetInput
(AcceleratorNode aNode, String propName) Returns the ModelInput for the specified node's property, or null if there is none.getWhatifValueMapFromCache
(Object objNode) Use the cache rather than other sources for the value map and then apply the model inputsboolean
hasAccessorFor
(AcceleratorNode aNode) Returns true if there is an accessor for the specified node type, false otherwise.void
removeInput
(AcceleratorNode aNode, String property) void
requestValuesForNodes
(Collection<AcceleratorNode> nodes, String syncMode) request values for the nodes and the specified sync modesetModelInput
(AcceleratorNode aNode, String property, double val) Sets the specified node's property to the specified value.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.
-
Constructor Details
-
PrimaryPropertyAccessor
public PrimaryPropertyAccessor()Constructor
-
-
Method Details
-
requestValuesForNodes
request values for the nodes and the specified sync mode -
valueMapFor
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
Use the cache rather than other sources for the value map and then apply the model inputs -
getAccessorFor
get the accessor for the specified node -
hasAccessorFor
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
Sets the specified node's property to the specified value. Replaces the existing value if there is one.- Parameters:
aNode
- node whose property to setproperty
- name of property to setval
- double value for property
-
getInput
Returns the ModelInput for the specified node's property, or null if there is none.- Parameters:
aNode
- node whose property to get a ModelInput forpropName
- name of property to get a ModelInput for
-
addInput
-
removeInput
-