The ISCardCmd interface provides the methods needed to construct and manage a smart card Application Protocol Data Unit (APDU ). This interface encapsulates two buffers:
The following example shows a typical use of the ISCardCmd interface. The ISCardCmd interface is used to build the an ADPU.
To submit a transaction to a specific card| ISCardCmd Methods | Description |
|---|---|
| get_Apdu | Retrieves the raw APDU. |
| put_Apdu | Copies the APDU from an IByteBuffer (IStream) object into the APDU wrapped in this interface object. |
| get_ApduLength | Retrieves the length of the APDU. |
| get_ApduReply | Retrieves the reply APDU. |
| put_ApduReply | Sets a new reply APDU. |
| get_ApduReplyLength | Retrieves the length of the reply APDU. |
| get_ClassId | Retrieves the class ID from the APDU. |
| put_ClassId | Sets a new class ID in the APDU. |
| get_Data | Retrieves the data field from the APDU. |
| put_Data | Sets or copies a given data field into the APDU. |
| Get_InstructionId | Retrieves the instruction ID byte from the APDU. |
| Put_InstructionId | Sets the given instruction ID byte in the APDU. |
| Get_P1 | Retrieves the first parameter byte from the APDU. |
| Put_P1 | Sets the first parameter byte in the APDU. |
| Get_P2 | Retrieves the second parameter byte from the APDU. |
| Put_P2 | Sets the second parameter byte in the APDU. |
| Get_P3 | Retrieves the third parameter byte from the APDU. |
| get_ReplyStatus | Retrieves the reply APDU's message status word. |
| put_ReplyStatus | Sets a new reply APDU's message status word. |
| get_ReplyStatusSW1 | Retrieves the reply APDU's message SW1 status byte. |
| get_ReplyStatusSW2 | Retrieves the reply APDU's message SW2 status byte. |
| BuildCmd | Constructs a valid command APDU for transmission to a smart card. |
| Clear | Clear the APDU and the reply APDU message buffers. |
| Encapsulate | Encapsulate the given command APDU into another command APDU for transmission to a smart card. |