hc595-getall

bradzilla84/74hc595/hc595-getall

No description
hc595-getall
@/hc595-getall
DEV@/hc595-device
INITpulse
hc595-getall
DEV
INIT
OUT
Data
DONE
DONEpulse
Data@/hc595-getall
OUT@/hc595-device
To use the node in your project you should have the bradzilla84/74hc595 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 {
};

struct Type {
    uint8_t* items;
};

// clang-format off
{{ GENERATED_CODE }}
// clang-format on

void evaluate(Context ctx) {
    if (!isInputDirty<input_INIT>(ctx)){
    emitValue<output_OUT>(ctx, getValue<input_DEV>(ctx));
        return;}

    Type data;

    auto sr = getValue<input_DEV>(ctx); // Get a pointer to the class instance
    data.items = sr->getAll();

    emitValue<output_Data>(ctx, data);
    emitValue<output_DONE>(ctx, 1);

}