Orocos Real-Time Toolkit
2.9.0
|
This class defines the interface for creating operation objects without using C++ templates. More...
#include <rtt/OperationInterfacePart.hpp>
Public Member Functions | |
virtual RTT_API | ~OperationInterfacePart () |
virtual std::string | getName () const =0 |
Returns the name of this operation. More... | |
virtual std::string | description () const =0 |
Returns the description of this operation. More... | |
virtual std::vector< ArgumentDescription > | getArgumentList () const =0 |
Get a description of the desired arguments in the ArgumentDescription format. More... | |
virtual std::string | resultType () const =0 |
Return the result (return) type of this operation. More... | |
virtual unsigned int | arity () const =0 |
Returns the arity (number of arguments) of this operation. More... | |
virtual const types::TypeInfo * | getArgumentType (unsigned int arg) const =0 |
Returns the type information of the n'th argument, with argument zero being the return value. More... | |
virtual unsigned int | collectArity () const =0 |
Returns the number of collectable arguments of this operation's function. More... | |
virtual const types::TypeInfo * | getCollectType (unsigned int arg) const =0 |
Returns the type information of the n'th collectable argument. More... | |
virtual base::DataSourceBase::shared_ptr | produce (const std::vector< base::DataSourceBase::shared_ptr > &args, ExecutionEngine *caller) const =0 |
Create a DataSource for a given callable operation. More... | |
virtual base::DataSourceBase::shared_ptr | produceSend (const std::vector< base::DataSourceBase::shared_ptr > &args, ExecutionEngine *caller) const =0 |
Create a DataSource for a given send operation. More... | |
virtual base::DataSourceBase::shared_ptr | produceHandle () const =0 |
Create an empty SendHandle object for this operation. More... | |
virtual base::DataSourceBase::shared_ptr | produceCollect (const std::vector< base::DataSourceBase::shared_ptr > &args, internal::DataSource< bool >::shared_ptr blocking) const =0 |
Create a DataSource for collecting the results of a Send. More... | |
virtual RTT_API boost::shared_ptr< base::DisposableInterface > | getLocalOperation () const |
Returns any local operation associated with this operation. More... | |
This class defines the interface for creating operation objects without using C++ templates.
The OperationInterface offers the same interface as this class, but with operation names as first argument of each function.
It is most used in conjunction with the OperationCallerC/SendHandleC classes to create objects that manage calling/sending methods and collecting results of method invocations.
A Part must be interpreted as one single operation of an OperationInterface.
This class serves as a base class for the template based classes that implement the produce and query logic for a given operation.
Definition at line 69 of file OperationInterfacePart.hpp.
|
virtual |
Definition at line 49 of file OperationInterface.cpp.
|
pure virtual |
Returns the arity (number of arguments) of this operation.
Implemented in RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >, RTT::internal::SynchronousOperationInterfacePartFused< Signature >, RTT::internal::OperationInterfacePartFused< Signature >, RTT::internal::OperationInterfacePartFused< bool(std::string)>, RTT::corba::CorbaOperationCallerFactory, and RTT::scripting::FunctionFactory.
Referenced by RTT::OperationCallerC::D::checkAndCreate(), RTT_corba_COperationInterface_i::checkOperation(), RTT_corba_COperationInterface_i::getArgumentType(), and RTT_corba_COperationInterface_i::getArity().
|
pure virtual |
Returns the number of collectable arguments of this operation's function.
These consist of the return value and the reference arguments.
Implemented in RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >, RTT::internal::SynchronousOperationInterfacePartFused< Signature >, RTT::internal::OperationInterfacePartFused< Signature >, RTT::internal::OperationInterfacePartFused< bool(std::string)>, RTT::corba::CorbaOperationCallerFactory, and RTT::scripting::FunctionFactory.
Referenced by RTT::SendHandleC::D::checkAndCreate(), RTT_corba_CSendHandle_i::checkArguments(), RTT_corba_COperationInterface_i::getCollectArity(), RTT_corba_COperationInterface_i::getCollectType(), RTT_corba_COperationInterface_i::getCollectTypes(), RTT_corba_COperationInterface_i::getOperations(), and RTT_corba_CSendHandle_i::RTT_corba_CSendHandle_i().
|
pure virtual |
Returns the description of this operation.
Implemented in RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >, RTT::internal::SynchronousOperationInterfacePartFused< Signature >, RTT::internal::OperationInterfacePartFused< Signature >, RTT::internal::OperationInterfacePartFused< bool(std::string)>, RTT::corba::CorbaOperationCallerFactory, and RTT::scripting::FunctionFactory.
Referenced by RTT_corba_COperationInterface_i::getDescription(), and RTT_corba_COperationInterface_i::getOperations().
|
pure virtual |
Get a description of the desired arguments in the ArgumentDescription format.
Implemented in RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >, RTT::internal::SynchronousOperationInterfacePartFused< Signature >, RTT::internal::OperationInterfacePartFused< Signature >, RTT::internal::OperationInterfacePartFused< bool(std::string)>, RTT::corba::CorbaOperationCallerFactory, and RTT::scripting::FunctionFactory.
Referenced by RTT_corba_COperationInterface_i::getArguments().
|
pure virtual |
Returns the type information of the n'th argument, with argument zero being the return value.
arg | 0: get return value type, 1..arity(): get n'th argument type. |
Implemented in RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >, RTT::internal::SynchronousOperationInterfacePartFused< Signature >, RTT::internal::OperationInterfacePartFused< Signature >, RTT::internal::OperationInterfacePartFused< bool(std::string)>, RTT::corba::CorbaOperationCallerFactory, and RTT::scripting::FunctionFactory.
Referenced by RTT_corba_COperationInterface_i::callOperation(), RTT_corba_COperationInterface_i::checkOperation(), and RTT_corba_COperationInterface_i::getArgumentType().
|
pure virtual |
Returns the type information of the n'th collectable argument.
The numbering of arg starts from 1.
arg | 1..collectArity(): get n'th argument type. |
Implemented in RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >, RTT::internal::SynchronousOperationInterfacePartFused< Signature >, RTT::internal::OperationInterfacePartFused< Signature >, RTT::internal::OperationInterfacePartFused< bool(std::string)>, RTT::corba::CorbaOperationCallerFactory, and RTT::scripting::FunctionFactory.
Referenced by RTT_corba_CSendHandle_i::checkArguments(), RTT_corba_COperationInterface_i::getCollectType(), RTT_corba_COperationInterface_i::getCollectTypes(), and RTT_corba_CSendHandle_i::RTT_corba_CSendHandle_i().
|
virtual |
Returns any local operation associated with this operation.
Reimplemented in RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >, RTT::internal::SynchronousOperationInterfacePartFused< Signature >, RTT::internal::OperationInterfacePartFused< Signature >, and RTT::internal::OperationInterfacePartFused< bool(std::string)>.
Definition at line 53 of file OperationInterface.cpp.
Referenced by RTT::OperationCaller< int(const std::string &)>::OperationCaller(), RTT::OperationCaller< int(const std::string &)>::operator=(), and RTT::Service::setOperationThread().
|
pure virtual |
Returns the name of this operation.
Implemented in RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >, RTT::internal::SynchronousOperationInterfacePartFused< Signature >, RTT::internal::OperationInterfacePartFused< Signature >, RTT::internal::OperationInterfacePartFused< bool(std::string)>, RTT::corba::CorbaOperationCallerFactory, and RTT::scripting::FunctionFactory.
Referenced by RTT::OperationCaller< int(const std::string &)>::OperationCaller().
|
pure virtual |
Create a DataSource for a given callable operation.
args | The arguments for the target object's function. The number of arguments must be identical to this->arity() |
caller | The Engine that will receive notifications when the method has been executed, in case it runs in the owner's thread. Normally, this is the engine of the caller's TaskContext. |
Implemented in RTT::internal::SynchronousOperationInterfacePartFused< Signature >, RTT::internal::OperationInterfacePartFused< Signature >, RTT::internal::OperationInterfacePartFused< bool(std::string)>, RTT::corba::CorbaOperationCallerFactory, and RTT::scripting::FunctionFactory.
Referenced by RTT::OperationCallerC::D::checkAndCreate().
|
pure virtual |
Create a DataSource for collecting the results of a Send.
args | A vector of data sources of which the first element contains a properly initialised sendhandle and the remainder of the elements contains datasources for collecting the return value and reference arguments. The total number of items in args must be collectArity() + 1 |
blocking | Set to true to do a blocking collect, false for a polling version. |
wrong_number_of_args_exception | |
wrong_types_of_args_exception | |
name_not_found_exception | |
no_asynchronous_operation_exception |
Implemented in RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >, RTT::internal::SynchronousOperationInterfacePartFused< Signature >, RTT::internal::OperationInterfacePartFused< Signature >, RTT::internal::OperationInterfacePartFused< bool(std::string)>, RTT::corba::CorbaOperationCallerFactory, and RTT::scripting::FunctionFactory.
Referenced by RTT::SendHandleC::D::checkAndCreate(), and RTT::scripting::DataCallParser::DataCallParser().
|
pure virtual |
Create an empty SendHandle object for this operation.
wrong_number_of_args_exception | |
wrong_types_of_args_exception | |
name_not_found_exception | |
no_asynchronous_operation_exception |
Implemented in RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >, RTT::internal::SynchronousOperationInterfacePartFused< Signature >, RTT::internal::OperationInterfacePartFused< Signature >, RTT::internal::OperationInterfacePartFused< bool(std::string)>, RTT::corba::CorbaOperationCallerFactory, and RTT::scripting::FunctionFactory.
|
pure virtual |
Create a DataSource for a given send operation.
args | The arguments for the target object's function. The number of arguments must be identical to this->arity() |
caller | The Engine that will receive notifications when the method has been executed. Normally, this is the engine of the caller's TaskContext. |
wrong_number_of_args_exception | |
wrong_types_of_args_exception | |
name_not_found_exception | |
no_asynchronous_operation_exception |
Implemented in RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >, RTT::internal::SynchronousOperationInterfacePartFused< Signature >, RTT::internal::OperationInterfacePartFused< Signature >, RTT::internal::OperationInterfacePartFused< bool(std::string)>, RTT::corba::CorbaOperationCallerFactory, and RTT::scripting::FunctionFactory.
Referenced by RTT::OperationCallerC::D::checkAndCreate().
|
pure virtual |
Return the result (return) type of this operation.
Implemented in RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >, RTT::internal::SynchronousOperationInterfacePartFused< Signature >, RTT::internal::OperationInterfacePartFused< Signature >, RTT::internal::OperationInterfacePartFused< bool(std::string)>, RTT::corba::CorbaOperationCallerFactory, and RTT::scripting::FunctionFactory.
Referenced by RTT_corba_COperationInterface_i::getOperations(), and RTT_corba_COperationInterface_i::getResultType().