Package smartcard :: Module ExclusiveTransmitCardConnection :: Class ExclusiveTransmitCardConnection
[hide private]
[frames] | no frames]

Class ExclusiveTransmitCardConnection

source code


This decorator uses SCardBeginTransaction/SCardEndTransaction to preserve other processes of threads to access the card during transmit().

Instance Methods [hide private]
 
__init__(self, cardconnection)
Construct a new card connection decorator.
source code
 
lock(self)
Lock card with SCardBeginTransaction.
source code
 
unlock(self)
Unlock card with SCardEndTransaction.
source code
 
transmit(self, bytes, protocol=None)
Gain exclusive access to card during APDU transmission for if this decorator decorates a PCSCCardConnection.
source code

Inherited from CardConnectionDecorator.CardConnectionDecorator: addObserver, addSWExceptionToFilter, connect, control, deleteObserver, disconnect, getATR, getAttrib, getProtocol, getReader, setErrorCheckingChain, setProtocol

Inherited from CardConnection.CardConnection: __del__, __enter__, __exit__, doControl, doGetAttrib, doTransmit

Inherited from Observer.Observable: clearChanged, countObservers, deleteObservers, hasChanged, notifyObservers, setChanged

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from CardConnection.CardConnection: RAW_protocol, T0_protocol, T15_protocol, T1_protocol

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, cardconnection)
(Constructor)

source code 

Construct a new card connection decorator.

CardConnectionComponent: CardConnection component to decorate

Parameters:
  • reader - name of the reader in which the smartcard to connect to is located.
Overrides: object.__init__
(inherited documentation)

transmit(self, bytes, protocol=None)

source code 

Gain exclusive access to card during APDU transmission for if this decorator decorates a PCSCCardConnection.

Parameters:
  • bytes - list of bytes to transmit
  • protocol - the transmission protocol, from CardConnection.T0_protocol, CardConnection.T1_protocol, or CardConnection.RAW_protocol
Overrides: CardConnection.CardConnection.transmit