gate(pulse)

xod/core/gate(pulse)

Allows values to pass through only if EN pin is set to true
gate(pulse)
@/gate(pulse)
Allows values to pass through only if EN pin is set to true
INpulse
ENboolean
Whether values should pass through
gate(pulse)
IN
OUT
EN
OUTpulse

C++ implementation

node {
    void evaluate(Context ctx) {
        if (getValue<input_EN>(ctx) && isInputDirty<input_IN>(ctx))
            emitValue<output_OUT>(ctx, true);
    }
}

Tabular tests

ENINOUT
falseno-pulseno-pulse
falsepulseno-pulse
trueno-pulseno-pulse
truepulsepulse
truepulsepulse
trueno-pulseno-pulse
falseno-pulseno-pulse