public class SynchronizationManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_SYNC_MODE |
Constructor and Description |
---|
SynchronizationManager() |
Modifier and Type | Method and Description |
---|---|
java.util.List<IElement> |
allElementsMappedTo(AcceleratorNode aNode) |
boolean |
checkSynchronization(AcceleratorNode aNode,
java.util.Map<java.lang.String,java.lang.Double> values) |
protected void |
debugPrint() |
ModelInput |
getModelInput(AcceleratorNode aNode,
java.lang.String propName)
Returns the ModelInput for the specified node's property.
|
java.lang.String |
getSynchronizationMode()
Get the synchronization mode
|
java.util.Map<java.lang.String,java.lang.Double> |
propertiesForNode(AcceleratorNode aNode) |
void |
removeModelInput(AcceleratorNode aNode,
java.lang.String property) |
void |
resync() |
static void |
resync(IElement anElem,
java.util.Map<java.lang.String,java.lang.Double> valueMap)
Synchronizes anElem to the property values contained in valueMap.
|
void |
resyncFromCache()
use the cached values modified by the model inputs and resync the model
|
ModelInput |
setModelInput(AcceleratorNode aNode,
java.lang.String property,
double value)
Sets the specified node's property to the specified value.
|
void |
setSynchronizationMode(java.lang.String newMode)
Set the synchronization mode
|
void |
synchronize(IComposite comp,
AcceleratorNode node)
Creates a synchronization association between the specified composite
modeling element and accelerator hardware node.
|
void |
synchronize(IElement anElem,
AcceleratorNode aNode)
Creates a synchronization between the specified element and accelerator
node.
|
protected java.util.List<IElement> |
synchronizedElementsMappedTo(AcceleratorNode aNode) |
static java.util.List<java.lang.String> |
syncModes() |
public static final java.lang.String DEFAULT_SYNC_MODE
public static java.util.List<java.lang.String> syncModes()
public void setSynchronizationMode(java.lang.String newMode)
public java.lang.String getSynchronizationMode()
public void resync() throws SynchronizationException
SynchronizationException
public void resyncFromCache() throws SynchronizationException
SynchronizationException
public static void resync(IElement anElem, java.util.Map<java.lang.String,java.lang.Double> valueMap) throws SynchronizationException
anElem
- element to synchronizevalueMap
- a Map whose keys are property names and values are String property valuesSynchronizationException
public void synchronize(IElement anElem, AcceleratorNode aNode)
anElem
- the lattice element to create synchronization foraNode
- the accelerator node to synchronize the element withpublic void synchronize(IComposite comp, AcceleratorNode node)
Creates a synchronization association between the specified composite
modeling element and accelerator hardware node. A synchronization
association is created for each modeling element in the composite
element. Thus, the method is implemented by iterating over the
composite elements of the argument and calling the method
synchronize(IElement,AcceleratorNode)
.
Within the composite, a synchronization associate request is ignored if there is no synchronizer for the specified sub-element type. Request is also ignored if there is no accessor for the specified hardware node type, because the system does not know how to access data from the hardware object.
comp
- composite modeling element requiring synchronizationnode
- hardware node providing synchronizationsynchronize(IElement, AcceleratorNode)
public java.util.Map<java.lang.String,java.lang.Double> propertiesForNode(AcceleratorNode aNode)
public java.util.List<IElement> allElementsMappedTo(AcceleratorNode aNode)
protected java.util.List<IElement> synchronizedElementsMappedTo(AcceleratorNode aNode)
public ModelInput setModelInput(AcceleratorNode aNode, java.lang.String property, double value)
aNode
- node whose property to setproperty
- name of property to setvalue
- double value for propertypublic ModelInput getModelInput(AcceleratorNode aNode, java.lang.String propName)
aNode
- node whose property to get a ModelInput forpropName
- name of property to get a ModelInput forpublic void removeModelInput(AcceleratorNode aNode, java.lang.String property)
protected void debugPrint()
public boolean checkSynchronization(AcceleratorNode aNode, java.util.Map<java.lang.String,java.lang.Double> values) throws SynchronizationException
SynchronizationException