Class FloatDurationToTrigger

java.lang.Object
eu.bandm.sig.adlib.IntClockedSignalSource
eu.bandm.sighkn.FloatDurationToTrigger
All Implemented Interfaces:
CompilableControlFlow, CompilableDataFlow, IntSignalSource, Realtime, SignalSource<Integer>, Runnable, IntSupplier, Supplier<Integer>

public class FloatDurationToTrigger extends IntClockedSignalSource
A small device which derives a gate from a trigger, which holds the given duration. A trigger is (as usual) recognized on a change of its int value. The first trigger value must be != 0. The duration signal source is sampled once, when the trigger is active.
  • Field Details

    • duration

      protected final FloatSignalSource duration
    • freq

      protected final float freq
    • steps

      protected int steps
  • Constructor Details

    • FloatDurationToTrigger

      public FloatDurationToTrigger(int freq, FloatSignalSource duration)
  • Method Details

    • run

      public void run()
      Description copied from interface: Realtime
      Processes an event.

      Any implementation of this method should complete promptly and normally. In particular it must not block indefinitely.