Raises an error when the `ERR` input pin receives the `True` value. Otherwise, it fires the pulse on the `OUT` pin when the `IN` pin receives a pulse.
error(pulse)
@/error(pulse)
Raises an error when the `ERR` input pin receives the `True` value. Otherwise, it fires the pulse on the `OUT` pin when the `IN` pin receives a pulse.
OUTpulse
The pulse passed through the node.
#pragma XOD evaluate_on_pin disable
#pragma XOD evaluate_on_pin enable input_IN
#pragma XOD error_raise enable
node {
void evaluate(Context ctx) {
if (!isInputDirty<input_IN>(ctx))
return;
if (getValue<input_ERR>(ctx))
raiseError<output_OUT>(ctx);
else
emitValue<output_OUT>(ctx, 1);
}
}