DummyModule2.cpp
Go to the documentation of this file.
00001 // -*- C++ -*-
00010 #include "DummyModule2.h"
00011 
00012 // Module specification
00013 // <rtc-template block="module_spec">
00014 static const char* DummyModule2_spec[] =
00015   {
00016     "implementation_id", "DummyModule2",
00017     "type_name",         "DummyModule2",
00018     "description",       "Console output component",
00019     "version",           "1.0",
00020     "vendor",            "Noriaki Ando, AIST",
00021     "category",          "example",
00022     "activity_type",     "DataFlowComponent",
00023     "max_instance",      "10",
00024     "language",          "C++",
00025     "lang_type",         "compile",
00026     ""
00027   };
00028 // </rtc-template>
00029 
00030 DummyModule2::DummyModule2(RTC::Manager* manager)
00031   : RTC::DataFlowComponentBase(manager),
00032     // <rtc-template block="initializer">
00033 //    m_inIn("in", m_in),
00034     
00035     // </rtc-template>
00036         dummy(0)
00037 {
00038   // Registration: InPort/OutPort/Service
00039   // <rtc-template block="registration">
00040   // Set InPort buffers
00041   
00042   // Set OutPort buffer
00043   
00044   // Set service provider to Ports
00045   
00046   // Set service consumers to Ports
00047   
00048   // Set CORBA Service Ports
00049   
00050   // </rtc-template>
00051 
00052 }
00053 
00054 DummyModule2::~DummyModule2()
00055 {
00056 }
00057 
00058 /*
00059 RTC::ReturnCode_t DummyModule2::onInitialize()
00060 {
00061   registerInPort("in", m_inIn);
00062   return RTC::RTC_OK;
00063 }
00064 
00065 RTC::ReturnCode_t DummyModule2::onExecute(RTC::UniqueId ec_id)
00066 {
00067   if (m_inIn.isNew())
00068     {
00069       m_inIn.read();
00070       std::cout << "Received: " << m_in.data << std::endl;
00071       std::cout << "TimeStamp: " << m_in.tm.sec << "[s] ";
00072       std::cout << m_in.tm.nsec << "[ns]" << std::endl;
00073     }
00074   usleep(1000);
00075 
00076   return RTC::RTC_OK;
00077 }
00078 */
00079 
00080 extern "C"
00081 {
00082  
00083   void DummyModule2Init(RTC::Manager* manager)
00084   {
00085 //    RTC::Properties profile(consoleout_spec);
00086     coil::Properties profile(DummyModule2_spec);
00087     manager->registerFactory(profile,
00088                              RTC::Create<DummyModule2>,
00089                              RTC::Delete<DummyModule2>);
00090   }
00091   
00092 };
00093 
00094 


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