QNearFieldTarget

PyQt5.QtNfc.QNearFieldTarget

Inherits from QObject.

Description

The QNearFieldTarget class provides an interface for communicating with a target device.

QNearFieldTarget provides a generic interface for communicating with an NFC target device. Both NFC Forum devices and NFC Forum Tag targets are supported by this class. All target specific classes subclass this class.

The type() function can be used to get the type of the target device. The uid() function returns the unique identifier of the target. The AccessMethods flags returns from the accessMethods() function can be tested to determine which access methods are supported by the target.

If the target supports NdefAccess, hasNdefMessage() can be called to test if the target has a stored NDEF message, readNdefMessages() and writeNdefMessages() functions can be used to get and set the NDEF message.

If the target supports TagTypeSpecificAccess, sendCommand() can be used to send a single proprietary command to the target and retrieve the response. sendCommands() can be used to send multiple proprietary commands to the target and retrieve all of the responses.

If the target supports LlcpAccess, the QLlcpSocket class can be used to connected to a service provided by the target.

Enums

AccessMethod

TODO

Member

Value

Description

LlcpAccess

TODO

TODO

NdefAccess

TODO

TODO

TagTypeSpecificAccess

TODO

TODO

UnknownAccess

TODO

TODO


Error

TODO

Member

Value

Description

ChecksumMismatchError

TODO

TODO

CommandError

TODO

TODO

InvalidParametersError

TODO

TODO

NdefReadError

TODO

TODO

NdefWriteError

TODO

TODO

NoError

TODO

TODO

NoResponseError

TODO

TODO

TargetOutOfRangeError

TODO

TODO

UnknownError

TODO

TODO

UnsupportedError

TODO

TODO


Type

TODO

Member

Value

Description

MifareTag

TODO

TODO

NfcTagType1

TODO

TODO

NfcTagType2

TODO

TODO

NfcTagType3

TODO

TODO

NfcTagType4

TODO

TODO

ProprietaryTag

TODO

TODO

Methods

__init__(parent: QObject = None)

TODO


accessMethods() → AccessMethods

TODO


disconnect() → bool

TODO


handleResponse(RequestId, Union[QByteArray, bytes, bytearray]) → bool

TODO


hasNdefMessage() → bool

TODO


isProcessingCommand() → bool

TODO


keepConnection() → bool

TODO


maxCommandLength() → int

TODO


readNdefMessages() → RequestId

TODO


reportError(Error, RequestId)

TODO


requestResponse(RequestId) → Any

TODO


sendCommand(Union[QByteArray, bytes, bytearray]) → RequestId

TODO


sendCommands(Iterable[Union[QByteArray, bytes, bytearray]]) → RequestId

TODO


setKeepConnection(bool) → bool

TODO


setResponseForRequest(RequestId, Any, emitRequestCompleted: bool = True)

TODO


type() → Type

TODO


uid() → QByteArray

TODO


url() → QUrl

TODO


waitForRequestCompleted(RequestId, msecs: int = 5000) → bool

TODO


writeNdefMessages(Iterable[QNdefMessage]) → RequestId

TODO

Signals

disconnected()

TODO


error(Error, RequestId)

TODO


ndefMessageRead(QNdefMessage)

TODO


ndefMessagesWritten()

TODO


requestCompleted(RequestId)

TODO