public class CardControl
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
RFReturnCode |
authenticateM0(byte[] data)
Performs authentication of Mifare type M0.
|
RFReturnCode |
authenticateM1(RFKeyMode keyMode,
byte[] snr,
int block,
byte[] key)
Performs authentication of Mifare type M1.
|
RFReturnCode |
close()
Close RF interface.
|
Pair<RFReturnCode,byte[]> |
readBlock(int blockID)
Reads block defined by block ID.
|
void |
setSoTimeout(int timeout) |
Pair<RFReturnCode,java.util.ArrayList<byte[]>> |
transmit(java.util.ArrayList<byte[]> data)
The communication of the A-Card or B-Card type of RFCard.
|
Pair<RFReturnCode,byte[]> |
transmit(byte[] data)
The communication of the A-Card or B-Card type of RFCard.
|
RFReturnCode |
writeBlock(int blockID,
byte[] data)
Writes data to defined block by block ID.
|
public void setSoTimeout(int timeout)
throws java.net.SocketException
java.net.SocketExceptionpublic RFReturnCode authenticateM0(byte[] data)
data - Command data.public RFReturnCode authenticateM1(RFKeyMode keyMode, byte[] snr, int block, byte[] key)
keyMode - Key mode.snr - Card serial number.block - Number of block to be authenticated.key - The external key.public Pair<RFReturnCode,byte[]> readBlock(int blockID)
blockID - ID of card block.public RFReturnCode writeBlock(int blockID, byte[] data)
blockID - Block ID.data - Data to be written.public Pair<RFReturnCode,byte[]> transmit(byte[] data)
data - Command data.public Pair<RFReturnCode,java.util.ArrayList<byte[]>> transmit(java.util.ArrayList<byte[]> data)
data - Commands data list.public RFReturnCode close()