nfc-uid

xod-dev/pn532-nfc/nfc-uid

Constructs the UID type from bytes. If the UID is shorter than 7 bytes it begins from the first position and the rest of bytes are equal to zero
nfc-uid
@/nfc-uid
Constructs the UID type from bytes. If the UID is shorter than 7 bytes it begins from the first position and the rest of bytes are equal to zero
IN1byte
IN2byte
IN3byte
IN4byte
IN5byte
IN6byte
IN7byte
nfc-uid
IN1
IN2
IN3
IN4
IN5
IN6
IN7
UID
UID@/nfc-uid
To use the node in your project you should have the xod-dev/pn532-nfc 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 {
    meta {
        struct Type {
            uint8_t items[7];

            static Type empty() {
                Type emptyUid;
                memset(emptyUid.items, 0, 7);
                return emptyUid;
            };

        };
    }

    void evaluate(Context ctx) {
        Type uid;
        uid.items[0] = (uint8_t)getValue<input_IN1>(ctx);
        uid.items[1] = (uint8_t)getValue<input_IN2>(ctx);
        uid.items[2] = (uint8_t)getValue<input_IN3>(ctx);
        uid.items[3] = (uint8_t)getValue<input_IN4>(ctx);
        uid.items[4] = (uint8_t)getValue<input_IN5>(ctx);
        uid.items[5] = (uint8_t)getValue<input_IN6>(ctx);
        uid.items[6] = (uint8_t)getValue<input_IN7>(ctx);

        emitValue<output_UID>(ctx, uid);
    }
}