|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmodhelxs.abstractsemantics.NamedEntity
modhelxs.abstractsemantics.ObservableEntity
modhelxs.abstractsemantics.Block
modhelxs.abstractsemantics.InterfaceBlock
modhelxs.state_management.ManagedInterfaceBlock
public abstract class ManagedInterfaceBlock
An InterfaceBlock with default management for state changes.
| Field Summary | |
|---|---|
private TransientValue<java.lang.Boolean> |
internal_was_updated_
Transient value telling whether the internal model was updated during this snapshot. |
private State |
myState_
The state of the block, managing the revert and commit operations on its state values. |
private TransientValue<java.lang.Boolean> |
was_updated_
Transient value telling whether the block was updated during this snapshot. |
| Constructor Summary | |
|---|---|
ManagedInterfaceBlock(java.lang.String name,
Model<?> model,
java.lang.Object... properties)
|
|
| Method Summary | |
|---|---|
private boolean |
checkNotManagedFields()
Check for fields that are not final and are not manageable by a State object. |
abstract void |
doEndOfSnapshot()
The endOfSnapshot behavior of the interface block. |
abstract void |
doGhostUpdate()
The update behavior of the interface block when the internal model is not updated. |
abstract void |
doPostUpdate()
The update behavior of the interface block after updating the internal model. |
abstract void |
doPreSetup()
Some pre-setup behavior necessary for subclasses. |
abstract void |
doPreUpdate()
The update behavior of the interface block before updating the internal model. |
abstract void |
doReset()
The reset behavior of the interface block. |
abstract void |
doSetup()
The setup behavior of the block. |
abstract void |
doStartOfSnapshot()
The start of snapshot behavior of the block. |
void |
endOfSnapshot()
The endOfSnapshot behavior of the ManagedInterfaceBlock, which calls doEndOfSnapshot() and manages the state values. |
void |
endOfUpdate()
End of a partial update (produce partial outputs to the outer model). |
void |
initFromProperties(java.lang.String... assignments)
Initialize the state values and parameters of the block from its properties. |
boolean |
internalWasUpdated()
Tell whether the internal model was updated during this snapshot. |
void |
reset()
The reset behavior of the ManagedInterfaceBlock, which manages the state values and calls doReset(). |
void |
setup()
The setup behavior of the ManagedInterfaceBlock, which manages the state values and calls doSetup(). |
abstract boolean |
shouldUpdateModel()
Should the internal model be updated. |
void |
startOfSnapshot()
Start a new snapshot (observation round). |
void |
startOfUpdate()
Start a partial update (get partial inputs from the outer model). |
void |
update()
The update behavior of the ManagedInterfaceBlock, which calls doPreUpdate(), doPostUpdate() and manages the state values. |
boolean |
wasUpdated()
Tell whether the block was updated during this snapshot. |
| Methods inherited from class modhelxs.abstractsemantics.InterfaceBlock |
|---|
adaptIn, adaptOut, connect, connectFromModel, createAdaptationRelation, emitObservationRequests, getAdaptation, getInputPins, getInternalModel, getOutputPins, prep, validate, wrapup |
| Methods inherited from class modhelxs.abstractsemantics.Block |
|---|
connectFromInterfaceBlock, connectFromRegularBlock, getEngine, getMoC, getParent, getSolver, getTimeOfRequest, hasObservationRequest, sanityCheck, setParent |
| Methods inherited from class modhelxs.abstractsemantics.ObservableEntity |
|---|
addPin, getInterface, getPin |
| Methods inherited from class modhelxs.abstractsemantics.NamedEntity |
|---|
getName, getProperties, getProperty, hasProperty, removeProperty, setName, setProperties, setProperty, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface modhelxs.ecore.Block |
|---|
getParent |
| Methods inherited from interface modhelxs.ecore.ObservableEntity |
|---|
getInterface |
| Methods inherited from interface modhelxs.ecore.NamedEntity |
|---|
getName, getProperties, setName |
| Field Detail |
|---|
private TransientValue<java.lang.Boolean> was_updated_
private TransientValue<java.lang.Boolean> internal_was_updated_
private State myState_
| Constructor Detail |
|---|
public ManagedInterfaceBlock(java.lang.String name,
Model<?> model,
java.lang.Object... properties)
| Method Detail |
|---|
private boolean checkNotManagedFields()
public boolean wasUpdated()
public boolean internalWasUpdated()
public void initFromProperties(java.lang.String... assignments)
public abstract void doStartOfSnapshot()
public abstract void doPreSetup()
public abstract void doSetup()
public final void startOfSnapshot()
ObservableEntity
startOfSnapshot in class InterfaceBlockpublic final void setup()
setup in class InterfaceBlockpublic abstract void doReset()
public final void reset()
reset in class InterfaceBlockpublic void startOfUpdate()
ObservableEntity
startOfUpdate in class ObservableEntitypublic void endOfUpdate()
ObservableEntity
endOfUpdate in class ObservableEntitypublic abstract void doPreUpdate()
public abstract boolean shouldUpdateModel()
public abstract void doPostUpdate()
public abstract void doGhostUpdate()
public final void update()
update in class InterfaceBlockpublic abstract void doEndOfSnapshot()
public final void endOfSnapshot()
endOfSnapshot in class InterfaceBlock
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||