Orocos Real-Time Toolkit  2.9.0
Public Types | Public Member Functions | Protected Attributes | List of all members
RTT::base::OperationCallerInterface Struct Referenceabstract

The interface class for operation callers. More...

#include <rtt/base/OperationCallerInterface.hpp>

Inheritance diagram for RTT::base::OperationCallerInterface:
RTT::base::DisposableInterface RTT::base::OperationCallerBase< FunctionT > RTT::base::OperationCallerBase< OperationCallerT > RTT::base::OperationCallerBase< Signature > RTT::base::OperationCallerBase< F > RTT::internal::LocalOperationCallerImpl< FunctionT > RTT::internal::RemoteOperationCallerImpl< OperationCallerT >

Public Types

typedef boost::shared_ptr< OperationCallerInterfaceshared_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...
 
ExecutionEnginegetMessageProcessor () 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

ExecutionEnginemyengine
 
ExecutionEnginecaller
 
ExecutionThread met
 

Detailed Description

The interface class for operation callers.

Definition at line 15 of file OperationCallerInterface.hpp.

Member Typedef Documentation

Use this type for shared pointer storage of an OperationCallerInterface object.

Definition at line 21 of file OperationCallerInterface.hpp.

Constructor & Destructor Documentation

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.

OperationCallerInterface::~OperationCallerInterface ( )
virtual

Definition at line 16 of file OperationCallerInterface.cpp.

Member Function Documentation

virtual void RTT::base::DisposableInterface::dispose ( )
pure virtualinherited
virtual void RTT::base::DisposableInterface::executeAndDispose ( )
pure virtualinherited
ExecutionEngine * OperationCallerInterface::getMessageProcessor ( ) const
ExecutionThread RTT::base::OperationCallerInterface::getThread ( ) const
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().

virtual bool RTT::base::OperationCallerInterface::ready ( ) const
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().

void OperationCallerInterface::setCaller ( ExecutionEngine ee)
virtual

Sets the caller's engine of this operation.

This object will be used to test if asynchronous messaging is required.

Parameters
eeThe 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().

void OperationCallerInterface::setOwner ( ExecutionEngine ee)
virtual

Set the ExecutionEngine of the task which owns this method.

Parameters
eeThe 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.

Parameters
etOwnThread or ClientThread.
executorThe engine of the component owning this operation. In case it is not yet owned by a component, executor may be null.
Returns
false if it may not be modified.

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().

Member Data Documentation

ExecutionEngine* RTT::base::OperationCallerInterface::caller
protected
ExecutionThread RTT::base::OperationCallerInterface::met
protected

Definition at line 88 of file OperationCallerInterface.hpp.

Referenced by getMessageProcessor(), isSend(), and setThread().

ExecutionEngine* RTT::base::OperationCallerInterface::myengine
protected

Definition at line 86 of file OperationCallerInterface.hpp.

Referenced by getMessageProcessor(), isSend(), reportError(), and setOwner().


The documentation for this struct was generated from the following files: