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
do_operation_collect(p1, p2)
click to toggle source
static VALUE send_handle_collect(VALUE handle_, VALUE result_type_names, VALUE results)
{
RSendHandle& handle = get_wrapped<RSendHandle>(handle_);
CAnyArguments_var corba_result = new CAnyArguments;
CSendStatus ss = corba_blocking_fct_call_with_result(boost::bind(&_objref_CSendHandle::collect,
(CSendHandle_ptr)handle.handle,(CAnyArguments_out)corba_result));
if (ss == RTT::corba::CSendSuccess)
corba_args_to_ruby(result_type_names, results, corba_result);
return INT2FIX(ss);
}
do_operation_collect_if_done(p1, p2)
click to toggle source
static VALUE send_handle_collect_if_done(VALUE handle_, VALUE result_type_names, VALUE results)
{
RSendHandle& handle = get_wrapped<RSendHandle>(handle_);
CAnyArguments_var corba_result = new CAnyArguments;
CSendStatus ss = corba_blocking_fct_call_with_result(boost::bind(&_objref_CSendHandle::collectIfDone,
(CSendHandle_ptr)handle.handle,(CAnyArguments_out)corba_result));
if (ss == RTT::corba::CSendSuccess)
corba_args_to_ruby(result_type_names, results, corba_result);
return INT2FIX(ss);
}