SampleRH2.h
Go to the documentation of this file.
1 // -*- mode: c++; indent-tabs-mode: t; tab-width: 4; c-basic-offset: 4; -*-
2 /*
3  * Copyright (c) 2008, AIST, the University of Tokyo and General Robotix Inc.
4  * All rights reserved. This program is made available under the terms of the
5  * Eclipse Public License v1.0 which accompanies this distribution, and is
6  * available at http://www.eclipse.org/legal/epl-v10.html
7  * Contributors:
8  * National Institute of Advanced Industrial Science and Technology (AIST)
9  * General Robotix Inc.
10  */
19 #ifndef NEWSAMPLERH2_H
20 #define NEWSAMPLERH2_H
21 
22 #include <rtm/idl/BasicDataType.hh>
23 #include <rtm/Manager.h>
24 #include <rtm/DataFlowComponentBase.h>
25 #include <rtm/CorbaPort.h>
26 #include <rtm/DataInPort.h>
27 #include <rtm/DataOutPort.h>
28 #include <rtm/idl/BasicDataTypeSkel.h>
29 #include <rtm/idl/ExtendedDataTypesSkel.h>
30 #include <rtm/CORBA_SeqUtil.h>
31 #include <vector>
32 
33 // Service implementation headers
34 // <rtc-template block="service_impl_h">
35 
36 // </rtc-template>
37 
38 // Service Consumer stub headers
39 // <rtc-template block="consumer_stub_h">
40 
41 // </rtc-template>
42 
43 using namespace RTC;
44 
45 class SampleRH2
47 {
48  public:
50  ~SampleRH2();
51 
52  // The initialize action (on CREATED->ALIVE transition)
53  // formaer rtc_init_entry()
54  virtual RTC::ReturnCode_t onInitialize();
55 
56  // The finalize action (on ALIVE->END transition)
57  // formaer rtc_exiting_entry()
58  // virtual RTC::ReturnCode_t onFinalize();
59 
60  // The startup action when ExecutionContext startup
61  // former rtc_starting_entry()
62  // virtual RTC::ReturnCode_t onStartup(RTC::UniqueId ec_id);
63 
64  // The shutdown action when ExecutionContext stop
65  // former rtc_stopping_entry()
66  // virtual RTC::ReturnCode_t onShutdown(RTC::UniqueId ec_id);
67 
68  // The activated action (Active state entry action)
69  // former rtc_active_entry()
70  virtual RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id);
71 
72  // The deactivated action (Active state exit action)
73  // former rtc_active_exit()
74  virtual RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id);
75 
76  // The execution action that is invoked periodically
77  // former rtc_active_do()
78  virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id);
79 
80  // The aborting action when main logic error occurred.
81  // former rtc_aborting_entry()
82  // virtual RTC::ReturnCode_t onAborting(RTC::UniqueId ec_id);
83 
84  // The error action in ERROR state
85  // former rtc_error_do()
86  // virtual RTC::ReturnCode_t onError(RTC::UniqueId ec_id);
87 
88  // The reset action that is invoked resetting
89  // This is same but different the former rtc_init_entry()
90  // virtual RTC::ReturnCode_t onReset(RTC::UniqueId ec_id);
91 
92  // The state update action that is invoked after onExecute() action
93  // no corresponding operation exists in OpenRTm-aist-0.2.0
94  // virtual RTC::ReturnCode_t onStateUpdate(RTC::UniqueId ec_id);
95 
96  // The action that is invoked when execution context's rate is changed
97  // no corresponding operation exists in OpenRTm-aist-0.2.0
98  // virtual RTC::ReturnCode_t onRateChanged(RTC::UniqueId ec_id);
99 
100 
101  protected:
102  // Configuration variable declaration
103  // <rtc-template block="config_declare">
104 
105  // </rtc-template>
106 
107  // DataInPort declaration
108  // <rtc-template block="inport_declare">
109 
110  // </rtc-template>
111 
112  // DataOutPort declaration
113  // <rtc-template block="outport_declare">
114 
115  TimedPose3D m_root_trans;
117 
118  // </rtc-template>
119 
120  // CORBA Port declaration
121  // <rtc-template block="corbaport_declare">
122 
123  // </rtc-template>
124 
125  // Service declaration
126  // <rtc-template block="service_declare">
127 
128  // </rtc-template>
129 
130  // Consumer declaration
131  // <rtc-template block="consumer_declare">
132 
133  // </rtc-template>
134 
135  private:
136  std::ifstream root;
137  void openFiles();
138  void closeFiles();
139 };
140 
141 
142 extern "C"
143 {
144 DLL_EXPORT void SampleRH2Init(RTC::Manager* manager);
145 };
146 
147 #endif // NEWSAMPLELF_H
ec_id
manager
ExecutionContextHandle_t UniqueId
DLL_EXPORT void SampleRH2Init(RTC::Manager *manager)
Definition: SampleRH2.cpp:227
std::ifstream root
Definition: SampleRH2.h:136
TimedPose3D m_root_trans
Definition: SampleRH2.h:115
OutPort< TimedPose3D > m_root_transOut
Definition: SampleRH2.h:116
#define DLL_EXPORT


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Sat Apr 13 2019 02:14:25