relay

wkov/colony/relay

No description
relay
@/relay
SIGpulse
Apulse
Bpulse
relay
SIG
A
B
OUT
OUTpulse
To use the node in your project you should have the wkov/colony 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
#pragma XOD evaluate_on_pin disable
#pragma XOD evaluate_on_pin enable input_A
#pragma XOD evaluate_on_pin enable input_B

node {
    void evaluate(Context ctx) {
        if (isInputDirty<input_SIG>(ctx)) {
            if (isInputDirty<input_A>(ctx)) {
                emitValue<output_OUT>(ctx, true);
            }
        } else if (isInputDirty<input_B>(ctx)) {
            emitValue<output_OUT>(ctx, true);
        }
    }
}