u32-to-micros

nazarijtipusak080/work-with-bit/u32-to-micros

No description
u32-to-micros
@/u32-to-micros
B3byte
Most significant byte
B2byte
B1byte
B0byte
Least significant byte
u32-to-micros
OUT
B3
B2
B1
B0
OUTxod/core/micros
To use the node in your project you should have the nazarijtipusak080/work-with-bit 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) {
        uint32_t b3 = getValue<input_B3>(ctx);
        uint32_t b2 = getValue<input_B2>(ctx);
        uint32_t b1 = getValue<input_B1>(ctx);
        uint32_t b0 = getValue<input_B0>(ctx);
        uint32_t num = ((b3 << 24) | (b2 << 16) | (b1 << 8) | b0);
        uint32_t result = num;
        emitValue<output_OUT>(ctx, result);
    }
}