Public Member Functions | |
NfcTag (SCardChannel channel) | |
bool | IsEmpty () |
bool | IsFormatted () |
bool | IsFormattable () |
bool | IsLocked () |
bool | IsLockable () |
long | Capacity () |
long | ContentSize () |
abstract bool | Format () |
bool | Write () |
bool | Write (bool skip_checks) |
abstract bool | Lock () |
byte [] | GetUid () |
Static Public Member Functions | |
static bool | Recognize (SCardChannel cardchannel, out NfcTag tag, out string msg, out bool Desfire_formatable) |
Public Attributes | |
const byte | NFC_FORUM_MAGIC_NUMBER = 0xE1 |
const byte | NFC_FORUM_VERSION_NUMBER = 0x10 |
const byte | LOCK_CONTROL_TLV = 0x01 |
const byte | MEMORY_CONTROL_TLV = 0x02 |
const byte | NDEF_MESSAGE_TLV = 0x03 |
const byte | NDEF_FILE_CONTROL_TLV = 0x04 |
const byte | PROPRIETARY_TLV = 0xFD |
const byte | TERMINATOR_TLV = 0xFE |
const byte | NULL_TLV = 0x00 |
List< NdefObject > | Content = new List<NdefObject>() |
Protected Member Functions | |
abstract bool | WriteContent (byte[] content) |
abstract bool | Read () |
Static Protected Member Functions | |
static byte [] | GetUid (SCardChannel channel) |
Protected Attributes | |
SCardChannel | _channel = null |
long | _capacity = 0 |
bool | _is_empty = false |
bool | _formatted = false |
bool | _formattable = false |
bool | _locked = false |
bool | _lockable = false |
long SpringCard.NfcForum.Tags.NfcTag.Capacity | ( | ) |
m* SpringCard.NfcForum.Tags/NfcTag.Capacity
SYNOPSIS public long Capacity()
DESCRIPTION Returns the size of the Tag's NDEF storage container.
SEE ALSO NfcTag.ContentSize
long SpringCard.NfcForum.Tags.NfcTag.ContentSize | ( | ) |
m* SpringCard.NfcForum.Tags/NfcTag.ContentSize
SYNOPSIS public long ContentSize()
DESCRIPTION Returns the actual size of the Tag's NDEF content.
SEE ALSO NfcTag.Capacity
|
pure virtual |
m* SpringCard.NfcForum.Tags/NfcTag.Format
SYNOPSIS public bool Format()
DESCRIPTION Formats the physical Tag currently on the reader. This is only possible if IsFormattable returns true. Return true on success.
SEE ALSO NfcTag.IsFormatted NfcTag.IsFormatable NfcTag.Write
Implemented in SpringCard.NfcForum.Tags.NfcTagType2, and SpringCard.NfcForum.Tags.NfcTagType4.
bool SpringCard.NfcForum.Tags.NfcTag.IsEmpty | ( | ) |
m* SpringCard.NfcForum.Tags/NfcTag.IsEmpty
SYNOPSIS public bool IsEmpty()
DESCRIPTION Returns true if the NfcTag doesn't contain any data.
SEE ALSO NfcTag.Write
bool SpringCard.NfcForum.Tags.NfcTag.IsFormattable | ( | ) |
m* SpringCard.NfcForum.Tags/NfcTag.IsFormattable
SYNOPSIS public bool IsFormattable()
DESCRIPTION Returns true if the NfcTag be formatted to store a NDEF content.
SEE ALSO NfcTag.IsFormatted NfcTag.Format
bool SpringCard.NfcForum.Tags.NfcTag.IsFormatted | ( | ) |
m* SpringCard.NfcForum.Tags/NfcTag.IsFormatted
SYNOPSIS public bool IsFormatted()
DESCRIPTION Returns true if the NfcTag is ready to store a NDEF content.
SEE ALSO NfcTag.IsFormattable NfcTag.Format
bool SpringCard.NfcForum.Tags.NfcTag.IsLockable | ( | ) |
m* SpringCard.NfcForum.Tags/NfcTag.IsLockable
SYNOPSIS public bool IsLockable()
DESCRIPTION Returns true if the NfcTag could be locked in read-only state.
SEE ALSO NfcTag.IsLocked NfcTag.Lock
bool SpringCard.NfcForum.Tags.NfcTag.IsLocked | ( | ) |
m* SpringCard.NfcForum.Tags/NfcTag.IsLocked
SYNOPSIS public bool IsLocked()
DESCRIPTION Returns true if the NfcTag is locked in read-only state
SEE ALSO NfcTag.IsLockable NfcTag.Lock
|
pure virtual |
m* SpringCard.NfcForum.Tags/NfcTag.Lock
SYNOPSIS public bool Lock()
DESCRIPTION Sets physical Tag currently on the reader in read-only (locked) state. This is only possible if IsLockable returns true. Returns true on success.
Implemented in SpringCard.NfcForum.Tags.NfcTagType2, and SpringCard.NfcForum.Tags.NfcTagType4.
|
static |
m* SpringCard.NfcForum.Tags/NfcTag.Recognize
SYNOPSIS public static bool Recognize(SCardChannel cardchannel, out NfcTag tag, out string msg)
DESCRIPTION Determines if the card on the reader is a NFC Forum compliant tag It first checks the ATR to determine if the card can be type 2 or a type 4 and tries to recognize the content of the tag. It creates either a NfcTagType2 or a NfcTagType4 and returns true if the tag is recognized. It returns false if the card is not a NFC Forum tag
SEE ALSO NfcTagType2.RecognizeAtr NfcTagType2.Recognize NfcTagType2.Create NfcTagType4.Recognize NfcTagType4.Create
bool SpringCard.NfcForum.Tags.NfcTag.Write | ( | ) |
m* SpringCard.NfcForum.Tags/NfcTag.Write
SYNOPSIS public bool Write(bool skip_checks = false)
DESCRIPTION Writes the new content of the NfcTag object to the physical Tag currently on the reader.
If parameter skip_checks is true, the function doesn't verify whether the Tag is writable or not before trying to write. Returns true on success.
NOTES The Tag must already be formatted. See NfcTag.IsFormatted and NfcTag.Format.
List<NdefObject> SpringCard.NfcForum.Tags.NfcTag.Content = new List<NdefObject>() |
m* SpringCard.NfcForum.Tags/NfcTag.Content
SYNOPSIS public List<NDEF> Content
DESCRIPTION The list of NDEF objects found on the Tag. To change the Tag's content, update this list before calling NfcTag.Write
SEE ALSO NfcTag.ContentSize