public sealed class RfidTag
Simulated UHF Gen2 tag memory (TDS §9.2): reserved bank (kill and access password), EPC bank (StoredCRC, PC word, EPC), TID and user memory, with Gen2 lock states and access password semantics. Used by ZplRfidSimulator; can also be prepared directly (pre-programmed or locked tags).
Constructors
| Signature | Description |
# RfidTag(RfidTagProfile? profile = default, string? tid = default) | A blank tag (all EPC and user bits zero, passwords 00000000, everything unlocked except the TID). profile: Memory sizes (default RfidTagProfile). · tid: TID bank contents in hex (default: a synthetic serialised TID starting with E2h, TDS §16). |
Properties
Methods
| Method Signature | Returns | Description |
# Bank(RfidBank bank) | byte[] | Whole bank contents (a copy). |
static # Crc16(ReadOnlySpan<byte> data) | ushort | Gen2 CRC-16 (ISO/IEC 13239: polynomial 1021h, preset FFFFh, ones' complement of the result; CRC-16/GENIBUS), as the tag computes the StoredCRC over the PC word and the EPC. |
# DecodeEpc() | Epc | The decoded EPC, or null when the EPC bank holds no valid EPC (see ZplRfid.TryDecodeEpc). |
# Lock(RfidLockTarget target, RfidLockValue action, uint? accessPassword = default) | RfidTagStatus | Gen2 Lock of a password or bank. Lock and unlock need the secured state; perma states cannot change. |
# PermalockUserSections(int start, int count, uint? accessPassword = default) | RfidTagStatus | Permanently locks user memory sections (^RLB s,n; Gen2 BlockPermalock). |
# Read(RfidBank bank, int word, int byteCount, uint? accessPassword = default) | (RfidTagStatus, byte[]) | Reads byteCount bytes from word word of a bank. bank: Memory bank. · word: First 16-bit word. · byteCount: Bytes to read. · accessPassword: Access password the interrogator presents (null: none, i.e. open state). |
# ToString() | string | |
# Write(RfidBank bank, int word, ReadOnlySpan<byte> data, uint? accessPassword = default) | RfidTagStatus | Writes whole bytes from word word; an odd byte count fills the last word's low byte with 00h. |