Joystick.h
Go to the documentation of this file.
1 // -*- C++ -*-
10 #ifndef JOYSTICK_H
11 #define JOYSTICK_H
12 
13 #include <rtm/idl/BasicDataType.hh>
14 #include <rtm/idl/ExtendedDataTypes.hh>
15 #include <rtm/idl/InterfaceDataTypes.hh>
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 #include <rtm/idl/InterfaceDataTypesSkel.h>
24 
25 // Service implementation headers
26 // <rtc-template block="service_impl_h">
27 
28 // </rtc-template>
29 
30 // Service Consumer stub headers
31 // <rtc-template block="consumer_stub_h">
32 
33 // </rtc-template>
34 
35 class joystick;
36 
37 using namespace RTC;
38 
44 class Joystick
46 {
47  public:
53 
57  virtual ~Joystick();
58 
59  // <rtc-template block="public_attribute">
60 
61  // </rtc-template>
62 
63  // <rtc-template block="public_operation">
64 
65  // </rtc-template>
66 
67  /***
68  *
69  * The initialize action (on CREATED->ALIVE transition)
70  * formaer rtc_init_entry()
71  *
72  * @return RTC::ReturnCode_t
73  *
74  *
75  */
76  virtual RTC::ReturnCode_t onInitialize();
77 
78  /***
79  *
80  * The finalize action (on ALIVE->END transition)
81  * formaer rtc_exiting_entry()
82  *
83  * @return RTC::ReturnCode_t
84  *
85  *
86  */
87  // virtual RTC::ReturnCode_t onFinalize();
88 
89  /***
90  *
91  * The startup action when ExecutionContext startup
92  * former rtc_starting_entry()
93  *
94  * @param ec_id target ExecutionContext Id
95  *
96  * @return RTC::ReturnCode_t
97  *
98  *
99  */
100  // virtual RTC::ReturnCode_t onStartup(RTC::UniqueId ec_id);
101 
102  /***
103  *
104  * The shutdown action when ExecutionContext stop
105  * former rtc_stopping_entry()
106  *
107  * @param ec_id target ExecutionContext Id
108  *
109  * @return RTC::ReturnCode_t
110  *
111  *
112  */
113  // virtual RTC::ReturnCode_t onShutdown(RTC::UniqueId ec_id);
114 
115  /***
116  *
117  * The activated action (Active state entry action)
118  * former rtc_active_entry()
119  *
120  * @param ec_id target ExecutionContext Id
121  *
122  * @return RTC::ReturnCode_t
123  *
124  *
125  */
126  virtual RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id);
127 
128  /***
129  *
130  * The deactivated action (Active state exit action)
131  * former rtc_active_exit()
132  *
133  * @param ec_id target ExecutionContext Id
134  *
135  * @return RTC::ReturnCode_t
136  *
137  *
138  */
139  virtual RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id);
140 
141  /***
142  *
143  * The execution action that is invoked periodically
144  * former rtc_active_do()
145  *
146  * @param ec_id target ExecutionContext Id
147  *
148  * @return RTC::ReturnCode_t
149  *
150  *
151  */
152  virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id);
153 
154  /***
155  *
156  * The aborting action when main logic error occurred.
157  * former rtc_aborting_entry()
158  *
159  * @param ec_id target ExecutionContext Id
160  *
161  * @return RTC::ReturnCode_t
162  *
163  *
164  */
165  // virtual RTC::ReturnCode_t onAborting(RTC::UniqueId ec_id);
166 
167  /***
168  *
169  * The error action in ERROR state
170  * former rtc_error_do()
171  *
172  * @param ec_id target ExecutionContext Id
173  *
174  * @return RTC::ReturnCode_t
175  *
176  *
177  */
178  // virtual RTC::ReturnCode_t onError(RTC::UniqueId ec_id);
179 
180  /***
181  *
182  * The reset action that is invoked resetting
183  * This is same but different the former rtc_init_entry()
184  *
185  * @param ec_id target ExecutionContext Id
186  *
187  * @return RTC::ReturnCode_t
188  *
189  *
190  */
191  // virtual RTC::ReturnCode_t onReset(RTC::UniqueId ec_id);
192 
193  /***
194  *
195  * The state update action that is invoked after onExecute() action
196  * no corresponding operation exists in OpenRTm-aist-0.2.0
197  *
198  * @param ec_id target ExecutionContext Id
199  *
200  * @return RTC::ReturnCode_t
201  *
202  *
203  */
204  // virtual RTC::ReturnCode_t onStateUpdate(RTC::UniqueId ec_id);
205 
206  /***
207  *
208  * The action that is invoked when execution context's rate is changed
209  * no corresponding operation exists in OpenRTm-aist-0.2.0
210  *
211  * @param ec_id target ExecutionContext Id
212  *
213  * @return RTC::ReturnCode_t
214  *
215  *
216  */
217  // virtual RTC::ReturnCode_t onRateChanged(RTC::UniqueId ec_id);
218 
219 
220  protected:
221  // <rtc-template block="protected_attribute">
222 
223  // </rtc-template>
224 
225  // <rtc-template block="protected_operation">
226 
227  // </rtc-template>
228 
229  // DataInPort declaration
230  // <rtc-template block="inport_declare">
231 
232  // </rtc-template>
233 
234 
235  // DataOutPort declaration
236  // <rtc-template block="outport_declare">
237  TimedFloatSeq m_axes;
246  TimedBooleanSeq m_buttons;
254 
255  // </rtc-template>
256 
257  // CORBA Port declaration
258  // <rtc-template block="corbaport_declare">
259 
260  // </rtc-template>
261 
262  // Service declaration
263  // <rtc-template block="service_declare">
264 
265  // </rtc-template>
266 
267  // Consumer declaration
268  // <rtc-template block="consumer_declare">
269 
270  // </rtc-template>
271 
272  private:
273  // <rtc-template block="private_attribute">
274 
275  // </rtc-template>
276 
277  // <rtc-template block="private_operation">
278 
279  // </rtc-template>
280 
282  std::string m_device;
283  unsigned int m_debugLevel;
284 };
285 
286 
287 extern "C"
288 {
290 };
291 
292 #endif // JOYSTICK_H
ec_id
OutPort< TimedFloatSeq > m_axesOut
Definition: Joystick.h:245
TimedBooleanSeq m_buttons
Definition: Joystick.h:246
manager
DLL_EXPORT void JoystickInit(RTC::Manager *manager)
Definition: Joystick.cpp:199
std::string m_device
Definition: Joystick.h:282
ExecutionContextHandle_t UniqueId
joystick * m_js
Definition: Joystick.h:281
OutPort< TimedBooleanSeq > m_buttonsOut
Definition: Joystick.h:253
unsigned int m_debugLevel
Definition: Joystick.h:283
TimedFloatSeq m_axes
Definition: Joystick.h:237
Access a joystick control device.
Definition: Joystick.h:44
Definition: js.h:6
#define DLL_EXPORT


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