| Home | Trees | Indices | Help |
|
|---|
|
|
Card connection abstract class.
Known subclasses: smartcard.pcsc.PCSCCardConnection
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
T0_protocol = 1
|
|||
T1_protocol = 2
|
|||
RAW_protocol = 65536
|
|||
T15_protocol = 8
|
|||
|
|||
Construct a new card connection. readerName: name of the reader in which the smartcard to connect to is located.
|
Add a status word exception class to be filtered. exClass: the class to filter, e.g. smartcard.sw.SWException.WarningProcessingException Filtered exceptions will not be raised when encountered in the error checking chain. |
Add a CardConnection observer.
|
Remove a CardConnection observer.
|
Connect to card. protocol: a bit mask of the protocols to use, from CardConnection.T0_protocol, CardConnection.T1_protocol, CardConnection.RAW_protocol, CardConnection.T15_protocol mode: passed as-is to the PC/SC layer |
Return bit mask for the protocol of connection, or None if no protocol set. The return value is a bit mask of CardConnection.T0_protocol, CardConnection.T1_protocol, CardConnection.RAW_protocol, CardConnection.T15_protocol |
Add an error checking chain. errorcheckingchain: a smartcard.sw.ErrorCheckingChain object The error checking strategies in errorchecking chain will be tested with each received response APDU, and a smartcard.sw.SWException.SWException will be raised upon error. |
Set protocol for card connection. protocol: a bit mask of CardConnection.T0_protocol, CardConnection.T1_protocol, CardConnection.RAW_protocol, CardConnection.T15_protocol e.g. setProtocol(CardConnection.T1_protocol | CardConnection.T0_protocol) |
Transmit an apdu. Internally calls doTransmit() class method
and notify observers upon command/response APDU events.
Subclasses must override the doTransmit() class method.
bytes: list of bytes to transmit
protocol: the transmission protocol, from
CardConnection.T0_protocol,
CardConnection.T1_protocol, or
CardConnection.RAW_protocol
|
Performs the command APDU transmission. Subclasses must override this method for implementing apdu transmission. |
Send a control command and buffer. Internally calls doControl() class method and notify observers upon command/response events. Subclasses must override the doControl() class method. controlCode: command code bytes: list of bytes to transmit |
Performs the command control. Subclasses must override this method for implementing control. |
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Sat Nov 22 15:23:52 2014 | http://epydoc.sourceforge.net |