Пример #1
0
    def send_response(self, response: SrvTypeResponse, header) -> None:
        """
        Send a service response.

        :param response: The service response.
        :param header: Capsule pointing to the service header from the original request.
        """
        _rclpy.rclpy_send_response(self.service_handle, response, header)
Пример #2
0
    def send_response(self, response: SrvTypeResponse, header):
        """
        Send a service response.

        :param response: The service response.
        :param header: Capsule pointing to the service header from the original request.
        :raises: TypeError if the type of the passed response isn't an instance
          of the Response type of the provided service when the service was
          constructed.
        """
        if not isinstance(response, self.srv_type.Response):
            raise TypeError()
        with self.handle as capsule:
            _rclpy.rclpy_send_response(capsule, response, header)
Пример #3
0
 def send_response(self, response, header):
     _rclpy.rclpy_send_response(self.service_handle, response, header)
Пример #4
0
 def send_response(self, response, header):
     _rclpy.rclpy_send_response(self.service_handle, response, header)