public class FloatDelay extends CompilableFloatStoredSignalSource implements Register
FloatClockedSignalSource.AbstractRandom
Process.Proxy
out
STREAM_CHARACTERISTICS, STREAM_SIZE
Constructor and Description |
---|
FloatDelay(float initial)
Creates a new instance without a valid input source.
|
FloatDelay(float initial,
FloatSignalSource in)
Creates a new instance with an independent input source.
|
FloatDelay(float initial,
Function<? super FloatDelay,? extends FloatSignalSource> in)
Creates a new instance with a feedback-looped input source.
|
Modifier and Type | Method and Description |
---|---|
Consumer<CompilationContext> |
compileControlFlow()
Compiles the state transition of this entity.
|
Consumer<CompilationContext> |
compileGetNextValue()
Returns a code generator for loading the next value of the compiled
version of this component on the operand stack.
|
Consumer<CompilationContext> |
compileInitialization()
Compiles the initialization of this entity.
|
Consumer<CompilationContext> |
compileSetNextValue(Consumer<CompilationContext> value)
Returns a code generator for storing the next value of the compiled
version of this component from the operand stack.
|
Process |
getLoadPhase() |
float |
getNextValue()
Returns the value that will be produced on the next clock tick.
|
protected VariableContext.Variable |
getNextVariable(CompilationContext context) |
Process |
getStorePhase() |
void |
init()
Initializes the state of this process.
|
void |
setInput(FloatSignalSource in) |
void |
setNextValue(float next)
Sets the value that will be produced on the next clock tick.
|
void |
step(RealtimeContext context)
Signals a time event, executing a transition step for this process to the
next observable state.
|
compileDataFlow, compileSetStoredValueVariable, getStoredValueVariable, publishStoredValueVariable
getAsFloat
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
andMeanwhile, andMeanwhile
adHoc, after, clock, compile, cycle, dt, during, random, random, random, randomGaussian, randomGaussian, randomGaussian, rate
abs, add, choose, choose, choose, choose, clock, compileMainSignalSource, constant, defined, delayed, delayed, delayedFeedback, delayedFeedback, divide, equal, getConstantAsFloat, getValueClass, glidingAverage, glidingStandardDeviation, glidingSum, glidingVariance, greaterOrEqual, greaterThan, guard, hasConstantAsFloat, invariant, lessOrEqual, lessThan, map, max, min, modulo, multiply, negate, negative, nonEqual, nonnegative, nonpositive, nonzero, notANumber, positive, power, probe, relateWith, sampleAndHold, selectAffine, series, sqrt, stored, subtract, zero, zeroCrossing, zipWith
compileDataFlowTo, hasDataFlowIO
afterEvery, andThen, compileAsMainProcess, every, getProcess, hasControlFlowIO, hasInitializationIO, probe, sequence, sequence
public FloatDelay(float initial)
setInput(eu.bandm.sig.adlib2.FloatSignalSource)
must be invoked before this signal
source can be used.initial
- the initial value of this signal sourcepublic FloatDelay(float initial, FloatSignalSource in)
initial
- the initial value of this signal sourcein
- the input signal sourcepublic FloatDelay(float initial, Function<? super FloatDelay,? extends FloatSignalSource> in)
initial
- the initial value of this signal sourcein
- a function that constructs the input signal source when
applied to this delayed signal sourcepublic void setInput(FloatSignalSource in)
public Process getLoadPhase()
getLoadPhase
in interface Register
public Process getStorePhase()
getStorePhase
in interface Register
public void init()
Process
Process.step(RealtimeContext)
transitions to
the first specified observable state.
The default implementation does nothing.
public void step(RealtimeContext context)
Process
The state of the process after successful completion of this method
should be the n-th observable state, if Process.step(eu.bandm.sig.adlib2.RealtimeContext)
has been
invoked n times since the last initialization via Process.init()
.
The behavior of this method is unspecified if Process.init()
has not been
invoked before.
If this method completes abruptly by throwing an error or unchecked exception, the process state should be considered invalid.
protected VariableContext.Variable getNextVariable(CompilationContext context)
public Consumer<CompilationContext> compileInitialization()
CompilableControlFlow
compileInitialization
in interface CompilableControlFlow
compileInitialization
in interface Process
compileInitialization
in class CompilableFloatStoredSignalSource
Process.hasInitializationIO(eu.bandm.sig.adlib2.compile.CompilationContext)
public Consumer<CompilationContext> compileControlFlow()
CompilableControlFlow
compileControlFlow
in interface CompilableControlFlow
compileControlFlow
in interface Process
compileControlFlow
in class CompilableFloatStoredSignalSource
Process.hasControlFlowIO(eu.bandm.sig.adlib2.compile.CompilationContext)
public float getNextValue()
This method is in concurrent reader–writer conflict with the getStorePhase()
process.
public Consumer<CompilationContext> compileGetNextValue()
getNextValue()
public void setNextValue(float next)
This method is in concurrent writer–writer conflict with the
getStorePhase()
process.
public Consumer<CompilationContext> compileSetNextValue(Consumer<CompilationContext> value)
setNextValue(float)