DummyModule1.cpp
Go to the documentation of this file.
00001 // -*- C++ -*-
00010 #include "DummyModule1.h"
00011 #include <iostream>
00012 
00013 // Module specification
00014 // <rtc-template block="module_spec">
00015 static const char* DummyModule1_spec[] =
00016   {
00017     "implementation_id", "DummyModule1",
00018     "type_name",         "DummyModule1",
00019     "description",       "Console input component",
00020     "version",           "1.0",
00021     "vendor",            "Noriaki Ando, AIST",
00022     "category",          "example",
00023     "activity_type",     "DataFlowComponent",
00024     "max_instance",      "10",
00025     "language",          "C++",
00026     "lang_type",         "compile",
00027     ""
00028   };
00029 // </rtc-template>
00030 
00031 DummyModule1::DummyModule1(RTC::Manager* manager)
00032   : RTC::DataFlowComponentBase(manager),
00033     // <rtc-template block="initializer">
00034 //    m_outOut("out", m_out),
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 DummyModule1::~DummyModule1()
00055 {
00056 }
00057 
00058 /*
00059 RTC::ReturnCode_t DummyModule1::onInitialize()
00060 {
00061   registerOutPort("out", m_outOut);
00062   return RTC::RTC_OK;
00063 }
00064 RTC::ReturnCode_t DummyModule1::onExecute(RTC::UniqueId ec_id)
00065 {
00066   std::cout << "Please input number: ";
00067   std::cin >> m_out.data;
00068   std::cout << "Sending to subscriber: " << m_out.data << std::endl;
00069   m_outOut.write();
00070 
00071   return RTC::RTC_OK;
00072 }
00073 */
00074 
00075 extern "C"
00076 {
00077  
00078   void DummyModule1Init(RTC::Manager* manager)
00079   {
00080     coil::Properties profile(DummyModule1_spec);
00081     manager->registerFactory(profile,
00082                              RTC::Create<DummyModule1>,
00083                              RTC::Delete<DummyModule1>);
00084 
00085   }
00086   
00087 };
00088 
00089 


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Sun Mar 26 2017 03:37:15