⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 codapi.h

📁 由visual c++编写的北航一个的指纹识别系统
💻 H
📖 第 1 页 / 共 3 页
字号:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, PPS accepted
	COD_E_TIMEOUT		No PPS response received
	COD_E_CRC		CRC error
	COD_E_PARITY		Parity error
	COD_E_GENERAL		Error during command execution, command failed
	
Author:

Notes:	
--*/
//extern "C" FWRC WINAPI pps_a (BYTE bCID, BYTE bDI);
DllExport FWRC pps_a (BYTE bCID, BYTE bDI);


/*------------------------------------------------------------------------------
  Group Type B LowLevel:
------------------------------------------------------------------------------*/

/*++
setup_cod_b:

	This function Prepares the ISO-CLL for subsequent communications with a contactless Chipcard
	acc. to ISO 14443 Type B

		
Arguments:

    none
    
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, value written
	COD_E_GENERAL		Error during command execution, command failed
	
Author:

Notes:
	
--*/
//extern "C" FWRC WINAPI setup_cod_b (void);
DllExport FWRC setup_cod_b (void);

/*++

set_type_b_params:

	This function Prepares the ISO-CLL for subsequent communications with a contactless Chipcard
	acc. to ISO 14443 Type B

		
Arguments:

    bSOF - number of bit periods for a valid SOF information
    	High-Nibble specifies the number of bits for the low-phase
		Low-Nibble specifies the number of bits for the high-phase

    bEGT - number of bit periods for the EGT
    	High-Nibble number of bits for the EGT from PICC to PCD
		Low-Nibble number of bits for the EGT from PCD to PICC

	bEPS - Number of Clk-Periods to form a valid peak (X) and number of low
		bits to form a valid EOF (Y)
		b8							b1
		Y	Y	Y	Y	0	X	X	X
    
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, value written
	COD_E_GENERAL		Error during command execution, command failed
	
Author:

Notes:
	
--*/
//extern "C" FWRC WINAPI set_type_b_params (BYTE bSOF, BYTE bEGT, BYTE bEPS);
DllExport FWRC set_type_b_params (BYTE bSOF, BYTE bEGT, BYTE bEPS);


/*++

req_b_ll:

	Transmits the REQB command for probing the field for PICCs of Type B and returns
	the received ATQB if available.
	AFI is the desired Application Family Identifier, ReqbParam contains the request
	type and the number of slots. For details see ISO14443-3.
	
Arguments:

	bAFI - Desired Application Family Identifier for card preselection (see ISO14443-3)
	bReqbParam - Request type and number of slots (see ISO14443-3)
	pbATQB - destination for the ATQB (must be at least 12 Bytes)
    
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, ATQB valid
	COD_E_TIMEOUT		No ATQB received
	COD_E_CRC		CRC error
	COD_E_COLLISION	Collision occured
	COD_E_GENERAL		Error during command execution, command failed
	
Author:

Notes:
	
--*/
//extern "C" FWRC WINAPI req_b_ll (BYTE bAFI, BYTE bReqbParam, BYTE xdata *pbATQB);
DllExport FWRC req_b_ll (BYTE bAFI, BYTE bReqbParam, BYTE xdata *pbATQB);


/*++

req_b:

	Transmits the REQB command for probing the field for new PICCs of Type B
	and returns the received ATQB if available. Potential collisions are resolved.
	AFI is the desired Application Family Identifier. For details see ISO14443-3.
	
Arguments:

	bAFI - Desired Application Family Identifier for card preselection (see ISO14443-3)
	pbATQB - destination for the ATQB (must be at least 12 Bytes)
    
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, ATQB valid
	COD_E_TIMEOUT		No ATQB received
	COD_E_CRC		CRC error
	COD_E_COLLISION	Collision occured
	COD_E_GENERAL		Error during command execution, command failed
	
Author:

Notes:
	
--*/
//extern "C" FWRC WINAPI req_b (BYTE bAFI, BYTE xdata *pbATQB);
DllExport FWRC req_b (BYTE bAFI, BYTE xdata *pbATQB);


