if(equal-pulse)

koadrobot/logics/if(equal-pulse)

No description
if(equal-pulse)
@/if(equal-pulse)
Lnumber
Rnumber
Tpulse
Fpulse
if(equal-pulse)
OUT
L
R
T
F
OUTpulse
To use the node in your project you should have the koadrobot/logics library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.

C++ implementation

#pragma XOD dirtieness disable

struct State {
};

{{ GENERATED_CODE }}

void evaluate(Context ctx) {
    auto in1 = getValue<input_L>(ctx);
    auto in2 = getValue<input_R>(ctx);
    bool trueVal = isInputDirty<input_T>(ctx);
    bool falseVal = isInputDirty<input_F>(ctx);
    emitValue<output_OUT>(ctx, (in1==in2) ? trueVal : falseVal);
}

Tabular tests

LRTFOUT
105pulsepulsepulse
1010pulsepulsepulse
510pulsepulsepulse
55falsepulsepulse