Class IntDelay
- All Implemented Interfaces:
AbstractClockedSignalSource,AbstractSignalSource,Component,IntClockedSignalSource,IntSignalSource,Process,Register,IntSupplier
- Direct Known Subclasses:
EnumDelay
-
Nested Class Summary
Nested classes/interfaces inherited from interface eu.bandm.sig.adlib2.IntClockedSignalSource
IntClockedSignalSource.AbstractRandomNested classes/interfaces inherited from interface eu.bandm.sig.adlib2.Process
Process.Proxy -
Field Summary
Fields inherited from class eu.bandm.sig.adlib2.IntStoredSignalSource
outFields inherited from interface eu.bandm.sig.adlib2.AbstractClockedSignalSource
STREAM_CHARACTERISTICS, STREAM_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionIntDelay(int initial) Creates a new instance without a valid input source.IntDelay(int initial, IntSignalSource in) Creates a new instance with an independent input source.IntDelay(int initial, Function<? super IntDelay, ? extends IntSignalSource> in) Creates a new instance with a feedback-looped input source. -
Method Summary
Modifier and TypeMethodDescriptionReturns the load phase of this register.intReturns the value that will be produced on the next clock tick.Returns the store phase of this register.voidinit()Initializes the state of this process.voidvoidsetNextValue(int next) Sets the value that will be produced on the next clock tick.voidstep()Signals a time event, executing a transition step for this process to the next observable state.Methods inherited from class eu.bandm.sig.adlib2.IntStoredSignalSource
getAsIntMethods inherited from class eu.bandm.sig.adlib2.AbstractProcess
getRealtimeContext, hasFixedConstantRealtimeContext, 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.IntClockedSignalSource
after, drain, drain, during, spliterator, streamMethods inherited from interface eu.bandm.sig.adlib2.IntSignalSource
abs, add, asDouble, asFloat, asInt, clockedAfter, delayed, delayed, divide, equal, getConstantAsInt, getValueClass, greaterOrEqual, greaterThan, guard, hasConstantAsInt, invariant, lessOrEqual, lessThan, map, max, min, modulo, multiply, negate, negative, nonEqual, nonnegative, nonpositive, nonzero, positive, power, probe, relateWith, sampleAndHold, stored, subtract, zero, zipWithMethods inherited from interface eu.bandm.sig.adlib2.Process
afterEvery, andThen, conditional, every, every, getProcessMethods inherited from interface eu.bandm.sig.adlib2.Register
andMeanwhile, andMeanwhile, setRealtimeContext
-
Constructor Details
-
IntDelay
public IntDelay(int initial) Creates a new instance without a valid input source.The method
setInput(IntSignalSource)must be invoked before this signal source can be used.- Parameters:
initial- the initial value of this signal source
-
IntDelay
Creates a new instance with an independent input source.- Parameters:
initial- the initial value of this signal sourcein- the input signal source
-
IntDelay
Creates a new instance with a feedback-looped input source.A reference to the new delay signal source
dunder construction is passed to the function objectinin order to create the feedback loop. This reference may only be used by passing to other signal source constructions. Behavior is unspecified if any behavioral method is invoked ondbeforein.apply(d)has returned.- Parameters:
initial- the initial value of this signal sourcein- a function that constructs the input signal source when applied to this delayed signal source
-
-
Method Details
-
setInput
-
getLoadPhase
Returns the load phase of this register.- Specified by:
getLoadPhasein interfaceRegister- Returns:
- the load phase of this register
-
getStorePhase
Returns the store phase of this register.- Specified by:
getStorePhasein interfaceRegister- Returns:
- the store phase of this register
-
init
public void init()Initializes 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
public void step()Signals 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.
-
getNextValue
public int getNextValue()Returns the value that will be produced on the next clock tick.This method is in concurrent reader–writer conflict with the
getStorePhase()process. -
setNextValue
public void setNextValue(int next) Sets the value that will be produced on the next clock tick.This method is in concurrent writer–writer conflict with the
getStorePhase()process.
-