HGcontroller.h
Go to the documentation of this file.
1 // -*- C++ -*-
10 #ifndef HG_CONTROLLER_H
11 #define HG_CONTROLLER_H
12 
13 #include <rtm/idl/BasicDataType.hh>
14 #include <rtm/Manager.h>
15 #include <rtm/DataFlowComponentBase.h>
16 #include <rtm/CorbaPort.h>
17 #include <rtm/DataInPort.h>
18 #include <rtm/DataOutPort.h>
19 #include <rtm/idl/BasicDataTypeSkel.h>
20 
21 // Service implementation headers
22 // <rtc-template block="service_impl_h">
23 
24 // </rtc-template>
25 
26 // Service Consumer stub headers
27 // <rtc-template block="consumer_stub_h">
28 
29 // </rtc-template>
30 
31 using namespace RTC;
32 
38 {
39  public:
48  virtual ~HGcontroller();
49 
50  // The initialize action (on CREATED->ALIVE transition)
51  // formaer rtc_init_entry()
52  virtual RTC::ReturnCode_t onInitialize();
53 
54  // The finalize action (on ALIVE->END transition)
55  // formaer rtc_exiting_entry()
56  // virtual RTC::ReturnCode_t onFinalize();
57 
58  // The startup action when ExecutionContext startup
59  // former rtc_starting_entry()
60  // virtual RTC::ReturnCode_t onStartup(RTC::UniqueId ec_id);
61 
62  // The shutdown action when ExecutionContext stop
63  // former rtc_stopping_entry()
64  // virtual RTC::ReturnCode_t onShutdown(RTC::UniqueId ec_id);
65 
66  // The activated action (Active state entry action)
67  // former rtc_active_entry()
68  virtual RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id);
69 
70  // The deactivated action (Active state exit action)
71  // former rtc_active_exit()
72  virtual RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id);
73 
74  // The execution action that is invoked periodically
75  // former rtc_active_do()
76  virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id);
77 
78  // The aborting action when main logic error occurred.
79  // former rtc_aborting_entry()
80  // virtual RTC::ReturnCode_t onAborting(RTC::UniqueId ec_id);
81 
82  // The error action in ERROR state
83  // former rtc_error_do()
84  // virtual RTC::ReturnCode_t onError(RTC::UniqueId ec_id);
85 
86  // The reset action that is invoked resetting
87  // This is same but different the former rtc_init_entry()
88  // virtual RTC::ReturnCode_t onReset(RTC::UniqueId ec_id);
89 
90  // The state update action that is invoked after onExecute() action
91  // no corresponding operation exists in OpenRTm-aist-0.2.0
92  // virtual RTC::ReturnCode_t onStateUpdate(RTC::UniqueId ec_id);
93 
94  // The action that is invoked when execution context's rate is changed
95  // no corresponding operation exists in OpenRTm-aist-0.2.0
96  // virtual RTC::ReturnCode_t onRateChanged(RTC::UniqueId ec_id);
97 
98 
99  protected:
100  // Configuration variable declaration
101  // <rtc-template block="config_declare">
102 
103  // </rtc-template>
104 
105  TimedDoubleSeq m_q;
106 
107  // DataInPort declaration
108  // <rtc-template block="inport_declare">
110 
111  // </rtc-template>
112 
113  TimedDoubleSeq m_dq, m_ddq;
114 
115  // DataOutPort declaration
116  // <rtc-template block="outport_declare">
120 
121  // </rtc-template>
122 
123  // CORBA Port declaration
124  // <rtc-template block="corbaport_declare">
125 
126  // </rtc-template>
127 
128  // Service declaration
129  // <rtc-template block="service_declare">
130 
131  // </rtc-template>
132 
133  // Consumer declaration
134  // <rtc-template block="consumer_declare">
135 
136  // </rtc-template>
137 
138  private:
139  double m_dt;
140  TimedDoubleSeq m_qOld, m_dqOld;
141  int dummy;
142 };
143 
144 
145 extern "C"
146 {
148 };
149 
150 #endif // HG_CONTROLLER_H
ec_id
OutPort< TimedDoubleSeq > m_ddqOut
Definition: HGcontroller.h:119
InPort< TimedDoubleSeq > m_qIn
Definition: HGcontroller.h:109
manager
OutPort< TimedDoubleSeq > m_qOut
Definition: HGcontroller.h:117
TimedDoubleSeq m_q
Definition: HGcontroller.h:105
sample RT component which has one data input port and one data output port
Definition: HGcontroller.h:36
ExecutionContextHandle_t UniqueId
OutPort< TimedDoubleSeq > m_dqOut
Definition: HGcontroller.h:118
void HGcontrollerInit(RTC::Manager *manager)
TimedDoubleSeq m_qOld
Definition: HGcontroller.h:140
TimedDoubleSeq m_dq
Definition: HGcontroller.h:113


hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Sat Dec 17 2022 03:52:20