Orocos Real-Time Toolkit
2.9.0
|
The interface class for operation callers. More...
#include <rtt/base/OperationCallerInterface.hpp>
Public Types | |
typedef boost::shared_ptr< OperationCallerInterface > | shared_ptr |
Use this type for shared pointer storage of an OperationCallerInterface object. More... | |
Public Member Functions | |
OperationCallerInterface () | |
Initializes an empty OperationCallerInterface with owner, executor and caller set to zero and the ExecutionThread type to ClientThread. More... | |
OperationCallerInterface (OperationCallerInterface const &orig) | |
virtual | ~OperationCallerInterface () |
virtual bool | ready () const =0 |
Available such that implementations have a way to expose their ready-ness, ie being able to do the call. More... | |
virtual void | setOwner (ExecutionEngine *ee) |
Set the ExecutionEngine of the task which owns this method. More... | |
virtual void | setCaller (ExecutionEngine *ee) |
Sets the caller's engine of this operation. More... | |
bool | setThread (ExecutionThread et, ExecutionEngine *executor) |
Sets the Thread execution policy of this object. More... | |
ExecutionThread | getThread () const |
void | reportError () |
Executed when the operation execution resulted in a C++ exception. More... | |
bool | isSend () |
Helpful function to tell us if this operations is to be sent or not. More... | |
ExecutionEngine * | getMessageProcessor () const |
virtual void | executeAndDispose ()=0 |
Execute functionality and free this object. More... | |
virtual void | dispose ()=0 |
Just free this object without executing it. More... | |
Protected Attributes | |
ExecutionEngine * | myengine |
ExecutionEngine * | caller |
ExecutionThread | met |
The interface class for operation callers.
Definition at line 15 of file OperationCallerInterface.hpp.
typedef boost::shared_ptr<OperationCallerInterface> RTT::base::OperationCallerInterface::shared_ptr |
Use this type for shared pointer storage of an OperationCallerInterface object.
Definition at line 21 of file OperationCallerInterface.hpp.
OperationCallerInterface::OperationCallerInterface | ( | ) |
Initializes an empty OperationCallerInterface with owner, executor and caller set to zero and the ExecutionThread type to ClientThread.
Definition at line 8 of file OperationCallerInterface.cpp.
OperationCallerInterface::OperationCallerInterface | ( | OperationCallerInterface const & | orig | ) |
Definition at line 12 of file OperationCallerInterface.cpp.
|
virtual |
Definition at line 16 of file OperationCallerInterface.cpp.
|
pure virtualinherited |
Just free this object without executing it.
Implemented in RTT::internal::FusedMSignal< Signature >, RTT::scripting::CallFunction, RTT::RemoveMsg, RTT::internal::LocalOperationCallerImpl< FunctionT >, and RTT::internal::RemoteOperationCallerImpl< OperationCallerT >.
Referenced by RTT::ExecutionEngine::~ExecutionEngine().
|
pure virtualinherited |
Execute functionality and free this object.
You may no longer use this object after calling this method.
Implemented in RTT::internal::FusedMSignal< Signature >, RTT::scripting::CallFunction, RTT::RemoveMsg, RTT::internal::LocalOperationCallerImpl< FunctionT >, and RTT::internal::RemoteOperationCallerImpl< OperationCallerT >.
Referenced by RTT::ExecutionEngine::processMessages().
ExecutionEngine * OperationCallerInterface::getMessageProcessor | ( | ) | const |
Definition at line 42 of file OperationCallerInterface.cpp.
References RTT::internal::GlobalEngine::Instance(), met, myengine, and RTT::OwnThread.
Referenced by RTT::internal::LocalOperationCallerImpl< FunctionT >::do_send().
|
inline |
Definition at line 67 of file OperationCallerInterface.hpp.
bool OperationCallerInterface::isSend | ( | ) |
Helpful function to tell us if this operations is to be sent or not.
Sending is only required if the operation is OwnThread and in a different thread than the caller.
Definition at line 34 of file OperationCallerInterface.cpp.
References RTT::ClientThread, RTT::ExecutionEngine::isSelf(), met, and myengine.
Referenced by RTT::internal::LocalOperationCallerImpl< FunctionT >::call_impl().
|
pure virtual |
Available such that implementations have a way to expose their ready-ness, ie being able to do the call.
Implemented in RTT::internal::LocalOperationCallerImpl< FunctionT >.
void OperationCallerInterface::reportError | ( | ) |
Executed when the operation execution resulted in a C++ exception.
Must report the error to the ExecutionEngine of the owner of this operation.
Definition at line 52 of file OperationCallerInterface.cpp.
References myengine, and RTT::ExecutionEngine::setExceptionTask().
Referenced by RTT::internal::FusedMCallDataSource< Signature >::evaluate(), and RTT::internal::LocalOperationCallerImpl< FunctionT >::executeAndDispose().
|
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. |
Definition at line 24 of file OperationCallerInterface.cpp.
References caller.
Referenced by RTT::internal::LocalOperationCaller< bool(std::string) >::LocalOperationCaller(), RTT::internal::RemoteOperationCaller< OperationCallerT >::RemoteOperationCaller(), and RTT::internal::RemoteOperationCaller< OperationCallerT >::setCaller().
|
virtual |
Set the ExecutionEngine of the task which owns this method.
ee | The ExecutionEngine of the component that owns this operation. |
Definition at line 20 of file OperationCallerInterface.cpp.
References myengine.
Referenced by RTT::internal::LocalOperationCaller< bool(std::string) >::LocalOperationCaller(), and setThread().
bool OperationCallerInterface::setThread | ( | ExecutionThread | et, |
ExecutionEngine * | executor | ||
) |
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. |
Definition at line 28 of file OperationCallerInterface.cpp.
References met, and setOwner().
Referenced by RTT::internal::LocalOperationCaller< bool(std::string) >::LocalOperationCaller(), and RTT::Service::setOperationThread().
|
protected |
Definition at line 87 of file OperationCallerInterface.hpp.
Referenced by RTT::internal::LocalOperationCallerImpl< FunctionT >::checkCaller(), RTT::internal::RemoteOperationCaller< OperationCallerT >::cloneI(), RTT::internal::LocalOperationCallerImpl< FunctionT >::collect_impl(), RTT::internal::LocalOperationCallerImpl< FunctionT >::executeAndDispose(), RTT::internal::RemoteOperationCaller< OperationCallerT >::RemoteOperationCaller(), setCaller(), and RTT::base::OperationCallerBase< FunctionT >::~OperationCallerBase().
|
protected |
Definition at line 88 of file OperationCallerInterface.hpp.
Referenced by getMessageProcessor(), isSend(), and setThread().
|
protected |
Definition at line 86 of file OperationCallerInterface.hpp.
Referenced by getMessageProcessor(), isSend(), reportError(), and setOwner().