class Orocos::SendHandle

OperationHandle instances represent asynchronous operation calls. They are returned by Orocos::Operation#sendop and Orocos::TaskContext#sendop

Attributes

orocos_return_types[R]
return_values[R]

Public Instance Methods

collect() click to toggle source

Waits for the operation to finish and returns both its completion status and, if applicable, its return value(s)

Existing completion status are

Orocos::SEND_SUCCESS
Orocos::SEND_NOT_READY
Orocos::SEND_FAILURE
# File lib/orocos/operations.rb, line 16
def collect
    CORBA.refine_exceptions(self) do
        status = do_operation_collect(orocos_return_types, return_values)
        if return_values.empty?
            return status
        else
            return [status, *return_values]
        end
    end
end
collect_if_done() click to toggle source

Returns the current status for the operation

If the operation is finished, and if it has a return value, then it returns

Orocos::SEND_SUCCESS, return_value1, return_value2, ...

Otherwise, returns either Orocos::SEND_NOT_READY (not yet processed) or Orocos::SEND_FAILURE (operation failed to be processed on the remote task)

# File lib/orocos/operations.rb, line 37
def collect_if_done
    CORBA.refine_exceptions(self) do
        status = do_operation_collect_if_done(orocos_return_types, return_values)
        if return_values.empty?
            return status
        else
            return [status, *return_values]
        end
    end
end