<td id="n3ws3"></td>
          <th id="n3ws3"></th>
            <b id="n3ws3"><menuitem id="n3ws3"></menuitem></b>
            <del id="n3ws3"><form id="n3ws3"></form></del>
            <b id="n3ws3"><menuitem id="n3ws3"></menuitem></b>
          1. <dd id="n3ws3"><dl id="n3ws3"></dl></dd>
            IC卡讀卡器與編程語言

            北京友我科技RFID讀寫器 轉(zhuǎn)載請注明出處,本篇地址:http://www.gdfkthg.cn/ywdn/NoteDetails.asp?id=19

              由于需求的千差萬別,IC卡讀卡器在實(shí)際使用中一般都需要經(jīng)過二次開發(fā),而軟件工程師一般都精通一種或幾種編程語言,有時候恰恰要使用不熟悉的編程語言。有時候也有一些工程師問這個IC卡讀卡器支不支持這種編程語言,其實(shí)答案是肯定的。

              IC卡讀卡器SDK中一般都帶有DLL文件,實(shí)際上這個DLL文件的調(diào)用與編程語言是沒有關(guān)系的,而與編程語言有關(guān)系的就是API函數(shù)的聲明,只要我們了解相關(guān)編程語言的語法規(guī)則,基本可以用任何編程語言來開發(fā)了。

              下面舉個例子來說明:

              M1卡的防碰撞并選卡函數(shù)YW_AntiCollideAndSelect


            函數(shù)的C語言聲明如下:int stdcall  YW_AntiCollideAndSelect(int ReaderID, unsigned char MultiCardMode, unsigned char *CardMem, unsigned char *SNLen, unsigned char *SN);


            delphi聲明:function YW_AntiCollideAndSelect(ReaderID: Integer;MultiCardMode:Byte;var CardMem: Byte;var SNOLen:Byte;SNO: PChar): Integer;stdcall;external 'YW60x.dll';


            VB聲明:Public Declare Function YW_AntiCollideAndSelect Lib "YW60x.dll" (ByVal ReaderID As Long, ByVal MultiCardMode As Byte, ByRef CardMem As Byte, ByRef SNOLen As Byte)


            C#聲明:[DllImport("YW60x.dll")]


            public static extern int YW_AntiCollideAndSelect(int ReaderID,byte MultiCardMode, ref byte CardMem, ref byte SNLen, byte [] SN);


            Power Builder 9 聲明:public FUNCTION long YW_AntiCollideAndSelect (long lReaderID , char MultiCardMode, ref char CardMem, ref char SNOLen, ref char SNO[]) library "YW60x.dll"


            JAVA聲明:

            public int YW_AntiCollideAndSelect(int ReaderID,byte MultiCardMode, Pointer CardMem, Pointer SNLen, Pointer SN)


            {


            int ret;


            try


            {


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


            fuc.setRetVal(Type.INT);


            fuc.setParameter(0, ReaderID);


            fuc.setParameter(1, MultiCardMode);


            fuc.setParameter(2,CardMem);


            fuc.setParameter(3,SNLen);


            fuc.setParameter(4,SN);


            fuc.invoke();


            ret = fuc.getRetValAsInt();


            }


            catch(NativeException e)


            {


            ret = -1;


            }


            catch(IllegalAccessException e)


            {


            ret = -2;


            }


            return ret;


            }


            只要明白各種編程語言中數(shù)據(jù)類型的轉(zhuǎn)換,就可以自己將這些讀卡器SDK中的API函數(shù)轉(zhuǎn)換成自己熟悉的聲明函數(shù)。


            支持的RFID讀寫器:
            SDT-HA, YW-605RA, YW-605RB, YW-605RC, YW-605SA, YW-605SB, YW-605SC, YW-605UA, YW-605UB, YW-605UC, YW-605HA, YW-605HB, YW-605HC, YW-620HA, YW-620HB, YW-620HC, YW-608RA, YW-608RB, YW-608RC, YW-608SA, YW-608SB, YW-608SC, YW-608UA, YW-608UB, YW-608HB, YW-608HC, YW-610SA, YW-610SB, YW-610SC, YW-602-R, YW-602-3, YW-602-8

              <td id="n3ws3"></td>
                    <th id="n3ws3"></th>
                      <b id="n3ws3"><menuitem id="n3ws3"></menuitem></b>
                      <del id="n3ws3"><form id="n3ws3"></form></del>
                      <b id="n3ws3"><menuitem id="n3ws3"></menuitem></b>
                    1. <dd id="n3ws3"><dl id="n3ws3"></dl></dd>
                      欧美日韩国产中文在线 | 91人妻免费 | 91在线无码精品秘 蜜桃入口 | 月色婷亚洲 | 天天干天天日天天色 |