|
||||||||||
| 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
public abstract class InterfaceBlock
An InterfaceBlock is a special kind of Block. Its behavior is given by a ModHel'X model. An InterfaceBlock adapts behavior between its interface and the interface of its inner model.
| Field Summary | |
|---|---|
private java.util.List<Relation> |
adaptation_
The relations between the pins of the interface block and the pins of the internal model. |
private java.util.Set<Pin> |
inputpins_
The set of input pins (cached value). |
private Model<?> |
internal_
The internal model of this interface block. |
private java.util.Set<Pin> |
outputpins_
The set of output pins (cached value). |
| Constructor Summary | |
|---|---|
InterfaceBlock(java.lang.String name,
Model<?> model,
java.lang.Object... properties)
|
|
| Method Summary | |
|---|---|
abstract void |
adaptIn()
Adapt data, time and control from the outer model to the inner one. |
abstract void |
adaptOut()
Adapt data, time and control from the inner model to the outer one. |
Relation |
connect(Pin mine,
Pin other)
Connect one of my pins to another pin. |
Relation |
connectFromModel(Model<?> model,
Pin other,
Pin mine)
Connect pin other of Model model to my pin mine. |
Relation |
createAdaptationRelation(Pin source,
Pin target)
Create a relation between a pin of the interface block and a pin of the internal model (or vice versa). |
void |
emitObservationRequests()
Emit observation request for future snapshots by creating ticks on clocks. |
void |
endOfSnapshot()
End of the observation round, the observable can update its internal state. |
java.util.Collection<Relation> |
getAdaptation()
Get the relations between the interface of this block and the interface of its internal model. |
java.util.Collection<Pin> |
getInputPins()
Get the input pins of this entity. |
Model<?> |
getInternalModel()
Get the internal model of this interface block. |
java.util.Collection<Pin> |
getOutputPins()
Get the output ins of this entity. |
void |
prep()
Initialize the entity. |
void |
reset()
Reset the computation of the outputs and next state for the current snapshot. |
void |
setup()
Prepare for the simulation. |
void |
startOfSnapshot()
Start a new snapshot (observation round). |
void |
update()
Update the interface of the observable: take inputs into account, update outputs. |
boolean |
validate()
Validate the computation of the observation. |
void |
wrapup()
Cleanup at the end of the simulation. |
| 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, endOfUpdate, getInterface, getPin, startOfUpdate |
| 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 Model<?> internal_
private java.util.List<Relation> adaptation_
private java.util.Set<Pin> inputpins_
private java.util.Set<Pin> outputpins_
| Constructor Detail |
|---|
public InterfaceBlock(java.lang.String name,
Model<?> model,
java.lang.Object... properties)
| Method Detail |
|---|
public abstract void adaptIn()
public abstract void adaptOut()
public java.util.Collection<Relation> getAdaptation()
InterfaceBlock
getAdaptation in interface InterfaceBlockpublic Model<?> getInternalModel()
InterfaceBlock
getInternalModel in interface InterfaceBlock
public Relation connect(Pin mine,
Pin other)
connect in class Block
public Relation createAdaptationRelation(Pin source,
Pin target)
public Relation connectFromModel(Model<?> model,
Pin other,
Pin mine)
other of Model model to my pin mine.
connectFromModel in class Blockpublic void prep()
ObservableEntity
prep in class ObservableEntitypublic void setup()
ObservableEntity
setup in class ObservableEntitypublic void startOfSnapshot()
ObservableEntity
startOfSnapshot in class ObservableEntitypublic void reset()
ObservableEntity
reset in class ObservableEntitypublic void update()
ObservableEntity
update in class ObservableEntitypublic boolean validate()
ObservableEntity
validate in class ObservableEntitypublic void endOfSnapshot()
ObservableEntity
endOfSnapshot in class ObservableEntitypublic void emitObservationRequests()
ObservableEntity
emitObservationRequests in class ObservableEntitypublic void wrapup()
ObservableEntity
wrapup in class ObservableEntitypublic java.util.Collection<Pin> getInputPins()
ObservableEntity
getInputPins in class Blockpublic java.util.Collection<Pin> getOutputPins()
ObservableEntity
getOutputPins in class Block
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||