10 #ifndef MYSERVICECONSUMER_H 11 #define MYSERVICECONSUMER_H 13 #include <rtm/idl/BasicDataTypeSkel.h> 20 #include <coil/Async.h> 29 #include "MyServiceStub.h" 129 if( CORBA::is_nil((*obj).operator->()) )
131 std::cout <<
"No service connected." << std::endl;
135 (*obj)->set_value(m_val);
138 catch (
const CORBA::INV_OBJREF &)
141 catch (
const CORBA::OBJECT_NOT_EXIST &)
144 catch (
const CORBA::OBJ_ADAPTER &)
158 : m_msg(msg), m_result(result) {}
163 if( CORBA::is_nil((*obj).operator->()) )
165 std::cout <<
"No service connected." << std::endl;
169 m_result = (*obj)->echo(m_msg.c_str());
172 catch (
const CORBA::INV_OBJREF &)
175 catch (
const CORBA::OBJECT_NOT_EXIST &)
178 catch (
const CORBA::OBJ_ADAPTER &)
199 std::cout << m_cnt <<
": " << val << std::endl;
213 #endif // MYSERVICECONSUMER_H
coil::Async * async_set_value
void operator()(RTC::CorbaConsumer< SimpleService::MyService > *obj)
RT Conponent CORBA service/consumer Port.
DataFlowComponentBase class.
RTC::CorbaPort m_MyServicePort
echo_functor(std::string msg, std::string &result)
RTComponent manager class.
set_value_functor(CORBA::Float val)
ExecutionContextHandle_t UniqueId
RTC::CorbaConsumer< SimpleService::MyService > m_myservice0
void operator()(RTC::CorbaConsumer< SimpleService::MyService > *obj)
DLL_EXPORT void MyServiceConsumerInit(RTC::Manager *manager)