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


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Thu Apr 11 2019 03:30:19