def parseFeatureRequest(response):
    """ Get the list of Part10 features supported by the reader.

    @param response: result of CM_IOCTL_GET_FEATURE_REQUEST commmand

    @rtype: list
    @return: a list of list [[tag1, value1], [tag2, value2]]
    """
    features = []
    while (len(response) > 0):
        tag = response[0]
        control = ((((((response[2] << 8) +
                        response[3]) << 8) +
                        response[4]) << 8) +
                        response[5])
        try:
            features.append([Features[tag], control])
        except KeyError:
            pass
        del response[:6]
    return features
def parseFeatureRequest ( response ) : features = [ ] while ( len ( response ) > 0 ) : tag = response [ 0 ] control = ( ( ( ( ( ( response [ 2 ] << 8 ) + response [ 3 ] ) << 8 ) + response [ 4 ] ) << 8 ) + response [ 5 ] ) try : features . append ( [ Features [ tag ] , control ] ) except KeyError : pass del response [ : 6 ] return features
Get the list of Part10 features supported by the reader.

    @param response: result of CM_IOCTL_GET_FEATURE_REQUEST commmand

    @rtype: list
    @return: a list of list [[tag1, value1], [tag2, value2]]