unit DL810_MUL_DLL_Head;

interface

Const

    DLLName = 'DL810_5510MUL.dll';

type
    RTempRecord=Record
    end;
    //==========================================================================================//
    Function OpenComPort(Port : LongInt;var ComAdr : byte; var frmcomportindex: longint): LongInt; stdcall; external DLLName ;
    Function CloseComPort(  ): LongInt; stdcall;external DLLName ;
    Function AutoOpenComPort(var Port : longint; var ComAdr : byte; var frmComPortindex :longint ) : LongInt; stdcall; external DLLName ;
    Function CloseSpecComPort( frmComPortindex : longint ): LongInt; stdcall;external DLLName ;
    Function Inventory(var ComAdr : byte; var State : byte;  var AFI : byte;
                       DSFIDAndUID : pchar;  var CardNum : byte; frmComPortindex : longint): LongInt; stdcall; external DLLName ;

    Function StayQuiet(var ComAdr : byte; UID : pchar; var ErrorCode : byte; frmComPortindex : longint): LongInt; stdcall;external DLLName ;

    Function ReadSingleBlock(var ComAdr : byte; var State : byte; UID : pchar;
                             BlockNum : byte; Var BlockSecStatus : Byte;
                             Data : pchar; var ErrorCode: byte;
                             frmComPortindex : longint): LongInt; stdcall; external DLLName ;
     Function ReadMultipleBlock(var ComAdr : byte;
                             var State : byte;
                             UID : pchar;
                              BlockNum : byte;
                              BlockCount :byte;
                              BlockSecStatus : pchar;
                             Data : pchar;
                             var ErrorCode: byte;
                             frmComPortindex : longint): LongInt; stdcall; external DLLName ;
   Function WriteSingleBlock(var ComAdr : byte;var State : byte; UID : pchar;
                              BlockNum : byte; Data : pchar;
                              var ErrorCode : byte; frmComPortindex : longint): LongInt; stdcall; external DLLName ;

    Function LockBlock(var ComAdr : byte; var State : byte; UID : pchar;
                       BlockNum : byte; var ErrorCode : byte; frmComPortindex : longint): LongInt; stdcall; external DLLName ;

    Function Select(var ComAdr : byte;UID : pchar; var ErrorCode : byte; frmComPortindex : longint): LongInt; stdcall;external DLLName ;

    Function ResetToReady(var ComAdr : byte; var State : byte; UID : pchar;
                          var ErrorCode : byte; frmComPortindex : longint): LongInt; stdcall; external DLLName ;

    Function WriteAFI(var ComAdr : byte;var State : byte; UID : pchar;
                      AFI : byte;  var ErrorCode : byte; frmComPortindex : longint): LongInt; stdcall;external DLLName ;

    Function LockAFI(var ComAdr : byte; var State : byte; UID : pchar;
                     var ErrorCode : byte; frmComPortindex : longint): LongInt; stdcall; external DLLName ;

    Function WriteDSFID(var ComAdr : byte; var State : byte; UID : pchar;
                        DSFID : byte; var ErrorCode : byte; frmComPortindex : longint): LongInt; stdcall; external DLLName ;

    Function LockDSFID(var ComAdr : byte;var State : byte; UID : pchar;
                       var ErrorCode : byte; frmComPortindex : longint): LongInt; stdcall; external DLLName ;

    Function GetSystemInformation(var ComAdr : byte;   var State : byte;
                                  UIDI : pchar;  var InformationFlag : byte;
                                  UIDO : pchar;  var DSFID : byte;
                                  var AFI : byte; MemorySize : pchar;
                                  var ICReference : Byte;
                                  var ErrorCode : byte; frmComPortindex : longint): LongInt; stdcall;external DLLName ;

    Function GetReaderInformation(var ComAdr : byte;   VersionInfo : pchar;
                                  var ReaderType : Byte; TrType : pchar;
                                  var InventoryScanTime : Byte; frmComPortindex : longint): LongInt; stdcall;external DLLName ;

    Function OpenRf(var ComAdr : byte; frmComPortindex : longint): LongInt; stdcall; external DLLName ;
    Function CloseRf(var ComAdr : byte; frmComPortindex : longint): LongInt; stdcall; external DLLName ;
    Function WriteComAdr(var ComAdr : byte; var ComAdrData : Byte; frmComPortindex : longint): LongInt; stdcall; external DLLName ;
    Function WriteInventoryScanTime(var ComAdr : byte; var InventoryScanTime : Byte; frmComPortindex : longint): LongInt; stdcall;external DLLName ;


    Function SetGeneralOutput(var ComAdr : byte; var _Output : Byte; frmComPortindex : longint): LongInt; stdcall;  external DLLName ;
    Function GetGeneralInput(var ComAdr : byte;  var _Input : Byte; frmComPortindex : longint): LongInt; stdcall;   external DLLName ;
    Function SetRelay(var ComAdr : byte; var _Relay : Byte; frmComPortindex : longint): LongInt; stdcall;  external DLLName ;

    function  SetActiveANT(var ComAdr : byte;var _ANT_Status : Byte; frmComPortindex : longint):longint;stdcall;external DLLName ;

    function GetANTStatus(var ComAdr : byte;var Get_ANT_Status : Byte; frmComPortindex : longint):longint;stdcall;external DLLName ;


  Function SetUserDefinedBlockLength(var ComAdr : byte;var _Block_len : Byte; frmComPortindex : longint): LongInt; stdcall; external DLLName ;


  Function SetScanMode(var ComAdr : byte;
                       _Scan_Mode_Data :pchar; frmComPortindex : longint): LongInt; stdcall;external DLLName ;


 Function ReadScanModeData(ScanModeData : pchar;
                           var ValidDatalength : longint; frmComPortindex : longint): LongInt;stdcall;external DLLName ; //读取扫描模式的数据
