AccelerationFilterComp.cpp
Go to the documentation of this file.
1 // -*- C++ -*-
9 #include <rtm/Manager.h>
10 #include <iostream>
11 #include <string>
12 #include "AccelerationFilter.h"
13 
14 
15 void MyModuleInit(RTC::Manager* manager)
16 {
17  AccelerationFilterInit(manager);
18  RTC::RtcBase* comp;
19 
20  // Create a component
21  comp = manager->createComponent("AccelerationFilter");
22 
23 
24  // Example
25  // The following procedure is examples how handle RT-Components.
26  // These should not be in this function.
27 
28  // Get the component's object reference
29  // RTC::RTObject_var rtobj;
30  // rtobj = RTC::RTObject::_narrow(manager->getPOA()->servant_to_reference(comp));
31 
32  // Get the port list of the component
33  // PortServiceList* portlist;
34  // portlist = rtobj->get_ports();
35 
36  // getting port profiles
37  // std::cout << "Number of Ports: ";
38  // std::cout << portlist->length() << std::endl << std::endl;
39  // for (CORBA::ULong i(0), n(portlist->length()); i < n; ++i)
40  // {
41  // Port_ptr port;
42  // port = (*portlist)[i];
43  // std::cout << "Port" << i << " (name): ";
44  // std::cout << port->get_port_profile()->name << std::endl;
45  //
46  // RTC::PortInterfaceProfileList iflist;
47  // iflist = port->get_port_profile()->interfaces;
48  // std::cout << "---interfaces---" << std::endl;
49  // for (CORBA::ULong i(0), n(iflist.length()); i < n; ++i)
50  // {
51  // std::cout << "I/F name: ";
52  // std::cout << iflist[i].instance_name << std::endl;
53  // std::cout << "I/F type: ";
54  // std::cout << iflist[i].type_name << std::endl;
55  // const char* pol;
56  // pol = iflist[i].polarity == 0 ? "PROVIDED" : "REQUIRED";
57  // std::cout << "Polarity: " << pol << std::endl;
58  // }
59  // std::cout << "---properties---" << std::endl;
60  // NVUtil::dump(port->get_port_profile()->properties);
61  // std::cout << "----------------" << std::endl << std::endl;
62  // }
63 
64  return;
65 }
66 
67 int main (int argc, char** argv)
68 {
70  manager = RTC::Manager::init(argc, argv);
71 
72  // Initialize manager
73  manager->init(argc, argv);
74 
75  // Set module initialization proceduer
76  // This procedure will be invoked in activateManager() function.
78 
79  // Activate manager and register to naming service
80  manager->activateManager();
81 
82  // run the manager in blocking mode
83  // runManager(false) is the default.
84  manager->runManager();
85 
86  // If you want to run the manager in non-blocking mode, do like this
87  // manager->runManager(true);
88 
89  return 0;
90 }
91 
RTObject_impl * createComponent(const char *comp_args)
void runManager(bool no_block=false)
int main(int argc, char **argv)
Acceleration Filter component *.
manager
void AccelerationFilterInit(RTC::Manager *manager)
static Manager * init(int argc, char **argv)
bool activateManager()
void setModuleInitProc(ModuleInitProc proc)
void MyModuleInit(RTC::Manager *manager)


hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Thu May 6 2021 02:41:49