def _get_parameter(self, name, tp, timeout=<NUM_LIT:1.0>, max_retries=<NUM_LIT:2>):
<EOL>if tp not in (bool, int, float):<EOL><INDENT>raise TypeError('<STR_LIT>'<EOL>+ str(tp))<EOL><DEDENT>response = self.driver.send_command(name, timeout=timeout,<EOL>immediate=True,<EOL>max_retries=max_retries)<EOL>if self.driver.command_error(response)or len(response[<NUM_LIT:4>]) == <NUM_LIT:0>or not response[<NUM_LIT:4>][<NUM_LIT:0>].startswith('<STR_LIT:*>' + name):<EOL><INDENT>raise CommandError('<STR_LIT>''<STR_LIT>'<EOL>+ name)<EOL><DEDENT>value_str = response[<NUM_LIT:4>][<NUM_LIT:0>][(len(name)+<NUM_LIT:1>):]<EOL>if tp == bool:<EOL><INDENT>return (value_str == '<STR_LIT:1>')<EOL><DEDENT>elif tp == int:<EOL><INDENT>return int(value_str)<EOL><DEDENT>elif tp == float:<EOL><INDENT>return float(value_str)<EOL><DEDENT>
Gets the specified drive parameter.

        Gets a parameter from the drive. Only supports ``bool``,
        ``int``, and ``float`` parameters.

        Parameters
        ----------
        name : str
            Name of the parameter to check. It is always the command to
            set it but without the value.
        tp : type {bool, int, float}
            The type of the parameter.
        timeout : number, optional
            Optional timeout in seconds to use when reading the
            response. A negative value or ``None`` indicates that the
            an infinite timeout should be used.
        max_retries : int, optional
            Maximum number of retries to do per command in the case of
            errors.

        Returns
        -------
        value : bool, int, or float
            The value of the specified parameter.

        Raises
        ------
        TypeError
            If 'tp' is not an allowed type (``bool``, ``int``,
            ``float``).
        CommandError
            If the command to retrieve the parameter returned an error.
        ValueError
            If the value returned to the drive cannot be converted to
            the proper type.

        See Also
        --------
        _set_parameter : Set a parameter.