Pn532.Transceive Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Transceive(Byte, ReadOnlySpan<Byte>, Span<Byte>, NfcProtocol) |
This function has to be implemented by all NFC/RFID/Card readers. This function is used in exchange of data with the reader and the cards. |
Transceive(Byte, ReadOnlySpan<Byte>, Span<Byte>) |
Write data to a card and read what the card responses |
Transceive(Byte, ReadOnlySpan<Byte>, Span<Byte>, NfcProtocol)
This function has to be implemented by all NFC/RFID/Card readers. This function is used in exchange of data with the reader and the cards.
public override int Transceive (byte targetNumber, ReadOnlySpan<byte> dataToSend, Span<byte> dataFromCard, Iot.Device.Card.NfcProtocol protocol);
override this.Transceive : byte * ReadOnlySpan<byte> * Span<byte> * Iot.Device.Card.NfcProtocol -> int
Public Overrides Function Transceive (targetNumber As Byte, dataToSend As ReadOnlySpan(Of Byte), dataFromCard As Span(Of Byte), protocol As NfcProtocol) As Integer
Parameters
- targetNumber
- Byte
Some readers have a notion of target number for the cards as they can read multiple ones
- dataToSend
- ReadOnlySpan<Byte>
A standardized raw buffer with the command at the position 0 in the array
- protocol
- NfcProtocol
NFC protocol for this data exchange (e.g., Mifare)
Returns
-1 in case of error, otherwise the number of bytes read and copied into the dataFromCard
array
Applies to
Transceive(Byte, ReadOnlySpan<Byte>, Span<Byte>)
Write data to a card and read what the card responses
public override int Transceive (byte targetNumber, ReadOnlySpan<byte> dataToSend, Span<byte> dataFromCard);
override this.Transceive : byte * ReadOnlySpan<byte> * Span<byte> -> int
Public Overrides Function Transceive (targetNumber As Byte, dataToSend As ReadOnlySpan(Of Byte), dataFromCard As Span(Of Byte)) As Integer
Parameters
- targetNumber
- Byte
The card target number
- dataToSend
- ReadOnlySpan<Byte>
The data to write to the card
Returns
The number of bytes read