78 : mservice(service), mpoa( PortableServer::POA::_duplicate(poa) )
90 return CORBA::string_dup(
mservice->getRequestName().c_str() );
97 ::RTT::corba::CRequestNames_var result = new ::RTT::corba::CRequestNames();
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();
109 ::RTT::corba::COperationCallerNames_var result = new ::RTT::corba::COperationCallerNames();
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) {
165 (void) svc->getArity(oname.c_str());
166 }
catch( ::RTT::corba::CNoSuchNameException& ) {
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) {
186 mservice->getOperationCaller(oname)->disconnect();
193 std::string oname(name);
194 if (
mservice->getOperationCaller(oname) == 0) {
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]);
238 d->children[j] = requester;
239 d->children_descriptions[j] = child_description;
244 d->children.length(j);
245 d->children_descriptions.length(j);
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
virtual ::CORBA::Boolean connectCallerTo(const char *name,::RTT::corba::CService_ptr svc)
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)
virtual char * getRequestName(void)
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)
static Service::shared_ptr mserv
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)
Logger & in(const std::string &modname)
static Logger::LogFunction endlog()
std::vector< std::string > OperationCallerNames