Class TriggerDemux

All Implemented Interfaces:
CompilableControlFlow, CompilableDataFlow, IntSignalSource, Realtime, SignalSource<Integer>, Runnable, IntSupplier, Supplier<Integer>

public class TriggerDemux 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

    • trigger

      protected final IntSignalSource trigger
    • count

      protected final int count
    • outs

      protected int[] outs
    • lastEvent

      protected int lastEvent
    • lastOut

      protected int lastOut
  • Constructor Details

  • Method Details

    • getOut

      public IntSignalSource getOut(int i)
    • 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.