|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.datecs.api.rfid.ContactlessCard
com.datecs.api.rfid.FeliCaCard
public class FeliCaCard
| Field Summary | |
|---|---|
static int |
FELICA_SMARTTAG_BATTERY_LOW1
Low, consider replacing. |
static int |
FELICA_SMARTTAG_BATTERY_LOW2
Very Low, replace it. |
static int |
FELICA_SMARTTAG_BATTERY_NORMAL1
Normal, card can be used. |
static int |
FELICA_SMARTTAG_BATTERY_NORMAL2
Normal, card can be used. |
static int |
FELICA_SMARTTAG_DRAW_BLACK_BACKGROUND
The area outside of the image will be shown black. |
static int |
FELICA_SMARTTAG_DRAW_KEEP_BACKGROUND
The area outside of the image will be kept to its current state. |
static int |
FELICA_SMARTTAG_DRAW_USE_LAYOUT
The area outside of the image will be drawn using one of the previously stored layouts. |
static int |
FELICA_SMARTTAG_DRAW_WHITE_BACKGROUND
The area outside of the image will be emptied. |
| Fields inherited from class com.datecs.api.rfid.ContactlessCard |
|---|
afi, atqa, blockSize, capacity, CARD_FELICA, CARD_ISO14443A, CARD_ISO14443B, CARD_ISO15693, CARD_MIFARE_CLASSIC_1K, CARD_MIFARE_CLASSIC_4K, CARD_MIFARE_DESFIRE, CARD_MIFARE_MINI, CARD_MIFARE_PLUS, CARD_MIFARE_ULTRALIGHT, CARD_MIFARE_ULTRALIGHT_C, CARD_ST_SRI, CARD_UNKNOWN, channel, dsfid, hyatt64Card, maxBlocks, sak, type, uid |
| Constructor Summary | |
|---|---|
FeliCaCard(RC663 module)
Constructs a new instance of this class. |
|
| Method Summary | |
|---|---|
boolean |
initialize()
Initialize card. |
byte[] |
read(int serviceCode,
int startBlock,
int blocks)
Reads one more more blocks of data from FeliCa card. |
void |
smartTagClearScreen()
Clears the screen of FeliCa SmartTag. |
void |
smartTagDisplayLayout(int layout)
Displays previously stored layout. |
void |
smartTagDrawImage(int x,
int y,
int width,
int height,
int drawMode,
int layout,
byte[] data)
Draws image on FeliCa SmartTag's screen. |
int |
smartTagGetBatteryStatus()
Returns FeliCa SmartTag battery status. |
byte[] |
smartTagRead(int address,
int length)
Writes data in FeliCa SmartTag. |
void |
smartTagSaveLayout(int layout)
Saves the current display as layout number. |
void |
smartTagWrite(int address,
byte[] data)
Writes data in FeliCa SmartTag. |
void |
write(int serviceCode,
int startBlock,
byte[] data)
Writes one more more blocks of data to FeliCa card. |
| Methods inherited from class com.datecs.api.rfid.ContactlessCard |
|---|
getModule, waitRemove |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int FELICA_SMARTTAG_BATTERY_NORMAL1
public static final int FELICA_SMARTTAG_BATTERY_NORMAL2
public static final int FELICA_SMARTTAG_BATTERY_LOW1
public static final int FELICA_SMARTTAG_BATTERY_LOW2
public static final int FELICA_SMARTTAG_DRAW_WHITE_BACKGROUND
public static final int FELICA_SMARTTAG_DRAW_BLACK_BACKGROUND
public static final int FELICA_SMARTTAG_DRAW_KEEP_BACKGROUND
public static final int FELICA_SMARTTAG_DRAW_USE_LAYOUT
| Constructor Detail |
|---|
public FeliCaCard(RC663 module)
module - The instance of RC663 module.| Method Detail |
|---|
public boolean initialize()
throws java.io.IOException
java.io.IOException - if an I/O error occurs.
public byte[] read(int serviceCode,
int startBlock,
int blocks)
throws java.io.IOException,
RFIDException
serviceCode - The service code, default is 0x0900.startBlock - The starting block to read from.blocks - The number of bytes to read, this must be multiple of block size.
java.io.IOException - If an I/O error occurs.
RFIDException - if an RF663 error occurs.
public void write(int serviceCode,
int startBlock,
byte[] data)
throws java.io.IOException,
RFIDException
serviceCode - The service code, default is 0x0900.startBlock - The starting block to write to.data - The data to write, it must be multiple of block size.
java.io.IOException - If an I/O error occurs.
RFIDException - if an RF663 error occurs.
public int smartTagGetBatteryStatus()
throws java.io.IOException,
RFIDException
java.io.IOException - If an I/O error occurs.
RFIDException - if an RF663 error occurs.
public void smartTagClearScreen()
throws java.io.IOException,
RFIDException
java.io.IOException - If an I/O error occurs.
RFIDException - if an RF663 error occurs.
public void smartTagDrawImage(int x,
int y,
int width,
int height,
int drawMode,
int layout,
byte[] data)
throws java.io.IOException,
RFIDException
x - Top-left X coordinate in pixels.y - Top-left Y coordinate in pixels.width - The image width.height - The image height.drawMode - Draw mode, one of the FELICA_SMARTTAG_DRAW_* constants.layout - Only used when drawMode is FELICA_SMARTTAG_DRAW_USE_LAYOUT, it specifies the
index of the layout (1-12) of the previously stored image.data - The image data (one bit is one pixel).
java.io.IOException - If an I/O error occurs.
RFIDException - if an RF663 error occurs.
public void smartTagSaveLayout(int layout)
throws java.io.IOException,
RFIDException
layout - The layout index (1-12) to which the currently displayed image will be saved.
java.io.IOException - If an I/O error occurs.
RFIDException - if an RF663 error occurs.
public void smartTagDisplayLayout(int layout)
throws java.io.IOException,
RFIDException
layout - The layout index (1-12) of the previously stored image.
java.io.IOException - If an I/O error occurs.
RFIDException - if an RF663 error occurs.
public void smartTagWrite(int address,
byte[] data)
throws java.io.IOException,
RFIDException
address - The address of the card to write to, refer to SmartTag documentation.data - The data to write, note that the data does not need to be aligned to block size.
java.io.IOException - If an I/O error occurs.
RFIDException - if an RF663 error occurs.
public byte[] smartTagRead(int address,
int length)
throws java.io.IOException,
RFIDException
address - The address of the card to read from, refer to SmartTag documentation.length - The length of the data to read, note that the data does not need to be aligned
to block size.
java.io.IOException - If an I/O error occurs.
RFIDException - if an RF663 error occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||