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 sel = getValue<input_SEL>(ctx);
switch (sel){
case 0:
emitValue<output_X_COM>(ctx, getValue<input_CH_X0>(ctx));
emitValue<output_Y_COM>(ctx, getValue<input_CH_Y0>(ctx));
break;
case 1:
emitValue<output_X_COM>(ctx, getValue<input_CH_X1>(ctx));
emitValue<output_Y_COM>(ctx, getValue<input_CH_Y1>(ctx));
break;
case 2:
emitValue<output_X_COM>(ctx, getValue<input_CH_X2>(ctx));
emitValue<output_Y_COM>(ctx, getValue<input_CH_Y2>(ctx));
break;
case 3:
emitValue<output_X_COM>(ctx, getValue<input_CH_X3>(ctx));
emitValue<output_Y_COM>(ctx, getValue<input_CH_Y3>(ctx));
break;
}
}