dimm-mode

cesars/dimmer/dimm-mode

Select mode NORMAL/TOGGLE
dimm-mode
@/dimm-mode
Select mode NORMAL/TOGGLE
DIMM@/dimm-dev
Input to dev
MODEnumber
0=NORMAL / 1=TOGGLE
SETpulse
Pulse for set mode
dimm-mode
DIMM
MODE
SET
DIMM'
DONE
DONEpulse
Pulse done
DIMM'@/dimm-dev
Output Dev to DIMM
To use the node in your project you should have the cesars/dimmer 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

node {

    void evaluate(Context ctx) {
        emitValue<output_DIMMU0027>(ctx, getValue<input_DIMM>(ctx));
        if (!isInputDirty<input_SET>(ctx)) return;

        auto dimm = getValue<input_DIMM>(ctx);
        dimm->setMode((int)getValue<input_MODE>(ctx));
        emitValue<output_DONE>(ctx, 1);
    }
}