The QNearFieldTagType1 class provides an interface for communicating with an NFC Tag Type 1 tag. More...
#include <QNearFieldTagType1>
Inherits: QNearFieldTarget.
This class was introduced in Qt Mobility 1.2.
enum | WriteMode { EraseAndWrite, WriteOnly } |
QNearFieldTagType1 ( QObject * parent = 0 ) | |
~QNearFieldTagType1 () | |
virtual int | memorySize () |
virtual RequestId | readAll () |
virtual RequestId | readBlock ( quint8 blockAddress ) |
virtual RequestId | readByte ( quint8 address ) |
virtual RequestId | readIdentification () |
virtual RequestId | readSegment ( quint8 segmentAddress ) |
quint8 | version () |
virtual RequestId | writeBlock ( quint8 blockAddress, const QByteArray & data, WriteMode mode = EraseAndWrite ) |
virtual RequestId | writeByte ( quint8 address, quint8 data, WriteMode mode = EraseAndWrite ) |
virtual bool | hasNdefMessage () |
virtual RequestId | readNdefMessages () |
virtual Type | type () const |
virtual RequestId | writeNdefMessages ( const QList<QNdefMessage> & messages ) |
virtual bool | handleResponse ( const QNearFieldTarget::RequestId & id, const QByteArray & response ) |
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.
Destroys the tag type 1 near field target.
Reimplemented from QNearFieldTarget::handleResponse().
Reimplemented from QNearFieldTarget::hasNdefMessage().
Returns the memory size in bytes of the tag.
Requests all data in the static memory area of the target. Returns a request id which can be used to track the completion status of the request.
Once the request completes successfully the response can be retrieved from the requestResponse() function. The response of this request will be a QByteArray containing: HR0 and HR1 followed by the 120 bytes of data stored in the static memory area of the target.
See also requestCompleted() and waitForRequestCompleted().
Requests 8 bytes of data from the block specified by blockAddress. Returns a request id which can be used to track the completion status of the request.
Once the request completes successfully the response can be retrieved from the requestResponse() function. The response of this request will be a QByteArray.
See also requestCompleted() and waitForRequestCompleted().
Requests a single byte from the static memory area of the tag. The address parameter specifices the linear byte address to read. Returns a request id which can be used to track the completion status of the request.
Once the request completes successfully the response can be retrieved from the requestResponse() function. The response of this request will be a quint8.
See also requestCompleted() and waitForRequestCompleted().
Requests the identification bytes from the target. Returns a request id which can be used to track the completion status of the request.
Once the request completes successfully the response can be retrieved from the requestResponse() function. The response of this request will be a QByteArray containing: HR0, HR1, UID0, UID1, UID2 and UID3 in order.
See also requestCompleted() and waitForRequestCompleted().
Reimplemented from QNearFieldTarget::readNdefMessages().
Requests 128 bytes of data from the segment specified by segmentAddress. Returns a request id which can be used to track the completion status of the request.
Once the request completes successfully the response can be retrieved from the requestResponse() function. The response of this request will be a QByteArray.
See also requestCompleted() and waitForRequestCompleted().
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 will be erased before writing. If mode is WriteOnly the contents will not be erased before writing. This is equivelant to writing the result of the bitwise OR of data and the original value.
Returns a request id which can be used to track the completion status of the request.
Once the request completes the response can be retrieved from the requestResponse() function. The response of this request will be a boolean value, true for success; otherwise false.
See also requestCompleted() and waitForRequestCompleted().
Writes a single data byte to the linear byte address on the tag. If mode is EraseAndWrite the byte will be erased before writing. If mode is WriteOnly the contents will not be erased before writing. This is equivelant to writing the result of the bitwise OR of data and the original value.
Returns a request id which can be used to track the completion status of the request.
Once the request completes the response can be retrieved from the requestResponse() function. The response of this request will be a boolean value, true for success; otherwise false.
See also requestCompleted() and waitForRequestCompleted().
Reimplemented from QNearFieldTarget::writeNdefMessages().