demos.atomicblocks
Class SDFAdder
java.lang.Object
modhelxs.abstractsemantics.NamedEntity
modhelxs.abstractsemantics.ObservableEntity
modhelxs.abstractsemantics.Block
modhelxs.state_management.ManagedBlock
modhelxs.state_management.PlainManagedBlock
demos.atomicblocks.SDFAdder
- All Implemented Interfaces:
- Block, NamedEntity, ObservableEntity
public class SDFAdder
- extends PlainManagedBlock
An SDFAdder is an SDF block which computes the sum of the tokens on all its input
pins and puts the result on all its output pins.
This block creates two inputs and one output, respectively obtained using the
input(<1 or 2>) and output() methods.
- Author:
- boulange
|
Constructor Summary |
SDFAdder(java.lang.String name)
|
| Methods inherited from class modhelxs.state_management.ManagedBlock |
emitObservationRequests, 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, getTimeOfRequest, hasObservationRequest, sanityCheck, setParent |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
sum_
private TransientValue<java.lang.Double> sum_
input_
private final Pin[] input_
output_
private final Pin output_
SDFAdder
public SDFAdder(java.lang.String name)
doSetup
public void doSetup()
- Description copied from class:
ManagedBlock
- The setup behavior of the block.
- Specified by:
doSetup in class ManagedBlock
input
public Pin input(int num)
output
public Pin output()
doUpdate
public void doUpdate()
- Description copied from class:
ManagedBlock
- The update behavior of the block.
- Specified by:
doUpdate in class ManagedBlock