コード例 #1
0
ファイル: service.py プロジェクト: vinnamkim/rclpy
    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
ファイル: service.py プロジェクト: sousou1/rclpy
    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
ファイル: service.py プロジェクト: ros2/rclpy
 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)