Class BooleanStoredSignalSource

java.lang.Object
eu.bandm.sig.adlib2.AbstractProcess
eu.bandm.sig.adlib2.BooleanStoredSignalSource
All Implemented Interfaces:
AbstractClockedSignalSource, AbstractSignalSource, BooleanClockedSignalSource, BooleanSignalSource, CompilableControlFlow, CompilableDataFlow, Component, Process, BooleanSupplier
Direct Known Subclasses:
CompilableBooleanStoredSignalSource

public abstract class BooleanStoredSignalSource extends AbstractProcess implements BooleanClockedSignalSource
Common base class for signal (time-dependent value) sources of primitive type boolean 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().

  • Field Details

    • out

      protected boolean out
      The stored value of this signal source.
  • Constructor Details

    • BooleanStoredSignalSource

      protected BooleanStoredSignalSource(Optional<ConstantRealtimeContext> realtimeContext)
    • BooleanStoredSignalSource

      public BooleanStoredSignalSource()
  • Method Details

    • getAsBoolean

      public final boolean getAsBoolean()
      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.

      Specified by:
      getAsBoolean in interface BooleanSignalSource
      Specified by:
      getAsBoolean in interface BooleanSupplier
      Returns:
      the current value of out