• 大小: 2.95MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-01
  • 语言: Java
  • 标签: java  RFID  读写器  源码  

资源简介

用java RFID读写器一些源码DLL用java RFID读写器一些源码DLL用java RFID读写器一些源码DLL

资源截图

代码片段和文件信息

#include “stdafx.h“
#include “ISO15693.h“
#include “ReadDLL.h“
unsigned char  m_count=255;  // 记录桢数据
//int _stdcall Inventory(BYTE Sendval[]BYTE REVval[]bool AFIbool Singletagbool ASKDWORD &nBytestoRead )
int _stdcall Inventory(BYTE Sendval[]BYTE REVval[]bool AFIint AFIvalint FlagDWORD &nBytestoRead)
{
   //BYTE Sendval[20];
   //BYTE REVval[2000];
   char CRCval[10];
   int CRC16;
   int i;
   int ret;
   m_count++;
   Sendval[0]=0x3A;
     Sendval[1]=(m_count>>4) &0x0f;
   Sendval[2]=m_count &0x0f;


   CRCval[0]=m_count;

   Sendval[3]=0;
   Sendval[4]=0x01;// vinventory
   CRCval[1]=0x01;

   Sendval[5]=0;
   if(!AFI){
        Sendval[6]=0x02;
        CRCval[2]=0x02;
   }
   else
   {
        Sendval[6]=0x04;
        CRCval[2]=0x04;
        CRCval[5]=AFIval;//AFIval;
                Sendval[11]=0;
       Sendval[12]=AFIval;//AFIval;
   }
   Sendval[7]=0;
   Sendval[8]=0;
   CRCval[3]=0x00;
  /*
   if(Singletag==true)
   {  Sendval[9]=0x30+0x02;
      CRCval[4]=0x02;
   }
   else
   {  Sendval[9]=0x30;
      CRCval[4]=0x00;
   }    */
  /* if(ASK==true)
   {
    Sendval[10]=0x30+0x06;  //ASK
        CRCval[4]=CRCval[4]<<4+0x06;
   }
   else
   {
      Sendval[10]=0x30+0x07;  //FSK
   CRCval[4]=(CRCval[4]<<4)+0x07;
   }  */
       Sendval[9]=(Flag>>4)&0x0f;
       Sendval[10]=Flag&0x0f;//Flag;
       CRCval[4]=Flag;//Flag;

   CRC16=RFcrc_16(0CRCvalAFI?6:50xFFFF);
   CRCval[AFI?6:5]=CRC16&0xff;
   CRCval[AFI?7:6]=(CRC16>>8)&0xff;

   Sendval[AFI?15:13]=((CRCval[6]>>4)&0x0f);
   Sendval[AFI?16:14]=(CRCval[6]&0x0f);
   Sendval[AFI?13:11]=((CRCval[5]>>4)&0x0f);
   Sendval[AFI?14:12]=(CRCval[5]&0x0f);
   for(i=1;i<(AFI?17:15);i++)
   {
      if (Sendval[i]>9)
        Sendval[i]=Sendval[i]+0x37;
      else
        Sendval[i]=Sendval[i]+0x30;
   }
   Sendval[AFI?17:15]=0x0A;
   Sendval[AFI?18:16]=0x0D;

/*  */
   ret=WriteCom(SendvalAFI?19:17);
   nBytestoRead=0;
   ret=ReadCom(REVvalnBytestoRead500);
//   Retval=&REVval[0];300
return 1;



}
int _stdcall StayQuite(BYTE Sendval[]BYTE retval[]int FlagBYTE UID[]DWORD &nBytestoRead)
{
 // :020212002339B23201004005E0C9BF
// 3A3032303231323030323333394232333230313030343030354530433942460A
   char Sendval16[100];
    //BYTE Sendval[200];
char CRCval[10];
    int ret;
    int i;
    int CRC16;

   m_count++;
   Sendval[0]=0x3A;
   Sendval16[1]=m_count&0xff;
   Sendval16[2]=0x02;
   Sendval16[3]=0x12;
   Sendval16[4]=0x00;
   Sendval16[5]=Flag;
   for(i=0;i<8;i++)
    Sendval16[6+i]=UID[i];
        for(i=1;i<14;i++)
   {
        if((0x0F&(Sendval16[i]>>4))>9)
           Sendval[2*i-1]=(0x0F&(Sendval16[i]>>4))+0x37;
        else
           Sendval[2*i-1]=(0x0F&(Sendval16[i]>>4))+0x30;

        if((0x0F&(Sendval16[i]))>9)
           Sendval[2*i]=(0x0F&(Sendval16[i]))+0x37;
        else
           Sendval[2*i]=(0x0F&(Sendval16[i]))+0x30;
   }


   CRC16=RFcrc_16(1

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        124  2007-11-09 19:44  java_reader\MachineInterface\log200711313.txt

     文件        234  2008-02-27 16:11  java_reader\MachineInterface\log20080258.txt

     文件       2466  2008-02-29 10:06  java_reader\MachineInterface\log20080260.txt

     文件       1619  2007-11-26 22:43  c++DLL\ReadMe.txt

     文件        403  2008-02-27 18:36  javadll\jdll\调用流程.txt

     文件       7516  2008-02-28 13:58  java_reader\MachineInterface\hs_err_pid1348.log

     文件       7918  2008-02-28 18:29  java_reader\MachineInterface\hs_err_pid1596.log

     文件       7516  2008-02-28 13:40  java_reader\MachineInterface\hs_err_pid1992.log

     文件       8522  2008-02-28 17:44  java_reader\MachineInterface\hs_err_pid2040.log

     文件       7515  2008-02-28 13:35  java_reader\MachineInterface\hs_err_pid2260.log

     文件       7513  2008-02-28 13:57  java_reader\MachineInterface\hs_err_pid2324.log

     文件       7887  2008-02-28 18:32  java_reader\MachineInterface\hs_err_pid2332.log

     文件       7910  2008-02-28 18:31  java_reader\MachineInterface\hs_err_pid2388.log

     文件       8335  2008-02-28 13:30  java_reader\MachineInterface\hs_err_pid2400.log

     文件       8410  2008-02-27 16:36  java_reader\MachineInterface\hs_err_pid2652.log

     文件       7519  2008-02-28 14:28  java_reader\MachineInterface\hs_err_pid2748.log

     文件       7519  2008-02-28 14:31  java_reader\MachineInterface\hs_err_pid2768.log

     文件       7922  2008-02-28 19:04  java_reader\MachineInterface\hs_err_pid2848.log

     文件       8014  2008-02-28 18:28  java_reader\MachineInterface\hs_err_pid3028.log

     文件       8172  2008-02-28 20:02  java_reader\MachineInterface\hs_err_pid3112.log

     文件       8421  2008-02-28 17:22  java_reader\MachineInterface\hs_err_pid3116.log

     文件       8172  2008-02-28 19:59  java_reader\MachineInterface\hs_err_pid3128.log

     文件       7519  2008-02-28 14:30  java_reader\MachineInterface\hs_err_pid3164.log

     文件       8326  2008-02-28 13:33  java_reader\MachineInterface\hs_err_pid3264.log

     文件       7942  2008-02-28 19:39  java_reader\MachineInterface\hs_err_pid3308.log

     文件       7512  2008-02-28 14:37  java_reader\MachineInterface\hs_err_pid3388.log

     文件       8406  2008-02-28 13:32  java_reader\MachineInterface\hs_err_pid3592.log

     文件       7516  2008-02-28 13:39  java_reader\MachineInterface\hs_err_pid3764.log

     文件       8015  2008-02-28 18:27  java_reader\MachineInterface\hs_err_pid3880.log

     文件       8589  2008-02-27 17:02  java_reader\MachineInterface\hs_err_pid3940.log

............此处省略293个文件信息

评论

共有 条评论