To use the node in your project you should have the cesars/405xb 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) {
if(!getValue<input_EN>(ctx) == 1)
return;
int a = getValue<input_A>(ctx);
int b = getValue<input_B>(ctx);
int c = getValue<input_C>(ctx);
switch (a){
case 0:
emitValue<output_AX>(ctx, getValue<input_AX_AY>(ctx));
break;
case 1:
emitValue<output_AY>(ctx, getValue<input_AX_AY>(ctx));
break;
}
switch (b){
case 0:
emitValue<output_BX>(ctx, getValue<input_BX_BY>(ctx));
break;
case 1:
emitValue<output_BY>(ctx, getValue<input_BX_BY>(ctx));
break;
}
switch (c){
case 0:
emitValue<output_CX>(ctx, getValue<input_CX_CY>(ctx));
break;
case 1:
emitValue<output_CY>(ctx, getValue<input_CX_CY>(ctx));
break;
}
}