Function  GetUserDefinedBlocklength(var ComAdr : Byte;
                                  var _Block_len : Byte; frmComPortindex : longint):longint;stdcall;external DLLName ;
Function GetScanModeStatus(var Comadr:byte;
                             _Scan_Mode_Status:pchar; frmComPortindex : longint):longint;stdcall;external DLLName ;

Function CustomizedReadSingleBlock(var ComAdr : byte;
                                 var State : byte;
                                 UID : pchar;
                                  BlockNum : byte;
                                   DataBuffer : pchar;
                                var ErrorCode: byte; frmComPortindex : longint): LongInt; stdcall; external DLLName ;
Function CustomizedWriteSingleBlock(var ComAdr : byte;
                              var State : byte;
                              UID : pchar;
                              BlockNum : byte;
                              Data : pchar;
                               ByteCount : byte;
                              var ErrorCode : byte; frmComPortindex : longint): LongInt; stdcall; external DLLName ;

Function CustomizedReadMultipleBlock(var ComAdr : byte;
                             var State : byte;
                             UID : pchar;
                             BlockNum : byte;
                             BlockCount : byte;
                             DataBuffer : pchar;
                             var ErrorCode: byte; frmComPortindex : longint): LongInt; stdcall;external DLLName ;

Function SetAccessTime(var ComAdr : byte;
                       var AccessTime : Byte; frmComPortindex : longint): LongInt; stdcall;  external DLLName ;


 Function GetAccessTime(var ComAdr : byte;
                       var AccessTimeRet : Byte; frmComPortindex : longint):longint;stdcall; external DLLName ;
 Function SetReceiveChannel(var ComAdr : byte;
                       var ReceiveChannel : Byte; frmComPortindex : longint): LongInt; stdcall; external DLLName ;

 function GetReceiveChannelStatus(var ComAdr : byte;
                          var ReceiveChannelStatus : Byte; frmComPortindex : longint):longint;stdcall;external DLLName ;
     function  TransparentRead(var ComAdr:Byte;
                               RspLength:Byte;
                                CustomDatalength:Byte;
                                CustomData:pchar;
                            var  FeedbackDataLength :byte; 
                                 FeedbackData : pchar;
                              var ErrorCode: byte;
                              frmComPortindex : longint):longint;stdcall; external DLLName ;

   function  TransparentWrite(var ComAdr:Byte;
                               option:pchar;
                              RspLength:Byte;
                             CustomDatalength:Byte;  
                               CustomData:pchar;
                             var  FeedbackDataLength :byte;
                                FeedbackData : pchar;
                              var ErrorCode: byte;
                              frmComPortindex : longint):longint;stdcall; external DLLName ;

    function TransparentCustomizedCmd(var ComAdr:Byte;
                                      RspTime:pchar;
                                       RspLength:byte;
                                     CustomDataLength:byte; 
                                       CustomData:pchar;
                                    var  FeedbackDataLength :byte; 
                                       FeedbackData : pchar;
                                      var ErrorCode :byte;
                                      frmComPortindex : longint):longint;stdcall;external DLLName ;

   Function SetParseMode(var ComAdr : byte;
                       var _ParseMode : Byte;
                       frmComPortindex : longint): LongInt; stdcall;  external DLLName ;
   Function GetParseMode(var ComAdr : byte;
                         var Get_ParseMode : Byte;
                         frmComPortindex : longint): LongInt; stdcall;  external DLLName ;
implementation


end.













