StateHolder.h
Go to the documentation of this file.
1 // -*- C++ -*-
10 #ifndef NULL_COMPONENT_H
11 #define NULL_COMPONENT_H
12 
13 #include <rtm/idl/BasicDataType.hh>
14 #include <rtm/idl/ExtendedDataTypes.hh>
15 #include <semaphore.h>
16 #include <rtm/Manager.h>
17 #include <rtm/DataFlowComponentBase.h>
18 #include <rtm/CorbaPort.h>
19 #include <rtm/DataInPort.h>
20 #include <rtm/DataOutPort.h>
21 #include <rtm/idl/BasicDataTypeSkel.h>
22 #include <rtm/idl/ExtendedDataTypesSkel.h>
23 
24 // Service implementation headers
25 // <rtc-template block="service_impl_h">
27 #include "TimeKeeperService_impl.h"
28 // </rtc-template>
29 
30 // Service Consumer stub headers
31 // <rtc-template block="consumer_stub_h">
32 
33 // </rtc-template>
34 
35 using namespace RTC;
36 
42 {
43  public:
52  virtual ~StateHolder();
53 
54  // The initialize action (on CREATED->ALIVE transition)
55  // formaer rtc_init_entry()
56  virtual RTC::ReturnCode_t onInitialize();
57 
58  // The finalize action (on ALIVE->END transition)
59  // formaer rtc_exiting_entry()
60  // virtual RTC::ReturnCode_t onFinalize();
61 
62  // The startup action when ExecutionContext startup
63  // former rtc_starting_entry()
64  // virtual RTC::ReturnCode_t onStartup(RTC::UniqueId ec_id);
65 
66  // The shutdown action when ExecutionContext stop
67  // former rtc_stopping_entry()
68  // virtual RTC::ReturnCode_t onShutdown(RTC::UniqueId ec_id);
69 
70  // The activated action (Active state entry action)
71  // former rtc_active_entry()
72  // virtual RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id);
73 
74  // The deactivated action (Active state exit action)
75  // former rtc_active_exit()
76  // virtual RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id);
77 
78  // The execution action that is invoked periodically
79  // former rtc_active_do()
80  virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id);
81 
82  // The aborting action when main logic error occurred.
83  // former rtc_aborting_entry()
84  // virtual RTC::ReturnCode_t onAborting(RTC::UniqueId ec_id);
85 
86  // The error action in ERROR state
87  // former rtc_error_do()
88  // virtual RTC::ReturnCode_t onError(RTC::UniqueId ec_id);
89 
90  // The reset action that is invoked resetting
91  // This is same but different the former rtc_init_entry()
92  // virtual RTC::ReturnCode_t onReset(RTC::UniqueId ec_id);
93 
94  // The state update action that is invoked after onExecute() action
95  // no corresponding operation exists in OpenRTm-aist-0.2.0
96  // virtual RTC::ReturnCode_t onStateUpdate(RTC::UniqueId ec_id);
97 
98  // The action that is invoked when execution context's rate is changed
99  // no corresponding operation exists in OpenRTm-aist-0.2.0
100  // virtual RTC::ReturnCode_t onRateChanged(RTC::UniqueId ec_id);
101 
102  void goActual();
103  void getCommand(StateHolderService::Command &com);
104 
105  void wait(CORBA::Double tm);
106  protected:
107  // Configuration variable declaration
108  // <rtc-template block="config_declare">
109 
110  // </rtc-template>
111  TimedDoubleSeq m_currentQ;
118  std::vector<InPort<TimedDoubleSeq> *> m_wrenchesIn;
119  TimedDoubleSeq m_optionalData;
121 
122  // DataInPort declaration
123  // <rtc-template block="inport_declare">
124 
125  // </rtc-template>
126 
127  // DataOutPort declaration
128  // <rtc-template block="outport_declare">
129  TimedDoubleSeq m_q;
130  TimedDoubleSeq m_tq;
131  TimedPoint3D m_basePos;
132  TimedOrientation3D m_baseRpy;
133  TimedDoubleSeq m_baseTform;
134  TimedPose3D m_basePose;
135  TimedPoint3D m_zmp;
136  std::vector<TimedDoubleSeq> m_wrenches;
144  std::vector<OutPort<TimedDoubleSeq> *> m_wrenchesOut;
146 
147  // </rtc-template>
148 
149  // CORBA Port declaration
150  // <rtc-template block="corbaport_declare">
153 
154  // </rtc-template>
155 
156  // Service declaration
157  // <rtc-template block="service_declare">
160 
161  // </rtc-template>
162 
163  // Consumer declaration
164  // <rtc-template block="consumer_declare">
165 
166  // </rtc-template>
167 
168  private:
170  sem_t m_waitSem, m_timeSem;
172  double m_dt;
173  int dummy;
174 };
175 
176 
177 extern "C"
178 {
180 };
181 
182 #endif // NULL_COMPONENT_H
TimeKeeperService_impl m_service1
Definition: StateHolder.h:159
ec_id
StateHolderService_impl m_service0
Definition: StateHolder.h:158
sem_t m_waitSem
Definition: StateHolder.h:170
RTC::CorbaPort m_StateHolderServicePort
Definition: StateHolder.h:151
InPort< TimedDoubleSeq > m_tqIn
Definition: StateHolder.h:114
OutPort< TimedPoint3D > m_basePosOut
Definition: StateHolder.h:139
TimedDoubleSeq m_optionalData
Definition: StateHolder.h:119
InPort< TimedPoint3D > m_basePosIn
Definition: StateHolder.h:115
OutPort< TimedDoubleSeq > m_tqOut
Definition: StateHolder.h:138
std::vector< InPort< TimedDoubleSeq > * > m_wrenchesIn
Definition: StateHolder.h:118
bool m_requestGoActual
Definition: StateHolder.h:171
manager
TimedOrientation3D m_baseRpy
Definition: StateHolder.h:132
TimedPoint3D m_zmp
Definition: StateHolder.h:135
OutPort< TimedOrientation3D > m_baseRpyOut
Definition: StateHolder.h:140
RTC::CorbaPort m_TimeKeeperServicePort
Definition: StateHolder.h:152
double m_dt
Definition: StateHolder.h:172
OutPort< TimedDoubleSeq > m_qOut
Definition: StateHolder.h:137
OutPort< TimedDoubleSeq > m_optionalDataOut
Definition: StateHolder.h:145
ExecutionContextHandle_t UniqueId
InPort< TimedDoubleSeq > m_optionalDataIn
Definition: StateHolder.h:120
TimedPoint3D m_basePos
Definition: StateHolder.h:131
void StateHolderInit(RTC::Manager *manager)
TimedPose3D m_basePose
Definition: StateHolder.h:134
InPort< TimedOrientation3D > m_baseRpyIn
Definition: StateHolder.h:116
OutPort< TimedPose3D > m_basePoseOut
Definition: StateHolder.h:142
std::vector< OutPort< TimedDoubleSeq > * > m_wrenchesOut
Definition: StateHolder.h:144
InPort< TimedDoubleSeq > m_qIn
Definition: StateHolder.h:113
TimedDoubleSeq m_tq
Definition: StateHolder.h:130
TimedDoubleSeq m_baseTform
Definition: StateHolder.h:133
InPort< TimedPoint3D > m_zmpIn
Definition: StateHolder.h:117
OutPort< TimedPoint3D > m_zmpOut
Definition: StateHolder.h:143
OutPort< TimedDoubleSeq > m_baseTformOut
Definition: StateHolder.h:141
TimedDoubleSeq m_currentQ
Definition: StateHolder.h:111
def goActual()
Definition: PA10.py:74
TimedDoubleSeq m_q
Definition: StateHolder.h:129
InPort< TimedDoubleSeq > m_currentQIn
Definition: StateHolder.h:112
std::vector< TimedDoubleSeq > m_wrenches
Definition: StateHolder.h:136
RT component that do nothing and don&#39;t have ports. This component is used to create an execution cont...
Definition: StateHolder.h:40


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