Orocos Real-Time Toolkit
2.8.3
|
A local factory for creating remote Corba methods. More...
#include <rtt/transports/corba/CorbaOperationCallerFactory.hpp>
Public Types | |
typedef std::vector< base::DataSourceBase::shared_ptr > | CArguments |
typedef std::vector< std::string > | Members |
typedef std::vector< ArgumentDescription > | CDescriptions |
Public Member Functions | |
CorbaOperationCallerFactory (const std::string &method_name, corba::CService_ptr fact, PortableServer::POA_ptr the_poa) | |
virtual | ~CorbaOperationCallerFactory () |
corba::CService_ptr | getService () |
Returns the remote service that hosts this part. More... | |
virtual unsigned int | arity () const |
Returns the arity (number of arguments) of this operation. More... | |
virtual const types::TypeInfo * | getArgumentType (unsigned int i) const |
Returns the type information of the n'th argument, with argument zero being the return value. More... | |
virtual const types::TypeInfo * | getCollectType (unsigned int i) const |
Returns the type information of the n'th collectable argument. More... | |
virtual unsigned int | collectArity () const |
Returns the number of collectable arguments of this operation's function. More... | |
virtual std::string | resultType () const |
Return the result (return) type of this operation. More... | |
virtual std::string | getName () const |
Returns the name of this operation. More... | |
virtual std::string | description () const |
Returns the description of this operation. More... | |
virtual std::vector< ArgumentDescription > | getArgumentList () const |
Get a description of the desired arguments in the ArgumentDescription format. More... | |
virtual base::DataSourceBase::shared_ptr | produce (const std::vector< base::DataSourceBase::shared_ptr > &args, ExecutionEngine *caller) const |
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 |
Create a DataSource for a given send operation. More... | |
virtual base::DataSourceBase::shared_ptr | produceHandle () const |
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 |
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... | |
A local factory for creating remote Corba methods.
It connects to an corba::Service and translates C++ calls to corba idl.
Definition at line 62 of file CorbaOperationCallerFactory.hpp.
typedef std::vector<base::DataSourceBase::shared_ptr> RTT::corba::CorbaOperationCallerFactory::CArguments |
Definition at line 69 of file CorbaOperationCallerFactory.hpp.
typedef std::vector< ArgumentDescription > RTT::corba::CorbaOperationCallerFactory::CDescriptions |
Definition at line 71 of file CorbaOperationCallerFactory.hpp.
typedef std::vector<std::string> RTT::corba::CorbaOperationCallerFactory::Members |
Definition at line 70 of file CorbaOperationCallerFactory.hpp.
CorbaOperationCallerFactory::CorbaOperationCallerFactory | ( | const std::string & | method_name, |
corba::CService_ptr | fact, | ||
PortableServer::POA_ptr | the_poa | ||
) |
Definition at line 53 of file CorbaOperationCallerFactory.cpp.
|
virtual |
Definition at line 60 of file CorbaOperationCallerFactory.cpp.
|
virtual |
Returns the arity (number of arguments) of this operation.
Implements RTT::OperationInterfacePart.
Definition at line 62 of file CorbaOperationCallerFactory.cpp.
|
virtual |
Returns the number of collectable arguments of this operation's function.
These consist of the return value and the reference arguments.
Implements RTT::OperationInterfacePart.
Definition at line 66 of file CorbaOperationCallerFactory.cpp.
|
virtual |
Returns the description of this operation.
Implements RTT::OperationInterfacePart.
Definition at line 113 of file CorbaOperationCallerFactory.cpp.
References RTT::corba::CNoSuchNameException::name.
Referenced by getArgumentList().
|
virtual |
Get a description of the desired arguments in the ArgumentDescription format.
Implements RTT::OperationInterfacePart.
Definition at line 123 of file CorbaOperationCallerFactory.cpp.
References description(), and RTT::corba::CNoSuchNameException::name.
|
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. |
Implements RTT::OperationInterfacePart.
Definition at line 70 of file CorbaOperationCallerFactory.cpp.
References RTT::Error, RTT::corba::CWrongArgumentException::max_arg, RTT::types::Types(), RTT::Warning, and RTT::corba::CWrongArgumentException::which_arg.
Referenced by produce().
|
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. |
Implements RTT::OperationInterfacePart.
Definition at line 89 of file CorbaOperationCallerFactory.cpp.
References RTT::types::Types().
|
virtualinherited |
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().
|
virtual |
Returns the name of this operation.
Implements RTT::OperationInterfacePart.
Definition at line 109 of file CorbaOperationCallerFactory.cpp.
|
inline |
Returns the remote service that hosts this part.
Definition at line 82 of file CorbaOperationCallerFactory.hpp.
Referenced by RTT::corba::OperationCallerProxy::setImplementationPart().
|
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. |
Implements RTT::OperationInterfacePart.
Definition at line 224 of file CorbaOperationCallerFactory.cpp.
References RTT::types::TypeInfo::buildActionAlias(), RTT::types::TypeInfo::buildValue(), RTT::corba::CWrongTypeArgException::expected, getArgumentType(), RTT::types::TypeInfo::getProtocol(), RTT::types::TypeInfo::getTypeName(), RTT::corba::CNoSuchNameException::name, ORO_CORBA_PROTOCOL_ID, RTT::corba::CWrongNumbArgException::received, RTT::corba::CWrongTypeArgException::received, RTT::types::Types(), RTT::corba::CorbaTypeTransporter::updateAny(), RTT::corba::CWrongNumbArgException::wanted, and RTT::corba::CWrongTypeArgException::whicharg.
|
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 |
Implements RTT::OperationInterfacePart.
Definition at line 378 of file CorbaOperationCallerFactory.cpp.
References RTT::types::TypeInfo::buildValue(), RTT::Error, RTT::corba::CWrongTypeArgException::expected, RTT::types::TypeInfo::getProtocol(), RTT::internal::DataSource< T >::narrow(), ORO_CORBA_PROTOCOL_ID, RTT::corba::CWrongNumbArgException::received, RTT::corba::CWrongTypeArgException::received, RTT::corba::CorbaTypeTransporter::updateAny(), RTT::corba::CWrongNumbArgException::wanted, and RTT::corba::CWrongTypeArgException::whicharg.
|
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 |
Implements RTT::OperationInterfacePart.
Definition at line 298 of file CorbaOperationCallerFactory.cpp.
|
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 |
Implements RTT::OperationInterfacePart.
Definition at line 271 of file CorbaOperationCallerFactory.cpp.
References RTT::types::TypeInfo::buildValue(), RTT::corba::CWrongTypeArgException::expected, RTT::types::TypeInfo::getProtocol(), RTT::types::TypeInfo::getTypeName(), RTT::corba::CNoSuchNameException::name, ORO_CORBA_PROTOCOL_ID, RTT::corba::CWrongNumbArgException::received, RTT::corba::CWrongTypeArgException::received, RTT::corba::CorbaTypeTransporter::updateAny(), RTT::corba::CWrongNumbArgException::wanted, and RTT::corba::CWrongTypeArgException::whicharg.
|
virtual |
Return the result (return) type of this operation.
Implements RTT::OperationInterfacePart.
Definition at line 99 of file CorbaOperationCallerFactory.cpp.
References RTT::corba::CNoSuchNameException::name.