demos.atomicblocks
Class SDFSampleDelay

java.lang.Object
  extended by modhelxs.abstractsemantics.NamedEntity
      extended by modhelxs.abstractsemantics.ObservableEntity
          extended by modhelxs.abstractsemantics.Block
              extended by modhelxs.abstractsemantics.AtomicBlock
                  extended by demos.atomicblocks.SDFSampleDelay
All Implemented Interfaces:
AtomicBlock, Block, NamedEntity, ObservableEntity

public class SDFSampleDelay
extends AtomicBlock

An SDFSampleDelay is an SDF block which delays its input by one sample. At the first update, its produces an initial value on its output. This initial value is set by the "init" property (default value 0).

Author:
boulange

Field Summary
private  java.lang.Object current_value_
           
private  Pin input_
           
private  java.lang.Object next_value_
           
private  Pin output_
           
 
Constructor Summary
SDFSampleDelay(java.lang.String name, java.lang.Object... properties)
           
 
Method Summary
 void endOfSnapshot()
          End of the observation round, the observable can update its internal state.
 Pin input()
           
 Pin output()
           
 void reset()
          Reset the computation of the outputs and next state for the current snapshot.
 void setup()
          Prepare for the simulation.
 void update()
          Update the interface of the observable: take inputs into account, update outputs.
 
Methods inherited from class modhelxs.abstractsemantics.AtomicBlock
emitObservationRequests, endOfUpdate, prep, startOfSnapshot, startOfUpdate, validate, wrapup
 
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.Block
getParent
 
Methods inherited from interface modhelxs.ecore.ObservableEntity
getInterface
 
Methods inherited from interface modhelxs.ecore.NamedEntity
getName, getProperties, setName
 

Field Detail

next_value_

private java.lang.Object next_value_

current_value_

private java.lang.Object current_value_

input_

private final Pin input_

output_

private final Pin output_
Constructor Detail

SDFSampleDelay

public SDFSampleDelay(java.lang.String name,
                      java.lang.Object... properties)
Method Detail

input

public Pin input()

output

public Pin output()

setup

public void setup()
Description copied from class: ObservableEntity
Prepare for the simulation. Called after prep, before the first step of the simulation.

Overrides:
setup in class AtomicBlock

reset

public void reset()
Description copied from class: ObservableEntity
Reset the computation of the outputs and next state for the current snapshot.

Overrides:
reset in class AtomicBlock

update

public void update()
Description copied from class: ObservableEntity
Update the interface of the observable: take inputs into account, update outputs.

Specified by:
update in class ObservableEntity

endOfSnapshot

public void endOfSnapshot()
Description copied from class: ObservableEntity
End of the observation round, the observable can update its internal state.

Overrides:
endOfSnapshot in class AtomicBlock