Class BooleanMultiDelay
- All Implemented Interfaces:
AbstractClockedSignalSource,AbstractSignalSource,BooleanClockedSignalSource,BooleanSignalSource,CompilableControlFlow,CompilableDataFlow,Component,Process,Register,BooleanSupplier
A single instance of this class is operationally equivalent to a chain of single-step delay operators. However, the computational costs of the former per clock tick are constant, whereas for the latter they grow linearly with the length of the chain.
-
Nested Class Summary
Nested classes/interfaces inherited from interface eu.bandm.sig.adlib2.Process
Process.Proxy -
Field Summary
Fields inherited from class eu.bandm.sig.adlib2.BooleanStoredSignalSource
outFields inherited from interface eu.bandm.sig.adlib2.AbstractClockedSignalSource
STREAM_CHARACTERISTICS, STREAM_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionBooleanMultiDelay(boolean... initial) BooleanMultiDelay(boolean[] initial, BooleanSignalSource in) BooleanMultiDelay(boolean[] initial, Function<? super BooleanMultiDelay, ? extends BooleanSignalSource> in) -
Method Summary
Modifier and TypeMethodDescriptionCompiles the state transition of this process.Compiles the initialization of this process.protected eu.bandm.tools.lljava.live.VariableContext.VariablegetNextVariable(CompilationContext context) protected eu.bandm.tools.lljava.live.VariableContext.VariablegetPhaseVariable(CompilationContext context) voidinit()Initializes the state of this process.voidvoidstep()Signals a time event, executing a transition step for this process to the next observable state.Methods inherited from class eu.bandm.sig.adlib2.compile.CompilableBooleanStoredSignalSource
compileDataFlow, compileSetStoredValueVariable, getStoredValueVariable, publishStoredValueVariableMethods inherited from class eu.bandm.sig.adlib2.BooleanStoredSignalSource
getAsBooleanMethods inherited from class eu.bandm.sig.adlib2.AbstractProcess
getRealtimeContext, setRealtimeContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface eu.bandm.sig.adlib2.BooleanClockedSignalSource
after, compile, drain, drain, duringMethods inherited from interface eu.bandm.sig.adlib2.BooleanSignalSource
and, becoming, ceasing, choose, choose, choose, choose, choose, choose, choose, choose, choose, compileMainSignalSource, DEBUG, delayed, delayed, getConstantAsBoolean, getValueClass, guard, hasConstantAsBoolean, invariant, map, not, or, power, probe, relateWith, sampleAndHold, stored, xor, zipWithMethods inherited from interface eu.bandm.sig.adlib2.compile.CompilableDataFlow
compileDataFlowTo, hasDataFlowIOMethods inherited from interface eu.bandm.sig.adlib2.Process
afterEvery, andThen, compileAsMainProcess, every, every, getProcess, hasControlFlowIO, hasInitializationIO, setRealtimeContextMethods inherited from interface eu.bandm.sig.adlib2.Register
andMeanwhile, andMeanwhile
-
Constructor Details
-
BooleanMultiDelay
-
BooleanMultiDelay
-
BooleanMultiDelay
@Undocumented public BooleanMultiDelay(boolean[] initial, Function<? super BooleanMultiDelay, ? extends BooleanSignalSource> in)
-
-
Method Details
-
setInput
-
getLoadPhase
- Specified by:
getLoadPhasein interfaceRegister
-
getStorePhase
- Specified by:
getStorePhasein interfaceRegister
-
init
Description copied from interface:ProcessInitializes the state of this process. The state is initialized such that the first subsequent call toProcess.step()transitions to the first specified observable state.The default implementation does nothing.
-
step
Description copied from interface:ProcessSignals a time event, executing a transition step for this process to the next observable state.The state of the process after successful completion of this method should be the n-th observable state, if
Process.step()has been invoked n times since the last initialization viaProcess.init(). The behavior of this method is unspecified ifProcess.init()has not been invoked before.FIXME:
Process.setRealtimeContext(eu.bandm.sig.adlib2.RealtimeContext)If this method completes abruptly by throwing an error or unchecked exception, the process state should be considered invalid.
-
getNextVariable
@Undocumented protected eu.bandm.tools.lljava.live.VariableContext.Variable getNextVariable(CompilationContext context) -
getPhaseVariable
@Undocumented protected eu.bandm.tools.lljava.live.VariableContext.Variable getPhaseVariable(CompilationContext context) -
compileInitialization
Description copied from interface:ProcessCompiles the initialization of this process.This method emits code equivalent to the
Process.init()method of this component. The compilation context should be set up to specify no input or output variables.The default implementation emits code that simply invokes
Process.init()for this process.This method should be overridden together with
Process.compileControlFlow(), in order to ensure that both operate on the same state variables.- Specified by:
compileInitializationin interfaceCompilableControlFlow- Specified by:
compileInitializationin interfaceProcess- Overrides:
compileInitializationin classCompilableBooleanStoredSignalSource- See Also:
-
compileControlFlow
Description copied from interface:ProcessCompiles the state transition of this process.This method emits code equivalent to the
Process.step()method of this process. The compilation context should be set up to specify no input or output variables.The default implementation emits code that simply invokes
Process.step()for this process.This method should be overridden together with
Process.compileInitialization(), in order to ensure that both operate on the same state variables.- Specified by:
compileControlFlowin interfaceCompilableControlFlow- Specified by:
compileControlFlowin interfaceProcess- Specified by:
compileControlFlowin classCompilableBooleanStoredSignalSource- See Also:
-