Package eu.bandm.sig.adlib2
Class StoredSignalSource<A>
java.lang.Object
eu.bandm.sig.adlib2.AbstractProcess
eu.bandm.sig.adlib2.StoredSignalSource<A>
- Type Parameters:
A
- the type of values produced by this signal source
- All Implemented Interfaces:
AbstractClockedSignalSource
,AbstractSignalSource
,ClockedSignalSource<A>
,CompilableControlFlow
,CompilableDataFlow
,Component
,Process
,SignalSource<A>
,Supplier<A>
- Direct Known Subclasses:
CompilableStoredSignalSource
,SaH
public abstract class StoredSignalSource<A>
extends AbstractProcess
implements ClockedSignalSource<A>
Common base class for signal (time-dependent value) sources of
a fixed object type whose output is the value of a variable that is
updated only as driven by a clock.
The current value is stored in the field out
, which needs to be
written by the method Process.step()
.
-
Nested Class Summary
Nested classes/interfaces inherited from interface eu.bandm.sig.adlib2.Process
Process.Proxy
-
Field Summary
Modifier and TypeFieldDescriptionprotected A
The stored value of this signal source.The type of values produced by this signal source.Fields inherited from interface eu.bandm.sig.adlib2.AbstractClockedSignalSource
STREAM_CHARACTERISTICS, STREAM_SIZE
-
Constructor Summary
ModifierConstructorDescriptionStoredSignalSource
(Class<? super A> valueClass) Creates a new instance.protected
StoredSignalSource
(Optional<ConstantRealtimeContext> realtimeContext, Class<? super A> valueClass) -
Method Summary
Methods inherited from class eu.bandm.sig.adlib2.AbstractProcess
getRealtimeContext, setRealtimeContext
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface eu.bandm.sig.adlib2.ClockedSignalSource
after, compile, during, spliterator, stream
Methods inherited from interface eu.bandm.sig.adlib2.compile.CompilableDataFlow
compileDataFlowTo, hasDataFlowIO
Methods inherited from interface eu.bandm.sig.adlib2.Process
afterEvery, andThen, compileAsMainProcess, compileControlFlow, compileInitialization, every, every, getProcess, hasControlFlowIO, hasInitializationIO, init, setRealtimeContext, step
Methods inherited from interface eu.bandm.sig.adlib2.SignalSource
compileDataFlow, compileMainSignalSource, DEBUG, delayed, delayed, eq, getConstant, guard, hasConstant, invariant, map, map, neq, power, probe, publishStoredValueVariable, relateWith, sampleAndHold, stored, zipWith
-
Field Details
-
valueClass
The type of values produced by this signal source. -
out
The stored value of this signal source.
-
-
Constructor Details
-
StoredSignalSource
protected StoredSignalSource(Optional<ConstantRealtimeContext> realtimeContext, Class<? super A> valueClass) -
StoredSignalSource
Creates a new instance.- Parameters:
valueClass
- the type of values produced by this signal source
-
-
Method Details
-
getValueClass
Returns the type of values produced by this entity.For signals of primitive value type, the result will be the corresponding pseudoclass.
This implementation returns
Object.class
. Subclasses may override this method to provide more specific type information.- Specified by:
getValueClass
in interfaceCompilableDataFlow
- Specified by:
getValueClass
in interfaceSignalSource<A>
- Returns:
- the type of signal values that this entity produces
- See Also:
-
get
Returns the current value of this signal source.The value may be either computed on demand, or retrieved from storage.
Implementations of this method should have no side effect.
-