ervant/DummyModule2.cpp
Go to the documentation of this file.
1 // -*- C++ -*-
10 #include "DummyModule2.h"
11 
12 // Module specification
13 // <rtc-template block="module_spec">
14 static const char* DummyModule2_spec[] =
15  {
16  "implementation_id", "DummyModule2",
17  "type_name", "DummyModule2",
18  "description", "Console output component",
19  "version", "1.0",
20  "vendor", "Noriaki Ando, AIST",
21  "category", "example",
22  "activity_type", "DataFlowComponent",
23  "max_instance", "10",
24  "language", "C++",
25  "lang_type", "compile",
26  ""
27  };
28 // </rtc-template>
29 
31  : RTC::DataFlowComponentBase(manager),
32  // <rtc-template block="initializer">
33 // m_inIn("in", m_in),
34 
35  // </rtc-template>
36  dummy(0)
37 {
38  // Registration: InPort/OutPort/Service
39  // <rtc-template block="registration">
40  // Set InPort buffers
41 
42  // Set OutPort buffer
43 
44  // Set service provider to Ports
45 
46  // Set service consumers to Ports
47 
48  // Set CORBA Service Ports
49 
50  // </rtc-template>
51 
52 }
53 
55 {
56 }
57 
58 /*
59 RTC::ReturnCode_t DummyModule2::onInitialize()
60 {
61  registerInPort("in", m_inIn);
62  return RTC::RTC_OK;
63 }
64 
65 RTC::ReturnCode_t DummyModule2::onExecute(RTC::UniqueId ec_id)
66 {
67  if (m_inIn.isNew())
68  {
69  m_inIn.read();
70  std::cout << "Received: " << m_in.data << std::endl;
71  std::cout << "TimeStamp: " << m_in.tm.sec << "[s] ";
72  std::cout << m_in.tm.nsec << "[ns]" << std::endl;
73  }
74  usleep(1000);
75 
76  return RTC::RTC_OK;
77 }
78 */
79 
80 extern "C"
81 {
82 
84  {
85 // RTC::Properties profile(consoleout_spec);
87  manager->registerFactory(profile,
88  RTC::Create<DummyModule2>,
89  RTC::Delete<DummyModule2>);
90  }
91 
92 };
93 
94 
DataFlowComponentBase class.
Manager class.
Definition: Manager.h:80
void DummyModule2Init(RTC::Manager *manager)
static const char * DummyModule2_spec[]
DummyModule2(RTC::Manager *manager)
Class represents a set of properties.
Definition: Properties.h:101
bool registerFactory(coil::Properties &profile, RtcNewFunc new_func, RtcDeleteFunc delete_func)
Register RT-Component Factory.
Definition: Manager.cpp:433


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Thu Jun 6 2019 19:25:58