Class TagAccess
- Namespace
- TechnologySolutions.Rfid
- Assembly
- TechnologySolutions.Rfid.Operations.dll
Provides a specification to perform a tag access operation on a EPC Global C1G2 transponder including
- BlockPermalockLock(TagMemory, int, int, int)
- BlockPermalockRead(int, int, int)
- Kill(int, int)
- Lock(int, int)
- Read(MemoryBank, int, int, int)
- Write(MemoryBank, int, TagMemory, int)
This can be combined with a TagFilter (which specifies which tag(s) to access) into a TagAccessFilterFields for use with an IReaderOperationTranspondersAccess
e.g. Read(MemoryBank, int, int, int) to Read the user memory bank starting at word offset 0 for 4 words. Use Access password 0x11223344
TagAccess.Read(MemoryBank.User, /* offset */ 0, /* count */4, /*access password*/ 0x11223344);
public class TagAccess
- Inheritance
-
TagAccess
- Inherited Members
Fields
NoPassword
The value to use when no access password is set
public const int NoPassword = 0
Field Value
Properties
AccessPassword
Gets the access password
public int AccessPassword { get; }
Property Value
Data
Gets the data to write
public TagMemory Data { get; }
Property Value
KillPassword
Gets the kill password (kill only)
public int KillPassword { get; }
Property Value
LockPayload
Gets the lock payload (lock only)
public int LockPayload { get; }
Property Value
- See Also
Memory
Gets the memory bank to access
public MemoryBank Memory { get; }
Property Value
Operation
Gets the tag access operation to perform
public TagAccessOperation Operation { get; }
Property Value
WordCount
Gets the number of words to access
public int WordCount { get; }
Property Value
WordOffset
Gets the offset in words into the specified Memory to access
public int WordOffset { get; }
Property Value
Methods
BlockPermalockLock(TagMemory, int, int, int)
Returns a TagAccess to lock blocks. Perform a BlockPermalock Lock.
public static TagAccess BlockPermalockLock(TagMemory mask, int blockPtr, int blockRange, int accessPassword = 0)
Parameters
mask
TagMemoryThe mask must be a least 16 x blockRange bits long. The mask bits are ordered from lower block to higher. A bit 0 means retain the current block permalock status, A bit 1 is block permalock the corresponding memory block.
blockPtr
intSpecifies the stating address for Mask, in units of 16 blocks. For example 0 for block 0, 1 for block 16, 2 for block 32
blockRange
intSpecifies the range of mask, staring at blockPtr and ending (16 x blockRange) - 1 blocks later.
accessPassword
intThe access password for the transponder
Returns
- TagAccess
A TagAccess to BlockPermalock Lock the specified blocks
Remarks
For each transponder accessed a TransponderData is returned. If the command was successful for the transponder the IsLockSuccess is true. If the command was not successful for the transponder the TransponderAccessErrorCode or TransponderBackscatterErrorCode is set.
BlockPermalockRead(int, int, int)
Returns a TagAccess to read the block permalock status. Perform a BlockPermalock Read.
public static TagAccess BlockPermalockRead(int blockPtr, int blockRange, int accessPassword = 0)
Parameters
blockPtr
intSpecifies the stating address for Mask, in units of 16 blocks. For example 0 for block 0, 1 for block 16, 2 for block 32.
blockRange
intSpecifies the range of mask, staring at blockPtr and ending (16 x blockRange) - 1 blocks later.
accessPassword
intThe access password for the transponder
Returns
- TagAccess
A TagAccess to read the BlockPermalock status
Remarks
For each transponder accessed a TransponderData is returned. The BlockPermalock status is reported as a bit mask in the ReadData field. If the command was not successful for the transponder the TransponderAccessErrorCode or TransponderBackscatterErrorCode is set.
Kill(int, int)
Returns a TagAccess to kill a transponder
public static TagAccess Kill(int killPassword, int accessPassword)
Parameters
Returns
- TagAccess
A TagAccess to Kill a transponder
Remarks
For each transponder accessed a TransponderData is returned. If the command was successfll for the transponder the IsKillSuccess is true. If the command was not successful for the transponder the TransponderAccessErrorCode or TransponderBackscatterErrorCode is set.
Lock(int, int)
Returns a TagAccess to lock a transponder
public static TagAccess Lock(int lockPayload, int accessPassword)
Parameters
lockPayload
intThe payload that specifies how and what memory to lock
accessPassword
intThe access password for the transponder
Returns
- TagAccess
A TagAccess to Lock a transponder
Remarks
For each transponder accessed a TransponderData is returned. If the command was successful for the transponder the IsLockSuccess is true. If the command was not successful for the transponder the TransponderAccessErrorCode or TransponderBackscatterErrorCode is set.
- See Also
Read(MemoryBank, int, int, int)
Returns a TagAccess to read the memory of a transponder
public static TagAccess Read(MemoryBank memory, int wordOffset, int wordCount, int accessPassword = 0)
Parameters
memory
MemoryBankThe memory bank to read
wordOffset
intThe offset in words into the memory to read from
wordCount
intThe number of words to read
accessPassword
intThe access password for the transponder
Returns
- TagAccess
A TagAccess to read a transponder
Remarks
For each transponder accessed a TransponderData is returned. The read data is reported in the ReadData field. If the command was not successful for the transponder the TransponderAccessErrorCode or TransponderBackscatterErrorCode is set.
Write(MemoryBank, int, TagMemory, int)
Returns a TagAccess to write the memory of a transponder
public static TagAccess Write(MemoryBank memory, int wordOffset, TagMemory data, int accessPassword = 0)
Parameters
memory
MemoryBankThe memory bank to write
wordOffset
intThe offset in words into the memory to start writing at
data
TagMemoryThe data to write to the memory
accessPassword
intThe access password for the transponder
Returns
- TagAccess
A TagAccess to write to a transponder
Remarks
For each transponder accessed a TransponderData is returned. If the command was successful for the transponder the WordsWritten is returned with the number of words written. This may be less than the expected count so should be checked. If the command was not successful for the transponder the TransponderAccessErrorCode or TransponderBackscatterErrorCode is set.