Terminal functions

terminal(readerName=None)

Open the terminal using its name. If no terminal name is entered, we use the first ‘available’ reader found in the registry

Parameters:readerName (str) – the name of the terminal to open.
Returns:a dict mapping error codes with error status ERROR_STATUS_SUCCESS if no error occurs, error code and error message otherwise.
# error_status dict
{   error_status['errorStatus']  = ERROR_STATUS_FAILURE
    error_status['errorCode']    = 0x80301000
    error_status['errorMessage'] = "A APDU command can't be recognized as a valid T=0 protocol Case 1-4 ISO7816-4 APDU"
}
Raises:ValueError – if illegal parameter combination is supplied.
close()

Close the current selected terminal.

Returns:a dict mapping error codes with error status ERROR_STATUS_SUCCESS if no error occurs, error code and error message otherwise.
# error_status dict
{   error_status['errorStatus']  = ERROR_STATUS_FAILURE
    error_status['errorCode']    = 0x80301000
    error_status['errorMessage'] = "A APDU command can't be recognized as a valid T=0 protocol Case 1-4 ISO7816-4 APDU"
}