Orocos Real-Time Toolkit  2.8.3
OperationCallerInterface.cpp
Go to the documentation of this file.
2 #include "../internal/GlobalEngine.hpp"
3 
4 using namespace RTT;
5 using namespace base;
6 using namespace internal;
7 
9  : myengine(0), caller(0), met(ClientThread)
10 {}
11 
13  : myengine(orig.myengine), caller(orig.caller), met(orig.met)
14 {}
15 
17 {
18 }
19 
21  myengine = ee;
22 }
23 
25  caller = ee;
26 }
27 
29  met = et;
30  setOwner(executor);
31  return true;
32 }
33 
35 {
37  if (ret == 0 )
38  return GlobalEngine::Instance(); // best-effort for Operations not tied to an EE
39  return ret;
40 }
41 
42 
43 // report an error if an exception was thrown while calling exec()
45  // This localOperation was added to a TaskContext or to a Service owned by a TaskContext
46  if (this->myengine != 0)
47  this->myengine->setExceptionTask();
48 }
49 
The interface class for operation callers.
bool setThread(ExecutionThread et, ExecutionEngine *executor)
Sets the Thread execution policy of this object.
virtual void setCaller(ExecutionEngine *ee)
Sets the caller's engine of this operation.
void reportError()
Executed when the operation execution resulted in a C++ exception.
An execution engine serialises (executes one after the other) the execution of all commands...
OperationCallerInterface()
Initializes an empty OperationCallerInterface with owner, executor and caller set to zero and the Exe...
virtual void setOwner(ExecutionEngine *ee)
Set the ExecutionEngine of the task which owns this method.
static RTT_API ExecutionEngine * Instance()
This is an overloaded member function, provided for convenience. It differs from the above function o...
ExecutionEngine * getMessageProcessor() const
void setExceptionTask()
Set the 'owner' task in the exception state.
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
Definition: Activity.cpp:51
ExecutionThread
Users can choose if an operation's function is executed in the component's thread (OwnThread) or in t...