The QNearFieldTagType1 class provides an interface for communicating with an NFC Tag Type 1 tag. More...
#include <QNearFieldTagType1>
Inherits QNearFieldTarget.
enum | WriteMode { EraseAndWrite, WriteOnly } |
QNearFieldTagType1 ( QObject * parent = 0 ) | |
int | memorySize () |
virtual QByteArray | readAll () |
virtual QByteArray | readBlock ( quint8 blockAddress ) |
virtual quint8 | readByte ( quint8 address ) |
virtual QByteArray | readIdentification () |
virtual QByteArray | readSegment ( quint8 segmentAddress ) |
quint8 | version () |
virtual bool | writeBlock ( quint8 blockAddress, const QByteArray & data, WriteMode mode = EraseAndWrite ) |
virtual bool | writeByte ( quint8 address, quint8 data, WriteMode mode = EraseAndWrite ) |
virtual bool | hasNdefMessage () |
virtual QList<QNdefMessage> | ndefMessages () |
virtual void | setNdefMessages ( const QList<QNdefMessage> & messages ) |
virtual Type | type () const |
The QNearFieldTagType1 class provides an interface for communicating with an NFC Tag Type 1 tag.
This enum describes the write modes that are supported.
Constant | Value | Description |
---|---|---|
QNearFieldTagType1::EraseAndWrite | 0 | The memory is erased before the new value is written. |
QNearFieldTagType1::WriteOnly | 1 | The memory is not erased before the new value is written. The effect of this mode is that the final value store is the bitwise or of the data to be written and the original data value. |
Constructs a new tag type 1 near field target with parent.
Reimplemented from QNearFieldTarget::hasNdefMessage().
Returns the memory size in bytes of the tag.
Reimplemented from QNearFieldTarget::ndefMessages().
See also setNdefMessages().
Reads and returns HR0, HR1 and all data in the static memory area of the tag.
The returned byte array contains HR0, HR1 followed by 120 bytes of static data. An empty byte array is returned if an error occurs.
Reads and returns 8 bytes of data from the block specified by blockAddress. An empty byte array is returned if an error occurs.
Reads and returns a single byte from the static memory area of the tag. The address parameter specifices the linear byte address to read.
Returns identification information read from the tag.
The returned byte array contains HR0, HR1, UID0, UID1, UID2, UID3 in order. An empty byte array is returned if an error occurs.
Reads and returns 120 bytes of data from the segment specified by segmentAddress. An empty byte array is returned if an error occurs.
Reimplemented from QNearFieldTarget::setNdefMessages().
See also ndefMessages().
Reimplemented from QNearFieldTarget::type().
Returns the NFC Tag Type 1 specification version number that the tag supports.
Writes 8 bytes of data to the block specified by blockAddress. If mode is EraseAndWrite the bytes are erased before writing. If mode is WriteOnly the contents are not earsed before writing. This is equivelant to writing the result of the bitwise or of data and the original value.
Returns true on success; otherwise returns false.
Writes a single data byte to the linear byte address on the tag. If mode is EraseAndWrite the byte is erased before writing. If mode is WriteOnly the contents are not earsed before writing. This is equivelant to writing the result of the bitwise or of data and the original value.
Returns true on success; otherwise returns false.