QtMobility Reference Documentation

QNearFieldTagType2 Class Reference

The QNearFieldTagType2 class provides an interface for communicating with an NFC Tag Type 2 tag. More...

 #include <QNearFieldTagType2>

Inherits: QNearFieldTarget.

This class was introduced in Qt Mobility 1.2.

Public Functions

QNearFieldTagType2 ( QObject * parent = 0 )
~QNearFieldTagType2 ()
int memorySize ()
virtual RequestId readBlock ( quint8 blockAddress )
virtual RequestId selectSector ( quint8 sector )
quint8 version ()
virtual RequestId writeBlock ( quint8 blockAddress, const QByteArray & data )

Reimplemented Public Functions

virtual bool hasNdefMessage ()
virtual RequestId readNdefMessages ()
virtual Type type () const
virtual bool waitForRequestCompleted ( const RequestId & id, int msecs = 5000 )
virtual RequestId writeNdefMessages ( const QList<QNdefMessage> & messages )

Reimplemented Protected Functions

virtual bool handleResponse ( const QNearFieldTarget::RequestId & id, const QByteArray & response )

Additional Inherited Members

Detailed Description

The QNearFieldTagType2 class provides an interface for communicating with an NFC Tag Type 2 tag.

Member Function Documentation

QNearFieldTagType2::QNearFieldTagType2 ( QObject * parent = 0 )

Constructs a new tag type 2 near field target with parent.

QNearFieldTagType2::~QNearFieldTagType2 ()

Destroys the tag type 2 near field target.

bool QNearFieldTagType2::handleResponse ( const QNearFieldTarget::RequestId & id, const QByteArray & response ) [virtual protected]

Reimplemented from QNearFieldTarget::handleResponse().

bool QNearFieldTagType2::hasNdefMessage () [virtual]

Reimplemented from QNearFieldTarget::hasNdefMessage().

int QNearFieldTagType2::memorySize ()

Returns the memory size in bytes of the tag.

RequestId QNearFieldTagType2::readBlock ( quint8 blockAddress ) [virtual]

Requests 16 bytes of data starting at 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().

RequestId QNearFieldTagType2::readNdefMessages () [virtual]

Reimplemented from QNearFieldTarget::readNdefMessages().

RequestId QNearFieldTagType2::selectSector ( quint8 sector ) [virtual]

Selects the sector upon which subsequent readBlock() and writeBlock() operations will act.

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.

Note: this request has a passive acknowledgement mechanism. The operation is deemed successful if no response is received within 1ms. It will therefore take a minimum of 1 millisecond for the requestCompleted() signal to be emitted and calling waitForRequestCompleted() on the returned request id may cause the current thread to block for up to 1 millisecond.

Type QNearFieldTagType2::type () const [virtual]

Reimplemented from QNearFieldTarget::type().

quint8 QNearFieldTagType2::version ()

Returns the NFC Tag Type 2 specification version number that the tag supports.

bool QNearFieldTagType2::waitForRequestCompleted ( const RequestId & id, int msecs = 5000 ) [virtual]

Reimplemented from QNearFieldTarget::waitForRequestCompleted().

RequestId QNearFieldTagType2::writeBlock ( quint8 blockAddress, const QByteArray & data ) [virtual]

Writes 4 bytes of data to the block at blockAddress. 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.

Returns true on success; otherwise returns false.

RequestId QNearFieldTagType2::writeNdefMessages ( const QList<QNdefMessage> & messages ) [virtual]

Reimplemented from QNearFieldTarget::writeNdefMessages().

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.