/*++

wakeup_b:

	Transmits the REQB command for probing the field for all PICCs of Type B
	and returns the received ATQB if available. Potential collisions are
	resolved.
	AFI is the desired Application Family Identifier. For details see ISO14443-3.
	
Arguments:

	bAFI - Desired Application Family Identifier for card preselection (see ISO14443-3)
	pbATQB - destination for the ATQB (must be at least 12 Bytes)
    
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, ATQB valid
	COD_E_TIMEOUT		No ATQB received
	COD_E_CRC		CRC error
	COD_E_COLLISION	Collision occured
	COD_E_GENERAL		Error during command execution, command failed
	
Author:

Notes:
	
--*/
//extern "C" FWRC WINAPI wakeup_b (BYTE bAFI, BYTE xdata *pbATQB);
DllExport FWRC wakeup_b (BYTE bAFI, BYTE xdata *pbATQB);


/*++

slotmarker_b:

	Transmits the SLOTMARKER command to retrieve further ATQBs from PICCs of 
	Type B answering in higher time slots.
	The number of the slot is submitted in slot_number.
	
Arguments:

    bSlotNumber - Number of the currently requested slot
	pbATQB - destination for the ATQB
    
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, ATQB valid
	COD_E_TIMEOUT		No ATQB received
	COD_E_CRC		CRC error
	COD_E_COLLISION	Collision occured
	COD_E_GENERAL		Error during command execution, command failed
	
Author:

Notes:
	
--*/
//extern "C" FWRC WINAPI slotmarker_b (BYTE bSlotNumber, BYTE xdata *pbATQB);
DllExport FWRC slotmarker_b (BYTE bSlotNumber, BYTE xdata *pbATQB);

/*++

anticoll_b:

	Transmits the REQ_B command and resolves an occuring collision by applying
	REQ_B and SLOTMARKER repeatedly until the collision is resolved.
	
Arguments:

    bAFI - Desired Application Family Identifier for card preselection (see ISO14443-3)
	bReqbParam - Request type and number of slots (see ISO14443-3)
			(The number of slots is ignored in this function)
	pbATQB - destination for the ATQB
    
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, ATQB valid
	COD_E_TIMEOUT		No ATQB received
	COD_E_CRC		CRC error
	COD_E_COLLISION	Collision not resolvable
	COD_E_GENERAL		Error during command execution, command failed
	
Author:

Notes:
	
--*/
//extern "C" FWRC WINAPI anticoll_b (BYTE bAFI, BYTE bReqbParam, BYTE xdata *pbATQB);
DllExport FWRC anticoll_b (BYTE bAFI, BYTE bReqbParam, BYTE xdata *pbATQB);

/*++

attrib:

	Transmits the ATTRIB command to a specific PICC of Type B, to
	assign the logical ID (CID). The PUPI is submitted in pbPUPI, the CID
	is submitted in bCID. The parameters of this command are fixed
	(see ISO14443-3) and set to 00h(P1) 07h(P2) 01h(P3).
	There is no application command at this stage.
	
Arguments:

    bpPUPI - Source for the PUPI
	bCID - Logical ID (CID) of the card to be selected
    
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, card selected and CID assigned
	COD_E_TIMEOUT		No Acknowledge received
	COD_E_CRC		CRC error in Acknowledge
	COD_E_GENERAL		Error during command execution, command failed
	
Author:

Notes:
	
--*/
//extern "C" FWRC WINAPI attrib_b (BYTE xdata *pbPUPI, BYTE bCID);
DllExport FWRC attrib_b (BYTE xdata *pbPUPI, BYTE bCID);

