if(equal)

koadrobot/logics/if(equal)

IF - R=(IN1==IN2) ? (T ? R : - ) :- Allows values to pass through only if IN1 equal IN2 pin is set to true.
if(equal)
@/if(equal)
IF - R=(IN1==IN2) ? (T ? R : - ) :- Allows values to pass through only if IN1 equal IN2 pin is set to true.
Lnumber
Rnumber
Tnumber
Fnumber
if(equal)
OUT
L
R
T
F
OUTnumber
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);
    auto trueVal = getValue<input_T>(ctx);
    auto falseVal = getValue<input_F>(ctx);
    emitValue<output_OUT>(ctx, (in1==in2) ? trueVal : falseVal);
}

Tabular tests

LRTFOUT
10500hFFhFFh
101000hFFh00h
51032d42d42d
55151615