78 : mservice(service), mpoa( PortableServer::POA::_duplicate(poa) )
90 return CORBA::string_dup(
mservice->getRequestName().c_str() );
98 result->length( names.size() );
99 for (
unsigned int i=0; i != names.size(); ++i )
100 result[i] = CORBA::string_dup( names[i].c_str() );
102 return result._retn();
110 result->length( names.size() );
111 for (
unsigned int i=0; i != names.size(); ++i )
112 result[i] = CORBA::string_dup( names[i].c_str() );
114 return result._retn();
118 const char * service_name)
120 std::string svc(service_name);
124 if (
mservice->requiresService(service_name) == false )
125 return RTT::corba::CServiceRequester::_nil();
129 log(
Debug) <<
"Creating CServiceRequester for "<< service_name <<endlog();
133 mrequests[svc] = std::pair<RTT::corba::CServiceRequester_var, PortableServer::ServantBase_var>(request,mserv);
136 return RTT::corba::CServiceRequester::_duplicate(
mrequests[svc].first.in() );
142 return mservice->requiresService( name );
146 ::RTT::corba::CService_ptr svc)
150 for (
unsigned int i=0; i != names.size(); ++i )
158 ::RTT::corba::CService_ptr svc)
160 std::string oname(name);
161 if (
mservice->getOperationCaller(oname) == 0) {
162 log(
Error) <<
"No such OperationCaller: " << oname <<
" in "<<
mservice->getRequestName()<<endlog();
166 (void) svc->getArity(oname.c_str());
168 CORBA::String_var svcname = svc->getName();
169 log(
Error) <<
"No such Operation: " << oname <<
" in "<< svcname.in() << endlog();
175 return mservice->getOperationCaller(oname)->setImplementationPart( tmp,
mservice->getServiceOwner()->engine() );
181 std::string oname(name);
182 if (
mservice->getOperationCaller(oname) == 0) {
183 log(
Error) <<
"No such OperationCaller: " << oname <<
" in "<<
mservice->getRequestName()<<endlog();
187 mservice->getOperationCaller(oname)->disconnect();
194 std::string oname(name);
195 if (
mservice->getOperationCaller(oname) == 0) {
196 log(
Error) <<
"No such OperationCaller: " << oname <<
" in "<<
mservice->getRequestName()<<endlog();
200 return mservice->getOperationCaller(oname)->ready();
sequence< string > COperationCallerNames
Is thrown when an operation does not exist.
std::vector< std::string > RequesterNames
PortableServer::POA_var mpoa
virtual ::RTT::corba::CServiceRequester_ptr getRequest(const char *name)
virtual ~RTT_corba_CServiceRequester_i(void)
virtual ::CORBA::Boolean ready(void)
RTT::ServiceRequester::shared_ptr mservice
boost::shared_ptr< ServiceRequester > shared_ptr
A local factory for creating remote Corba methods.
virtual ::CORBA::Boolean connectCallerTo(const char *name,::RTT::corba::CService_ptr svc)
Convenient short notation for every sub-namespace of RTT.
virtual ::CORBA::Boolean callerReady(const char *name)
virtual ::CORBA::Boolean hasRequest(const char *name)
virtual ::RTT::corba::COperationCallerNames * getOperationCallerNames(void)
sequence< string > CRequestNames
virtual char * getRequestName(void)
This class defines the interface for creating operation objects without using C++ templates...
virtual ::CORBA::Boolean disconnectCaller(const char *name)
virtual RTT::corba::CServiceRequester_ptr activate_this()
std::map< std::string, std::pair< RTT::corba::CServiceRequester_var, PortableServer::ServantBase_var > > mrequests
virtual ::RTT::corba::CRequestNames * getRequestNames(void)
virtual ::CORBA::Boolean connectTo(::RTT::corba::CService_ptr svc)
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
RTT_corba_CServiceRequester_i(RTT::ServiceRequester::shared_ptr service, PortableServer::POA_ptr poa)
virtual void disconnect(void)
std::vector< std::string > OperationCallerNames