continuously-pausable

xod/core/continuously-pausable

Continuously outputs pulses, can be paused
continuously-pausable
@/continuously-pausable
Continuously outputs pulses, can be paused
ENboolean
Determines if pulses should be continuously emitted
continuously-pausable
TICK
EN
TICKpulse
Continuous pulses

C++ implementation

node {
    void evaluate(Context ctx) {
        if (getValue<input_EN>(ctx)) {
            emitValue<output_TICK>(ctx, 1);
            setImmediate();
        }
    }
}

Tabular tests

ENTICK
truepulse
truepulse
truepulse
falseno-pulse
falseno-pulse
falseno-pulse
truepulse
truepulse