latch-generic-v

cesars/data-latch/latch-generic-v

No description
latch-generic-v
@/latch-generic-v
IN1generic t1
LT1pulse
IN2generic t1 (variadic)
LT2pulse (variadic)
latch-generic-v
N
DONE
IN1
LT1
IN2
LT2
DONEpulse
Ngeneric t1
To use the node in your project you should have the cesars/data-latch 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

struct State {
};

{{ GENERATED_CODE }}

void evaluate(Context ctx) {

   if (isInputDirty<input_LT1>(ctx)){
       emitValue<output_N>(ctx, getValue<input_IN1>(ctx));
       emitValue<output_DONE>(ctx, 1);
   }else if (isInputDirty<input_LT2>(ctx)){
       emitValue<output_N>(ctx, getValue<input_IN2>(ctx));
       emitValue<output_DONE>(ctx, 1);
    }
}