def create_diagnostic_request(self, message_id, mode, bus=None, pid=None,
            frequency=None, payload=None, wait_for_ack=True,
            wait_for_first_response=False, decoded_type=None):
        """Send a new diagnostic message request to the VI

        Required:

        message_id - The message ID (arbitration ID) for the request.
        mode - the diagnostic mode (or service).

        Optional:

        bus - The address of the CAN bus controller to send the request, either
            1 or 2 for current VI hardware.
        pid - The parameter ID, or PID, for the request (e.g. for a mode 1
            request).
        frequency - The frequency in hertz to add this as a recurring diagnostic
            requests. Must be greater than 0, or None if it is a one-time
            request.
        payload - A bytearray to send as the request's optional payload. Only
            single frame diagnostic requests are supported by the VI firmware in
            the current version, so the payload has a maximum length of 6.
        wait_for_ack - If True, will wait for an ACK of the command message.
        wait_for_first_response - If True, this function will block waiting for
            a diagnostic response to be received for the request. It will return
            either after timing out or after 1 matching response is received -
            there may be more responses to functional broadcast requests that
            arrive after returning.

        Returns a tuple of
            ([list of ACK responses to create request],
                [list of diagnostic responses received])

        """

        request = self._build_diagnostic_request(message_id, mode, bus, pid,
                frequency, payload, decoded_type)

        diag_response_receiver = None
        if wait_for_first_response:
            diag_response_receiver = self._prepare_response_receiver(
                    request, DiagnosticResponseReceiver)

        request['action'] = 'add'
        ack_responses = self.complex_request(request, wait_for_ack)

        diag_responses = None
        if diag_response_receiver is not None:
            diag_responses = diag_response_receiver.wait_for_responses()

        return ack_responses, diag_responses
Send a new diagnostic message request to the VI

        Required:

        message_id - The message ID (arbitration ID) for the request.
        mode - the diagnostic mode (or service).

        Optional:

        bus - The address of the CAN bus controller to send the request, either
            1 or 2 for current VI hardware.
        pid - The parameter ID, or PID, for the request (e.g. for a mode 1
            request).
        frequency - The frequency in hertz to add this as a recurring diagnostic
            requests. Must be greater than 0, or None if it is a one-time
            request.
        payload - A bytearray to send as the request's optional payload. Only
            single frame diagnostic requests are supported by the VI firmware in
            the current version, so the payload has a maximum length of 6.
        wait_for_ack - If True, will wait for an ACK of the command message.
        wait_for_first_response - If True, this function will block waiting for
            a diagnostic response to be received for the request. It will return
            either after timing out or after 1 matching response is received -
            there may be more responses to functional broadcast requests that
            arrive after returning.

        Returns a tuple of
            ([list of ACK responses to create request],
                [list of diagnostic responses received])