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


RS003
Author(s):
autogenerated on Thu Jun 27 2013 14:58:49