|
||||||||||
| 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
demos.semantic_adaptation.DE_TFSM_InterfaceBlock
public class DE_TFSM_InterfaceBlock
This DE/TFSM interface block implements decoding input DE events to TFSM input symbols and encoding TFSM output symbols into DE events. The matching between DE events and TFSM symbols is described by setting relations between DE pins and TFSM pins. When a DE pin is connected to several TFSM pins, the value of a DE events on this pin is compared to the "match" property of the TFSM pins. A token is put on every TFSM pin whose "match" property is null or equals the value of the DE event. If no TFSM pin match the value, a warning is emitted. To avoid this warning, it is possible to tell which values should be ignored in the "discard" property of the DE pin (the type of this property is Object[]). The "match" property of output TFSM pins is used to set the value of the DE event produced on all the output pins of the interface block which are connected to them. Two properties "a" and "b" configure the adaptation of time scales between DE and TFSM. Time in TFSM is a*t+b if 't' is the time in DE. This means that time in TFSM runs 'a' times faster than in DE and is offset by 'b'.
| Field Summary | |
|---|---|
private TransientValue<java.lang.Boolean> |
incoming_event
|
private TFSMMoC |
internal_moc_
|
private Parameter<java.lang.Double> |
timescale_coeff
|
private Parameter<java.lang.Double> |
timescale_offset
|
| Constructor Summary | |
|---|---|
DE_TFSM_InterfaceBlock(java.lang.String name,
Model<java.lang.Double> model,
java.lang.Object... properties)
|
|
| Method Summary | |
|---|---|
void |
adaptIn()
Adapt data, time and control from the outer model to the inner one. |
void |
adaptOut()
Adapt data, time and control from the inner model to the outer one. |
void |
doEndOfSnapshot()
The endOfSnapshot behavior of the interface block. |
void |
doGhostUpdate()
The update behavior of the interface block when the internal model is not updated. |
void |
doPostUpdate()
The update behavior of the interface block after updating the internal model. |
void |
doPreSetup()
Some pre-setup behavior necessary for subclasses. |
void |
doPreUpdate()
The update behavior of the interface block before updating the internal model. |
void |
doReset()
The reset behavior of the interface block. |
void |
doSetup()
The setup behavior of the block. |
void |
doStartOfSnapshot()
The start of snapshot behavior of the block. |
Tag<java.lang.Double> |
getTimeOfRequest()
Get the time tag at which the block has requested to be observed. |
boolean |
hasObservationRequest()
Has this block posted an observation request? |
boolean |
shouldUpdateModel()
Should the internal model be updated. |
| Methods inherited from class modhelxs.state_management.ManagedInterfaceBlock |
|---|
endOfSnapshot, endOfUpdate, initFromProperties, internalWasUpdated, reset, setup, startOfSnapshot, startOfUpdate, update, wasUpdated |
| Methods inherited from class modhelxs.abstractsemantics.InterfaceBlock |
|---|
connect, connectFromModel, createAdaptationRelation, emitObservationRequests, getAdaptation, getInputPins, getInternalModel, getOutputPins, prep, validate, wrapup |
| Methods inherited from class modhelxs.abstractsemantics.Block |
|---|
connectFromInterfaceBlock, connectFromRegularBlock, getEngine, getMoC, getParent, getSolver, 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 Parameter<java.lang.Double> timescale_coeff
private Parameter<java.lang.Double> timescale_offset
private TransientValue<java.lang.Boolean> incoming_event
private final TFSMMoC internal_moc_
| Constructor Detail |
|---|
public DE_TFSM_InterfaceBlock(java.lang.String name,
Model<java.lang.Double> model,
java.lang.Object... properties)
| Method Detail |
|---|
public void doStartOfSnapshot()
ManagedInterfaceBlock
doStartOfSnapshot in class ManagedInterfaceBlockpublic void doPreSetup()
ManagedInterfaceBlock
doPreSetup in class ManagedInterfaceBlockpublic void doSetup()
ManagedInterfaceBlock
doSetup in class ManagedInterfaceBlockpublic void doReset()
ManagedInterfaceBlock
doReset in class ManagedInterfaceBlockpublic void adaptIn()
InterfaceBlock
adaptIn in class InterfaceBlockpublic void doPreUpdate()
ManagedInterfaceBlock
doPreUpdate in class ManagedInterfaceBlockpublic boolean shouldUpdateModel()
ManagedInterfaceBlock
shouldUpdateModel in class ManagedInterfaceBlockpublic void doPostUpdate()
ManagedInterfaceBlock
doPostUpdate in class ManagedInterfaceBlockpublic void doGhostUpdate()
ManagedInterfaceBlock
doGhostUpdate in class ManagedInterfaceBlockpublic void adaptOut()
InterfaceBlock
adaptOut in class InterfaceBlockpublic void doEndOfSnapshot()
ManagedInterfaceBlock
doEndOfSnapshot in class ManagedInterfaceBlockpublic boolean hasObservationRequest()
Block
hasObservationRequest in class Blockpublic Tag<java.lang.Double> getTimeOfRequest()
Block
getTimeOfRequest in class Block
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||