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

Class ErrorChecker

source code


Base class for status word error checking strategies.

Error checking strategies are chained into an ErrorCheckingChain to implement a Chain of Responsibility. Each strategy in the chain is called until an error is detected. The strategy raises a smartcard.sw.SWException exception when an error is detected.

Implementation derived from Bruce Eckel, Thinking in Python. The ErrorCheckingChain implements the Chain Of Responsibility design pattern.

Instance Methods [hide private]
 
__call__(data, sw1, sw2)
Called to test data, sw1 and sw2 for error.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__call__(data, sw1, sw2)
(Call operator)

source code 

Called to test data, sw1 and sw2 for error.

Parameters:
  • data - apdu response data
  • sw1, sw2 - apdu data status words

    Derived classes must raise a smartcard.sw.SWException upon error.