YW_Felica_Polling
Felica卡片寻卡

参数列表:

int stdcall YW_Felica_Polling

(

int ReaderID, 

unsigned short SystemCode, 

unsigned char RequestCode, 

unsigned char Slot,               

 unsigned char *IDM, 

unsigned char *PMm, 

unsigned char *RequestData

)


参数含义:

参数

类型

方向

含义

ReaderID

int

IN

所要获取的设备标示ID,范围0x0000-0xFFFF,如果未知,则ReaderID=0

SystemCode

unsigned short

IN

Felica参数,System Code

RequestCode

unsigned char

IN

Felica参数,Request Code

0x00: No Request

0x01: System Code Request

0x02: Communication Performance Request

其他:RFU

Slot

unsigned char

IN

最大响应时间,可以设置的值:0x00,0x01,0x03,0x07,0x0F

IDM

unsigned char*

OUT

卡号,8字节

PMm

unsigned char*

OUT

PMm8字节

RequestData

unsigned char*

OUT

只有当RequestCode=0x010x02时,才会返回Request data2字节

返 回 值:大于0为命令发送成功,<=0为命令发送失败


C++声明(VC++和C++ Builder):

int stdcall YW_Felica_Polling(int ReaderID, unsigned short SystemCode, unsigned char RequestCode, unsigned char Slot,                unsigned char *IDM, unsigned char *PMm, unsigned char *RequestData)


Delphi声明:

function YW_Felica_Polling(ReaderID: Integer; SystemCode: Word;RequestCode: Byte; Slot: Byte;


VB声明:

Public Declare Function YW_Felica_Polling Lib "YW60x.dll" (ByVal ReaderID As Long, ByVal SystemCode As Integer, ByVal RequestCode As Byte, ByVal Slot As Byte, _


JAVA声明:

public int YW_Felica_Polling(int ReaderID, short SystemCode, byte RequestCode, byte Slot,

Pointer IDM, Pointer PMm, Pointer RequestData)

{

int ret;

try

{

JNative fuc = new JNative("YW60x.dll", "YW_Felica_Polling");

fuc.setRetVal(Type.INT);

fuc.setParameter(0, ReaderID);

fuc.setParameter(1, SystemCode);

fuc.setParameter(2, RequestCode);

fuc.setParameter(3, Slot);

fuc.setParameter(4, IDM);

fuc.setParameter(5, PMm);

fuc.setParameter(6, RequestData);

fuc.invoke();

ret = fuc.getRetValAsInt();

}

catch(NativeException e)

{

ret = -1;

}

catch(IllegalAccessException e)

{

ret = -2;

}

return ret;

}


C#声明:

[DllImport("YW60x.dll")]

public static extern int YW_Felica_Polling(int ReaderID, ushort SystemCode, byte RequestCode, byte Slot,byte[] IDM, byte[] PMm, byte[] RequestData);


Power Builder 9 声明:

public FUNCTION long YW_Felica_Polling (long lReaderID , Integer SystemCode , char RequestCode, char Slot, ref char IDM[], ref char PMm[], ref char RequestData[])


支持的RFID读写器:
YW-607