PD_HGtest.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 PD_HGtest_H
20 #define PD_HGtest_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 
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 PD_HGtest
46  : public RTC::DataFlowComponentBase
47 {
48  public:
49  PD_HGtest(RTC::Manager* manager);
50  ~PD_HGtest();
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  TimedDoubleSeq m_torque0;
115  OutPort<TimedDoubleSeq> m_torque0Out;
116  TimedDoubleSeq m_torque1;
117  OutPort<TimedDoubleSeq> m_torque1Out;
118 
119  TimedPose3D m_root_trans;
120  OutPort<TimedPose3D> m_root_transOut;
121  TimedDoubleSeq m_root_vel;
122  OutPort<TimedDoubleSeq> m_root_velOut;
123  TimedDoubleSeq m_root_acc;
124  OutPort<TimedDoubleSeq> m_root_accOut;
125 
126  // </rtc-template>
127 
128  // CORBA Port declaration
129  // <rtc-template block="corbaport_declare">
130 
131  // </rtc-template>
132 
133  // Service declaration
134  // <rtc-template block="service_declare">
135 
136  // </rtc-template>
137 
138  // Consumer declaration
139  // <rtc-template block="consumer_declare">
140 
141  // </rtc-template>
142 
143  private:
144  int dummy;
145  std::ifstream waist;
146  void openFiles();
147  void closeFiles();
148 };
149 
150 
151 extern "C"
152 {
153 DLL_EXPORT void PD_HGtestInit(RTC::Manager* manager);
154 };
155 
156 #endif // PD_HGtest_H
PD_HGtest::m_torque0Out
OutPort< TimedDoubleSeq > m_torque0Out
Definition: PD_HGtest.h:115
PD_HGtest::m_root_velOut
OutPort< TimedDoubleSeq > m_root_velOut
Definition: PD_HGtest.h:122
PD_HGtest::m_root_vel
TimedDoubleSeq m_root_vel
Definition: PD_HGtest.h:121
PD_HGtestInit
DLL_EXPORT void PD_HGtestInit(RTC::Manager *manager)
Definition: PD_HGtest.cpp:254
PD_HGtest
Definition: PD_HGtest.h:45
PD_HGtest::m_torque1Out
OutPort< TimedDoubleSeq > m_torque1Out
Definition: PD_HGtest.h:117
PD_HGtest::m_torque0
TimedDoubleSeq m_torque0
Definition: PD_HGtest.h:114
DLL_EXPORT
#define DLL_EXPORT
Definition: bush_customizer.cpp:20
PD_HGtest::m_root_trans
TimedPose3D m_root_trans
Definition: PD_HGtest.h:119
PD_HGtest::m_root_acc
TimedDoubleSeq m_root_acc
Definition: PD_HGtest.h:123
PD_HGtest::dummy
int dummy
Definition: PD_HGtest.h:144
PD_HGtest::m_root_accOut
OutPort< TimedDoubleSeq > m_root_accOut
Definition: PD_HGtest.h:124
PD_HGtest::waist
std::ifstream waist
Definition: PD_HGtest.h:145
RTC
Definition: SimulationExecutionContext.cpp:7
PD_HGtest::m_root_transOut
OutPort< TimedPose3D > m_root_transOut
Definition: PD_HGtest.h:120
PD_HGtest::m_torque1
TimedDoubleSeq m_torque1
Definition: PD_HGtest.h:116


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Wed Sep 7 2022 02:51:04