read-2

wayland/read-bits/read-2

Read bit 2.
read-2
@/read-2
Read bit 2.
INbyte
Input byte.
read-2
IN
Bit
Bitboolean
Bit value as boolean.
To use the node in your project you should have the wayland/read-bits 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

node {

    void evaluate(Context ctx) {

        uint8_t byte = getValue<input_IN>(ctx);
        emitValue<output_Bit>(ctx, bitRead(byte, 2));
    }
}