/*++

halt_b:

	Transmits the HALT command to send the selected PICC type B into the HALT state.
	
Arguments:

    bpPUPI - Source for the PUPI
    
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, card deselected
	COD_E_TIMEOUT		No Acknowledge received
	COD_E_CRC		CRC error in Acknowledge
	COD_E_GENERAL		Error during command execution, command failed
	
Author:

Notes:
	
--*/
//extern "C" FWRC WINAPI halt_b (BYTE xdata *pbPUPI);
DllExport FWRC halt_b (BYTE xdata *pbPUPI);

/*++

deselect_b:

	Transmits the proprietary DESELECT command for Infineon Type B App-Note for
	SLE66CL160.
	
Arguments:

	bCid - Card identifier
    
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, card deselected
	COD_E_TIMEOUT		No Acknowledge received
	COD_E_CRC		CRC error in Acknowledge
	COD_E_GENERAL		Error during command execution, command failed
	
Author:

Notes:
	
--*/
//extern "C" FWRC WINAPI deselect_b (BYTE bCid);
DllExport FWRC deselect_b (BYTE bCid);


/*------------------------------------------------------------------------------
  Group contactbased Functions:
------------------------------------------------------------------------------*/

/*++

open_con:

	Opens the addressed ICC connector for subsequent communications with
	the associated Smartcard.
	
Arguments:

	bSlotNumber - Number of the ICC connector to be opened
	(1 = external connector, 2 = internal connector)
    
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, card deselected
	
Author:

Notes:
	
--*/
//extern "C" FWRC WINAPI open_con (BYTE bSlotNumber);
DllExport FWRC open_con (BYTE bSlotNumber);

/*++

close_con:

	Closes the addressed ICC connector. Communication with the associated
	Smartcard is no more possible.
	
Arguments:

	bSlotNumber - Number of the ICC connector to be closed
	(1 = external connector, 2 = internal connector)
    
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, card deselected
	
Author:

Notes:
	
--*/
//extern "C" FWRC WINAPI close_con (BYTE bSlotNumber);
DllExport FWRC close_con (BYTE bSlotNumber);

/*++

sta_con:

	Retrieves the Status of the addressed ICC connector and, if present, of the
	inserted Smartcard.
	
Arguments:

	bSlotNumber - Number of the ICC connector
	(1 = external connector, 2 = internal connector)
	pbSlotStatus - Pointer to the Buffer which receives the Status of the Slot
		       with the Length of the returned Data as the first Byte in
		       the Buffer.
	(This Buffer must be at least 40 Bytes for the ATR and the Status of the
	Slot and the ICC)
    
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, card deselected
	
Author:

Notes:
	
--*/
//extern "C" FWRC WINAPI sta_con (BYTE bSlotNumber,BYTE *pbSlotStatus);
DllExport FWRC sta_con (BYTE bSlotNumber,BYTE *pbSlotStatus);

/*++

tra_cc:

	Data exchange with the addressed Smartcard via the cards specific
	asynchronous communication protocol. In case of a communication error
	with the card, the returned data indicate an error with the control
	parameter 0x07 and one of the following error codes:
	0x00: Layer 7 Error
	0x01: Non recoverable error
	0x02: Resynchronization executed
	0x03: Receive error
	
Arguments:

	bSlotNumber - Number of the ICC connector
	(1 = external connector, 2 = internal connector)
	pbTxApdu - Pointer to the Buffer which contains the Data to be transmitted
		   to the Smartcard, with the Length as the first Byte.
	pbRxApdu - Pointer to the Buffer which receives the Data sent by the
		   Smartcard, with the Length as the first Byte.
	(The maximum Length of the APDU Data in both directions is 250 Bytes!)
    
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, card deselected
	
Author:

Notes:
	
--*/
//extern "C" FWRC WINAPI tra_cc (BYTE bSlotNumber,BYTE *pbTxApdu,BYTE *pbRxApdu);
DllExport FWRC tra_cc (BYTE bSlotNumber,BYTE *pbTxApdu,BYTE *pbRxApdu);

/* For later use
BYTE power_card (BYTE card-no, BYTE vcc_level)
BYTE unpower_card (BYTE card-no)
*/

#endif // __CODAPI_H__



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -