![Advanced Card ACR20 Скачать руководство пользователя страница 6](http://html1.mh-extra.com/html/advanced-card/acr20/acr20_program-reference-manual_2855845006.webp)
Smart Card Reader Driver Program Reference Manual
rev 1.1 Sept, 2003
Advanced Card Systems Ltd.
Page 6 of 34
2.3.1.1 AC_APDU
typedef struct
{
BYTE
CLA;
BYTE
INS;
BYTE
P1;
BYTE
P2;
INT16
Lc;
INT16
Le;
BYTE
DataIn[256];
BYTE
DataOut[256];
WORD16 Status;
} AC_APDU;
The AC_APDU data structure is used in the AC_ExchangeAPDU function for the passing of
commands and data information into the smart card. For memory card operation, please refer
to section
0
for the definition of fields’ value. For MCU card (T=0,T=1) operation, these value
are specific to the smart card operating system. You must have the card reference manual
before you can perform any valid operations on the card. Please notice that Lc representing
the data length going into the card and Le representing the data length expecting from the
card.
Name
Input/Output
Description
CLA I
Instruction
Class
INS I
Instruction
Code
P1 I
Parameter
1
P2 I
Parameter
2
Lc
I
Length of command data (DataIn)
Le
I/O
Length of response data (DataOut)
DataIn
I
Command data buffer
DataOut
O
Response data buffer
Status
O
Execution status of the command
2.3.1.2 AC_SESSION
typedef struct
{
BYTE CardType;
// Card type selected
BYTE SCModule;
// Selected security module.
//Use only when card type = AC_SCModule
BYTE ATRLen;
// Length of the ATR
BYTE ATR[128];
// ATR string
BYTE HistLen;
// Length of the Historical data
BYTE HistOffset; // Offset of the Historical data
// from the beginning of ATR
INT16 APDULenMax; // Max. APDU supported
} AC_SESSION;
The AC_SESSION data structure is used in the AC_StartSession function call for the retrieval
of ATR information from the smart card. Before calling AC_StartSession, the program needs