Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## modhelxs.state_management
Class TimedManagedBlock<T extends java.lang.Comparable<? super T>>

    java.lang.Object
      modhelxs.abstractsemantics.NamedEntity
          modhelxs.abstractsemantics.ObservableEntity
              modhelxs.abstractsemantics.Block
                  modhelxs.state_management.ManagedBlock
                      modhelxs.state_management.TimedManagedBlock<T>

All Implemented Interfaces:
  Block, NamedEntity, ObservableEntity

Direct Known Subclasses:
  DEConst, DEDelay, DERamp, DEScenario, EventFeeder

    public abstract class TimedManagedBlock<T extends java.lang.Comparable<? super T>>

extends ManagedBlock

A ManagedBlock with timed behavior.

Field Summary
`(package private) java.lang.Class<T>` | `clockType_` The type of the time for the observation clock.
`private Clock<T>` | `my_clock_` The observation clock of the block.
`private Attribute<T>` | `next_obs_time` Time of the next observation.

Constructor Summary
`TimedManagedBlock(java.lang.Class<T> clockType, TagCalculus<T> tcalc, java.lang.String name, java.lang.Object... properties)`

Method Summary
`void` | `doPreSetup()` Some pre-setup behavior necessary for subclasses.
`void` | `doReset()` The reset behavior of the block.
`void` | `doStartOfSnapshot()` The start of snapshot behavior of the block.
`void` | `emitObservationRequests()` Emit observation request for future snapshots by creating ticks on clocks.
`T` | `getNextObservationTime()` Return the next observation date of the block.
`Tag<T>` | `getTimeOfRequest()` Get the time tag at which the block has requested to be observed.
`boolean` | `hasObservationRequest()` Has this block posted an observation request?
`T` | `initNextObservationTime(T date)` Initialize the next observation date of the block (during setup).
`static java.lang.String` | `nextObsTimeAttribute()`
`Clock<T>` | `observationClock()` Return the observation clock of the block.
`T` | `setNextObservationTime(T date)` Set the next observation date of the block.
`T` | `tagDifference(T a, T b)`
`T` | `tagProduct(T a, T b)`
`T` | `tagQuotient(T a, T b)`
`T` | `tagSum(T a, T b)`

Methods inherited from class modhelxs.state_management.ManagedBlock
`doEndOfSnapshot, doSetup, doUpdate, endOfSnapshot, endOfUpdate, initFromProperties, prep, reset, setup, startOfSnapshot, startOfUpdate, update, validate, wasUpdated, wrapup`

Methods inherited from class modhelxs.abstractsemantics.Block
`connect, connectFromInterfaceBlock, connectFromModel, connectFromRegularBlock, getEngine, getInputPins, getMoC, getOutputPins, 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.ObservableEntity
`getInterface`

Methods inherited from interface modhelxs.ecore.NamedEntity
`getName, getProperties, setName`

Field Detail

### clockType_

    java.lang.Class<T extends java.lang.Comparable<? super T>> clockType_

  The type of the time for the observation clock.

### my_clock_

    private Clock<T extends java.lang.Comparable<? super T>> my_clock_

  The observation clock of the block.

### next_obs_time

    private Attribute<T extends java.lang.Comparable<? super T>> next_obs_time

  Time of the next observation.

Constructor Detail

### TimedManagedBlock

    public TimedManagedBlock(java.lang.Class<T> clockType,
                             TagCalculus<T> tcalc,
                             java.lang.String name,
                             java.lang.Object... properties)

Method Detail

### nextObsTimeAttribute

    public static java.lang.String nextObsTimeAttribute()

### observationClock

    public Clock<T> observationClock()

  Return the observation clock of the block.

### getNextObservationTime

    public T getNextObservationTime()

  Return the next observation date of the block.

### setNextObservationTime

    public T setNextObservationTime(T date)

  Set the next observation date of the block.

### initNextObservationTime

    public T initNextObservationTime(T date)

  Initialize the next observation date of the block (during setup).

### doStartOfSnapshot

    public void doStartOfSnapshot()

  Description copied from class: `ManagedBlock`
  The start of snapshot behavior of the block.

  Specified by:
    `doStartOfSnapshot` in class `ManagedBlock`

### doReset

    public void doReset()

  Description copied from class: `ManagedBlock`
  The reset behavior of the block.

  Specified by:
    `doReset` in class `ManagedBlock`

### doPreSetup

    public void doPreSetup()

  Description copied from class: `ManagedBlock`
  Some pre-setup behavior necessary for subclasses.

  Specified by:
    `doPreSetup` in class `ManagedBlock`

### emitObservationRequests

    public final void emitObservationRequests()

  Description copied from class: `ObservableEntity`
  Emit observation request for future snapshots by creating ticks on clocks.

  Overrides:
    `emitObservationRequests` in class `ManagedBlock`

### hasObservationRequest

    public final boolean hasObservationRequest()

  Description copied from class: `Block`
  Has this block posted an observation request? If yes, the block needs to be updated even if the scheduling policy of the MoC does not require it.

  Overrides:
    `hasObservationRequest` in class `Block`

### getTimeOfRequest

    public final Tag<T> getTimeOfRequest()

  Description copied from class: `Block`
  Get the time tag at which the block has requested to be observed.

  Overrides:
    `getTimeOfRequest` in class `Block`

### tagSum

    public T tagSum(T a,
                    T b)

### tagDifference

    public T tagDifference(T a,
                           T b)

### tagProduct

    public T tagProduct(T a,
                        T b)

### tagQuotient

    public T tagQuotient(T a,
                         T b)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD