Orocos Real-Time Toolkit
2.5.0
|
A template-less manager for OperationCaller calls. More...
#include <rtt/internal/OperationCallerC.hpp>
Public Member Functions | |
OperationCallerC () | |
The default constructor. | |
OperationCallerC (OperationInterfacePart *mr, const std::string &name, ExecutionEngine *caller) | |
The constructor. | |
OperationCallerC (const OperationCallerC &other) | |
A OperationCallerC is copyable by value. | |
OperationCallerC & | operator= (const OperationCallerC &other) |
A OperationCallerC is assignable. | |
OperationCallerC & | arg (base::DataSourceBase::shared_ptr a) |
Add a datasource argument to the OperationCaller. | |
template<class ArgT > | |
OperationCallerC & | argC (const ArgT a) |
Add a constant argument to the OperationCaller. | |
template<class ArgT > | |
OperationCallerC & | arg (ArgT &a) |
Add an argument by reference to the OperationCaller. | |
OperationCallerC & | ret (base::AttributeBase *r) |
Store the result of the method in a task's attribute. | |
OperationCallerC & | ret (base::DataSourceBase::shared_ptr r) |
Store the result of the method in a DataSource. | |
template<class RetT > | |
OperationCallerC & | ret (RetT &r) |
Store the result of the method in variable. | |
bool | call () |
Call the contained method. | |
SendHandleC | send () |
Send the contained method. | |
void | check () |
Checks if this method is ready for calling, will throw if not so. | |
bool | ready () const |
Returns true if this method is ready for execution. | |
OperationInterfacePart * | getOrp () const |
Returns the factory which we use to produce the operation call. | |
std::string const & | getName () const |
Returns the name of the operation that will be called. | |
base::DataSourceBase::shared_ptr | getCallDataSource () |
Get the contained data source for 'call'. | |
base::DataSourceBase::shared_ptr | getSendDataSource () |
Get the contained data source for 'send'. | |
base::DataSourceBase::shared_ptr | getSendHandleDataSource () |
Get the contained data source for send handle. |
A template-less manager for OperationCaller calls.
Definition at line 55 of file OperationCallerC.hpp.
The default constructor.
Make a copy from another OperationCallerC object in order to make it usable.
RTT::internal::OperationCallerC::OperationCallerC | ( | OperationInterfacePart * | mr, |
const std::string & | name, | ||
ExecutionEngine * | caller | ||
) |
The constructor.
Add a datasource argument to the OperationCaller.
a | A DataSource which contents are consulted each time when call() is called. |
OperationCallerC& RTT::internal::OperationCallerC::arg | ( | ArgT & | a | ) | [inline] |
Add an argument by reference to the OperationCaller.
a | A value of which the reference is used and re-read each time the method is called. Thus if the contents of the source of a changes, call() will use the new contents. |
Definition at line 118 of file OperationCallerC.hpp.
OperationCallerC& RTT::internal::OperationCallerC::argC | ( | const ArgT | a | ) | [inline] |
Add a constant argument to the OperationCaller.
a | A value of which a copy is made and this value is used each time in call(). |
Definition at line 106 of file OperationCallerC.hpp.
Checks if this method is ready for calling, will throw if not so.
Otherwise, does nothing.
Store the result of the method in a task's attribute.
r | A task attribute in which the result is stored. |
Store the result of the method in a DataSource.
r | A data source in which the result is stored. |
OperationCallerC& RTT::internal::OperationCallerC::ret | ( | RetT & | r | ) | [inline] |
Store the result of the method in variable.
r | A reference to the variable in which the result is stored. |
Definition at line 140 of file OperationCallerC.hpp.
Send the contained method.
The returned SendHandleC is properly constructed, but still requires the .arg() arguments. The arguments to provide are the ones that collect requires for the sent operation. Once they have been added to the SendHandleC, you can collect() on that object.