get-resolution

wayland/ds18b20/get-resolution

Read global resolution.
get-resolution
@/get-resolution
Read global resolution.
DEV@/ds18b20-devices
One or more DS18B20 devices on a single one-wire bus.
UPDpulse
Update.
get-resolution
DEV
UPD
RES
DONE
DONEpulse
Pulse on read of global resolution.
RESbyte
Resolution (bits): 9d = 9 bits, 10d = 10 bits, 11d = 11 bits, 12d = 12 bits.
To use the node in your project you should have the wayland/ds18b20 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) {
        if (!isInputDirty<input_UPD>(ctx))
            return;

        auto sensors = getValue<input_DEV>(ctx);

        emitValue<output_RES>(ctx, sensors->getResolution());

        emitValue<output_DONE>(ctx, 1);
    }
}