demos.atomicblocks
Class DETestLogger

java.lang.Object
  extended by modhelxs.abstractsemantics.NamedEntity
      extended by modhelxs.abstractsemantics.ObservableEntity
          extended by modhelxs.abstractsemantics.Block
              extended by modhelxs.state_management.ManagedBlock
                  extended by modhelxs.state_management.PlainManagedBlock
                      extended by demos.atomicblocks.DETestLogger
All Implemented Interfaces:
Block, NamedEntity, ObservableEntity

public class DETestLogger
extends PlainManagedBlock

A DETestLogger is a Block which logs the value of each of its Pins at each snapshot. The log is obtained with the getLog() method.


Field Summary
private  TransientMap<Pin,java.lang.Object> data_
           
private  Pin input_
           
private  java.lang.StringBuilder log_
           
 
Constructor Summary
DETestLogger(java.lang.String name)
           
 
Method Summary
 void doEndOfSnapshot()
          The endOfSnapshot behavior of the block.
 void doSetup()
          The setup behavior of the block.
 void doUpdate()
          The update behavior of the block.
 java.lang.String getLog()
           
 Pin input()
           
 
Methods inherited from class modhelxs.state_management.PlainManagedBlock
doPreSetup, doReset, doStartOfSnapshot
 
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 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

data_

private TransientMap<Pin,java.lang.Object> data_

input_

private final Pin input_

log_

private java.lang.StringBuilder log_
Constructor Detail

DETestLogger

public DETestLogger(java.lang.String name)
Method Detail

input

public Pin input()

doSetup

public void doSetup()
Description copied from class: ManagedBlock
The setup behavior of the block.

Specified by:
doSetup in class ManagedBlock

doUpdate

public void doUpdate()
Description copied from class: ManagedBlock
The update behavior of the block.

Specified by:
doUpdate in class ManagedBlock

doEndOfSnapshot

public void doEndOfSnapshot()
Description copied from class: ManagedBlock
The endOfSnapshot behavior of the block.

Overrides:
doEndOfSnapshot in class PlainManagedBlock

getLog

public java.lang.String getLog()