Orocos Real-Time Toolkit
2.5.0
|
Implements call, send, collect, collectIfDone for all function arities. More...
#include <rtt/internal/LocalOperationCaller.hpp>
Public Types | |
typedef FunctionT | Signature |
typedef boost::function_traits < Signature >::result_type | result_type |
typedef boost::function_traits < Signature >::result_type | result_reference |
typedef boost::function_traits < Signature > | traits |
typedef boost::shared_ptr < LocalOperationCallerImpl > | shared_ptr |
Use this type for shared pointer storage of an OperationCallerInterface object. | |
Public Member Functions | |
virtual bool | ready () const |
Available such that implementations have a way to expose their ready-ness, ie being able to do the call. | |
virtual void | setExecutor (ExecutionEngine *ee) |
Set an executor which will execute this method when it is called or sent. | |
virtual void | setCaller (ExecutionEngine *ee) |
Sets the caller's engine of this operation. | |
virtual bool | setThread (ExecutionThread et, ExecutionEngine *executor) |
Sets the Thread execution policy of this object. | |
void | executeAndDispose () |
Execute functionality and free this object. | |
void | dispose () |
As long as dispose (or executeAndDispose() ) is not called, this object will not be destroyed. | |
ExecutionEngine * | getMessageProcessor () const |
SendHandle< Signature > | do_send (shared_ptr cl) |
SendHandle< Signature > | send_impl () |
template<class T1 > | |
SendHandle< Signature > | send_impl (T1 a1) |
template<class T1 , class T2 > | |
SendHandle< Signature > | send_impl (T1 a1, T2 a2) |
template<class T1 , class T2 , class T3 > | |
SendHandle< Signature > | send_impl (T1 a1, T2 a2, T3 a3) |
template<class T1 , class T2 , class T3 , class T4 > | |
SendHandle< Signature > | send_impl (T1 a1, T2 a2, T3 a3, T4 a4) |
template<class T1 , class T2 , class T3 , class T4 , class T5 > | |
SendHandle< Signature > | send_impl (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) |
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 > | |
SendHandle< Signature > | send_impl (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6) |
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 > | |
SendHandle< Signature > | send_impl (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7) |
SendStatus | collectIfDone_impl () |
template<class T1 > | |
SendStatus | collectIfDone_impl (T1 &a1) |
template<class T1 , class T2 > | |
SendStatus | collectIfDone_impl (T1 &a1, T2 &a2) |
template<class T1 , class T2 , class T3 > | |
SendStatus | collectIfDone_impl (T1 &a1, T2 &a2, T3 &a3) |
template<class T1 , class T2 , class T3 , class T4 > | |
SendStatus | collectIfDone_impl (T1 &a1, T2 &a2, T3 &a3, T4 &a4) |
template<class T1 , class T2 , class T3 , class T4 , class T5 > | |
SendStatus | collectIfDone_impl (T1 &a1, T2 &a2, T3 &a3, T4 &a4, T5 &a5) |
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 > | |
SendStatus | collectIfDone_impl (T1 &a1, T2 &a2, T3 &a3, T4 &a4, T5 &a5, T6 &a6) |
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 > | |
SendStatus | collectIfDone_impl (T1 &a1, T2 &a2, T3 &a3, T4 &a4, T5 &a5, T6 &a6, T7 &a7) |
SendStatus | collect_impl () |
template<class T1 > | |
SendStatus | collect_impl (T1 &a1) |
template<class T1 , class T2 > | |
SendStatus | collect_impl (T1 &a1, T2 &a2) |
template<class T1 , class T2 , class T3 > | |
SendStatus | collect_impl (T1 &a1, T2 &a2, T3 &a3) |
result_type | call_impl () |
Invoke this operator if the method has no arguments. | |
template<class T1 > | |
result_type | call_impl (T1 a1) |
Invoke this operator if the method has one argument. | |
template<class T1 , class T2 > | |
result_type | call_impl (T1 a1, T2 a2) |
template<class T1 , class T2 , class T3 > | |
result_type | call_impl (T1 a1, T2 a2, T3 a3) |
template<class T1 , class T2 , class T3 , class T4 > | |
result_type | call_impl (T1 a1, T2 a2, T3 a3, T4 a4) |
template<class T1 , class T2 , class T3 , class T4 , class T5 > | |
result_type | call_impl (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) |
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 > | |
result_type | call_impl (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6) |
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 > | |
result_type | call_impl (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7) |
result_type | ret_impl () |
template<class T1 > | |
result_type | ret_impl (T1 a1) |
This function has the same signature of call() and returns the stored return value, and tries to return all arguments. | |
template<class T1 , class T2 > | |
result_type | ret_impl (T1 a1, T2 a2) |
template<class T1 , class T2 , class T3 > | |
result_type | ret_impl (T1 a1, T2 a2, T3 a3) |
template<class T1 , class T2 , class T3 , class T4 > | |
result_type | ret_impl (T1 a1, T2 a2, T3 a3, T4 a4) |
template<class T1 , class T2 , class T3 , class T4 , class T5 > | |
result_type | ret_impl (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) |
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 > | |
result_type | ret_impl (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6) |
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 > | |
result_type | ret_impl (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7) |
virtual shared_ptr | cloneRT () const =0 |
virtual OperationCallerBase < FunctionT > * | cloneI (ExecutionEngine *caller) const =0 |
Creates a new clone of this method using operator new(). | |
Protected Types | |
typedef BindStorage< FunctionT > | Store |
Protected Attributes | |
ExecutionEngine * | myengine |
ExecutionEngine * | caller |
ExecutionThread | met |
base::OperationCallerBase < FunctionT >::shared_ptr | self |
Used to refcount self as long as dispose() is not called. |
Implements call, send, collect, collectIfDone for all function arities.
You can pass arguments by (const) value and by (const) reference. Passing pointers is 'accidentally' supported in-process, it will not work with out-of-process calls. The send takes all arguments (C++ doesn't know pure out args), the collect() only takes the return value and the 'reference' arguments (if any)
If this object is disposed, the collection of results is no longer possible and this will generate a SendFailure at caller side.
Definition at line 78 of file LocalOperationCaller.hpp.
virtual OperationCallerBase<FunctionT >* RTT::base::OperationCallerBase< FunctionT >::cloneI | ( | ExecutionEngine * | caller | ) | const [pure virtual, inherited] |
Creates a new clone of this method using operator new().
caller | The ExecutionEngine of the task that wishes to call this method. |
void RTT::internal::LocalOperationCallerImpl< FunctionT >::executeAndDispose | ( | ) | [inline, virtual] |
Execute functionality and free this object.
You may no longer use this object after calling this method.
Implements RTT::base::DisposableInterface.
Definition at line 116 of file LocalOperationCaller.hpp.
References RTT::internal::LocalOperationCallerImpl< FunctionT >::dispose(), and RTT::ExecutionEngine::process().
virtual void RTT::internal::LocalOperationCallerImpl< FunctionT >::setCaller | ( | ExecutionEngine * | ee | ) | [inline, virtual] |
Sets the caller's engine of this operation.
This object will be used to test if asynchronous messaging is required.
ee | The ExecutionEngine of the component that is calling this operation. |
Implements RTT::base::OperationCallerInterface.
Definition at line 103 of file LocalOperationCaller.hpp.
virtual void RTT::internal::LocalOperationCallerImpl< FunctionT >::setExecutor | ( | ExecutionEngine * | ee | ) | [inline, virtual] |
Set an executor which will execute this method when it is called or sent.
If ee is set to 0, the method will be executed in the client's thread or the GlobalExecutionEngine.
ee | The ExecutionEngine of the component that is executing this operation. |
Implements RTT::base::OperationCallerInterface.
Definition at line 96 of file LocalOperationCaller.hpp.
Referenced by RTT::internal::LocalOperationCallerImpl< FunctionT >::setThread().
virtual bool RTT::internal::LocalOperationCallerImpl< FunctionT >::setThread | ( | ExecutionThread | et, |
ExecutionEngine * | executor | ||
) | [inline, virtual] |
Sets the Thread execution policy of this object.
et | OwnThread or ClientThread. |
executor | The engine of the component owning this operation. In case it is not yet owned by a component, executor may be null. |
Implements RTT::base::OperationCallerInterface.
Definition at line 110 of file LocalOperationCaller.hpp.
References RTT::internal::LocalOperationCallerImpl< FunctionT >::setExecutor().
base::OperationCallerBase<FunctionT>::shared_ptr RTT::internal::LocalOperationCallerImpl< FunctionT >::self [protected] |
Used to refcount self as long as dispose() is not called.
This refcount is real-time since both shared_ptr and object were allocated with the rt_allocator class.
Definition at line 593 of file LocalOperationCaller.hpp.