MyServiceProvider.cpp
Go to the documentation of this file.
00001 // -*- C++ -*-
00010 #include "MyServiceProvider.h"
00011 
00012 // Module specification
00013 // <rtc-template block="module_spec">
00014 static const char* myserviceprovider_spec[] =
00015   {
00016     "implementation_id", "MyServiceProvider",
00017     "type_name",         "MyServiceProvider",
00018     "description",       "MyService Provider Sample component",
00019     "version",           "0.1",
00020     "vendor",            "AIST",
00021     "category",          "Generic",
00022     "activity_type",     "DataFlowComponent",
00023     "max_instance",      "10",
00024     "language",          "C++",
00025     "lang_type",         "compile",
00026     ""
00027   };
00028 // </rtc-template>
00029 
00030 MyServiceProvider::MyServiceProvider(RTC::Manager* manager)
00031   : RTC::DataFlowComponentBase(manager),
00032     // <rtc-template block="initializer">
00033     m_MyServicePort("MyService")
00034     // </rtc-template>
00035 {
00036 }
00037 
00038 MyServiceProvider::~MyServiceProvider()
00039 {
00040 }
00041 
00042 
00043 RTC::ReturnCode_t MyServiceProvider::onInitialize()
00044 {
00045   // Registration: InPort/OutPort/Service
00046   // <rtc-template block="registration">
00047   // Set InPort buffers
00048   
00049   // Set OutPort buffer
00050   
00051   // Set service provider to Ports
00052   m_MyServicePort.registerProvider("myservice0", "MyService", m_myservice0);
00053   
00054   // Set service consumers to Ports
00055   
00056   // Set CORBA Service Ports
00057   addPort(m_MyServicePort);
00058   
00059   // </rtc-template>
00060 
00061   return RTC::RTC_OK;
00062 }
00063 
00064 /*
00065 RTC::ReturnCode_t MyServiceProvider::onFinalize()
00066 {
00067   return RTC::RTC_OK;
00068 }
00069 */
00070 
00071 /*
00072 RTC::ReturnCode_t MyServiceProvider::onStartup(RTC::UniqueId ec_id)
00073 {
00074   return RTC::RTC_OK;
00075 }
00076 */
00077 
00078 /*
00079 RTC::ReturnCode_t MyServiceProvider::onShutdown(RTC::UniqueId ec_id)
00080 {
00081   return RTC::RTC_OK;
00082 }
00083 */
00084 
00085 /*
00086 RTC::ReturnCode_t MyServiceProvider::onActivated(RTC::UniqueId ec_id)
00087 {
00088   return RTC::RTC_OK;
00089 }
00090 */
00091 
00092 /*
00093 RTC::ReturnCode_t MyServiceProvider::onDeactivated(RTC::UniqueId ec_id)
00094 {
00095   return RTC::RTC_OK;
00096 }
00097 */
00098 
00099 /*
00100 RTC::ReturnCode_t MyServiceProvider::onExecute(RTC::UniqueId ec_id)
00101 {
00102   return RTC::RTC_OK;
00103 }
00104 */
00105 
00106 /*
00107 RTC::ReturnCode_t MyServiceProvider::onAborting(RTC::UniqueId ec_id)
00108 {
00109   return RTC::RTC_OK;
00110 }
00111 */
00112 
00113 /*
00114 RTC::ReturnCode_t MyServiceProvider::onError(RTC::UniqueId ec_id)
00115 {
00116   return RTC::RTC_OK;
00117 }
00118 */
00119 
00120 /*
00121 RTC::ReturnCode_t MyServiceProvider::onReset(RTC::UniqueId ec_id)
00122 {
00123   return RTC::RTC_OK;
00124 }
00125 */
00126 
00127 /*
00128 RTC::ReturnCode_t MyServiceProvider::onStateUpdate(RTC::UniqueId ec_id)
00129 {
00130   return RTC::RTC_OK;
00131 }
00132 */
00133 
00134 /*
00135 RTC::ReturnCode_t MyServiceProvider::onRateChanged(RTC::UniqueId ec_id)
00136 {
00137   return RTC::RTC_OK;
00138 }
00139 */
00140 
00141 
00142 
00143 extern "C"
00144 {
00145  
00146   void MyServiceProviderInit(RTC::Manager* manager)
00147   {
00148     coil::Properties profile(myserviceprovider_spec);
00149     manager->registerFactory(profile,
00150                              RTC::Create<MyServiceProvider>,
00151                              RTC::Delete<MyServiceProvider>);
00152   }
00153   
00154 };
00155 
00156 


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Sat Jun 8 2019 18:49:05