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);
128 log(
Debug) <<
"Creating CServiceRequester for "<< service_name <<endlog();
132 mrequests[svc] = std::pair<RTT::corba::CServiceRequester_var, PortableServer::ServantBase_var>(request,mserv);
135 return RTT::corba::CServiceRequester::_duplicate(
mrequests[svc].first.in() );
141 return mservice->requiresService( name );
145 ::RTT::corba::CService_ptr svc)
149 for (
unsigned int i=0; i != names.size(); ++i )
157 ::RTT::corba::CService_ptr svc)
159 std::string oname(name);
160 if (
mservice->getOperationCaller(oname) == 0) {
161 log(
Error) <<
"No such OperationCaller: " << oname <<
" in "<<
mservice->getRequestName()<<endlog();
165 (void) svc->getArity(oname.c_str());
167 CORBA::String_var svcname = svc->getName();
168 log(
Error) <<
"No such Operation: " << oname <<
" in "<< svcname.in() << endlog();
174 return mservice->getOperationCaller(oname)->setImplementationPart( tmp,
mservice->getServiceOwner()->engine() );
180 std::string oname(name);
181 if (
mservice->getOperationCaller(oname) == 0) {
182 log(
Error) <<
"No such OperationCaller: " << oname <<
" in "<<
mservice->getRequestName()<<endlog();
186 mservice->getOperationCaller(oname)->disconnect();
193 std::string oname(name);
194 if (
mservice->getOperationCaller(oname) == 0) {
195 log(
Error) <<
"No such OperationCaller: " << oname <<
" in "<<
mservice->getRequestName()<<endlog();
199 return mservice->getOperationCaller(oname)->ready();
217 ::RTT::corba::CServiceRequesterDescription_var d = new ::RTT::corba::CServiceRequesterDescription;
222 d->operationcallernames = operationcallernames;
225 d->children.length( requesters.size() );
226 d->children_descriptions.length( requesters.size() );
228 for (
unsigned int i=0; i != requesters.size(); ++i )
230 if (requesters[i] ==
"this")
continue;
232 ::RTT::corba::CServiceRequester_ptr requester =
getRequest(requesters[i].c_str());
233 RequestersMap::iterator it =
mrequests.find(requesters[i]);
239 d->children_descriptions[j] = child_description;
244 d->children.length(j);
245 d->children_descriptions.length(j);
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::CServiceRequesterDescription * getCServiceRequesterDescription(void)
virtual ::RTT::corba::COperationCallerNames * getOperationCallerNames(void)
Complete description of a ServiceRequester.
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()
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
CServiceRequesters children