|
||||||||||
| 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.state_management.ManagedBlock
public abstract class ManagedBlock
A Block with default management for state changes.
| Field Summary | |
|---|---|
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 | |
|---|---|
ManagedBlock(java.lang.String name,
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 block. |
abstract void |
doPreSetup()
Some pre-setup behavior necessary for subclasses. |
abstract void |
doReset()
The reset behavior of the block. |
abstract void |
doSetup()
The setup behavior of the block. |
abstract void |
doStartOfSnapshot()
The start of snapshot behavior of the block. |
abstract void |
doUpdate()
The update behavior of the block. |
void |
emitObservationRequests()
Emit observation request for future snapshots by creating ticks on clocks. |
void |
endOfSnapshot()
The endOfSnapshot behavior of the ManagedBlock, 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. |
void |
prep()
Initialize the entity. |
void |
reset()
The reset behavior of the ManagedBlock, which manages the state values and calls doReset(). |
void |
setup()
The setup behavior of the ManagedBlock, which manages the state values and calls doSetup(). |
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 ManagedBlock, which calls doUpdate() and manages the state values. |
boolean |
validate()
Validate the computation of the observation. |
boolean |
wasUpdated()
Tell whether the block was updated during this snapshot. |
void |
wrapup()
Cleanup at the end of the simulation. |
| Methods inherited from class modhelxs.abstractsemantics.Block |
|---|
connect, connectFromInterfaceBlock, connectFromModel, connectFromRegularBlock, getEngine, getInputPins, getMoC, getOutputPins, 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.ObservableEntity |
|---|
getInterface |
| Methods inherited from interface modhelxs.ecore.NamedEntity |
|---|
getName, getProperties, setName |
| Field Detail |
|---|
private TransientValue<java.lang.Boolean> was_updated_
private State myState_
| Constructor Detail |
|---|
public ManagedBlock(java.lang.String name,
java.lang.Object... properties)
| Method Detail |
|---|
private boolean checkNotManagedFields()
public boolean wasUpdated()
public void initFromProperties(java.lang.String... assignments)
public void prep()
ObservableEntity
prep in class ObservableEntitypublic abstract void doStartOfSnapshot()
public abstract void doPreSetup()
public abstract void doSetup()
public final void setup()
setup in class ObservableEntitypublic void startOfSnapshot()
ObservableEntity
startOfSnapshot in class ObservableEntitypublic abstract void doReset()
public final void reset()
reset in class ObservableEntitypublic void startOfUpdate()
ObservableEntity
startOfUpdate in class ObservableEntitypublic abstract void doUpdate()
public final void update()
update in class ObservableEntitypublic void endOfUpdate()
ObservableEntity
endOfUpdate in class ObservableEntitypublic boolean validate()
ObservableEntity
validate in class ObservableEntitypublic abstract void doEndOfSnapshot()
public final void endOfSnapshot()
endOfSnapshot in class ObservableEntitypublic void emitObservationRequests()
ObservableEntity
emitObservationRequests in class ObservableEntitypublic void wrapup()
ObservableEntity
wrapup in class ObservableEntity
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||