PowerPointRTC  0.5.0
 全て クラス ファイル 関数 変数
PowerPointControl.h
説明を見る。
1 // -*- C++ -*-
10 #ifndef POWERPOINTCONTROL_H
11 #define POWERPOINTCONTROL_H
12 
13 #include <rtm/Manager.h>
14 #include <rtm/DataFlowComponentBase.h>
15 #include <rtm/CorbaPort.h>
16 #include <rtm/DataInPort.h>
17 #include <rtm/DataOutPort.h>
18 #include <rtm/idl/BasicDataTypeSkel.h>
19 #include <rtm/idl/ExtendedDataTypesSkel.h>
20 #include <rtm/idl/InterfaceDataTypesSkel.h>
21 
22 // Service implementation headers
23 // <rtc-template block="service_impl_h">
24 
25 // </rtc-template>
26 
27 // Service Consumer stub headers
28 // <rtc-template block="consumer_stub_h">
29 #include "BasicDataTypeStub.h"
30 
31 #include "PowerPointObject.h"
32 #include "PowerPointTask.h"
33 
34 // </rtc-template>
35 
36 using namespace RTC;
37 
44  : public RTC::DataFlowComponentBase
45 {
46  public:
51  PowerPointControl(RTC::Manager* manager);
52 
57 
62 
67  void SetFilePath(std::string FP);
68 
69  // <rtc-template block="public_attribute">
70 
71  // </rtc-template>
72 
73  // <rtc-template block="public_operation">
74 
75  // </rtc-template>
76 
77  /***
78  *
79  * The initialize action (on CREATED->ALIVE transition)
80  * formaer rtc_init_entry()
81  *
82  * @return RTC::ReturnCode_t
83  *
84  *
85  */
86  virtual RTC::ReturnCode_t onInitialize();
87 
88  /***
89  *
90  * The finalize action (on ALIVE->END transition)
91  * formaer rtc_exiting_entry()
92  *
93  * @return RTC::ReturnCode_t
94  *
95  *
96  */
97  // virtual RTC::ReturnCode_t onFinalize();
98 
99  /***
100  *
101  * The startup action when ExecutionContext startup
102  * former rtc_starting_entry()
103  *
104  * @param ec_id target ExecutionContext Id
105  *
106  * @return RTC::ReturnCode_t
107  *
108  *
109  */
110  // virtual RTC::ReturnCode_t onStartup(RTC::UniqueId ec_id);
111 
112  /***
113  *
114  * The shutdown action when ExecutionContext stop
115  * former rtc_stopping_entry()
116  *
117  * @param ec_id target ExecutionContext Id
118  *
119  * @return RTC::ReturnCode_t
120  *
121  *
122  */
123  // virtual RTC::ReturnCode_t onShutdown(RTC::UniqueId ec_id);
124 
125  /***
126  *
127  * The activated action (Active state entry action)
128  * former rtc_active_entry()
129  *
130  * @param ec_id target ExecutionContext Id
131  *
132  * @return RTC::ReturnCode_t
133  *
134  *
135  */
136  virtual RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id);
137 
138  /***
139  *
140  * The deactivated action (Active state exit action)
141  * former rtc_active_exit()
142  *
143  * @param ec_id target ExecutionContext Id
144  *
145  * @return RTC::ReturnCode_t
146  *
147  *
148  */
149  virtual RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id);
150 
151  /***
152  *
153  * The execution action that is invoked periodically
154  * former rtc_active_do()
155  *
156  * @param ec_id target ExecutionContext Id
157  *
158  * @return RTC::ReturnCode_t
159  *
160  *
161  */
162  virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id);
163 
164  /***
165  *
166  * The aborting action when main logic error occurred.
167  * former rtc_aborting_entry()
168  *
169  * @param ec_id target ExecutionContext Id
170  *
171  * @return RTC::ReturnCode_t
172  *
173  *
174  */
175  // virtual RTC::ReturnCode_t onAborting(RTC::UniqueId ec_id);
176 
177  /***
178  *
179  * The error action in ERROR state
180  * former rtc_error_do()
181  *
182  * @param ec_id target ExecutionContext Id
183  *
184  * @return RTC::ReturnCode_t
185  *
186  *
187  */
188  // virtual RTC::ReturnCode_t onError(RTC::UniqueId ec_id);
189 
190  /***
191  *
192  * The reset action that is invoked resetting
193  * This is same but different the former rtc_init_entry()
194  *
195  * @param ec_id target ExecutionContext Id
196  *
197  * @return RTC::ReturnCode_t
198  *
199  *
200  */
201  // virtual RTC::ReturnCode_t onReset(RTC::UniqueId ec_id);
202 
203  /***
204  *
205  * The state update action that is invoked after onExecute() action
206  * no corresponding operation exists in OpenRTm-aist-0.2.0
207  *
208  * @param ec_id target ExecutionContext Id
209  *
210  * @return RTC::ReturnCode_t
211  *
212  *
213  */
214  // virtual RTC::ReturnCode_t onStateUpdate(RTC::UniqueId ec_id);
215 
216  /***
217  *
218  * The action that is invoked when execution context's rate is changed
219  * no corresponding operation exists in OpenRTm-aist-0.2.0
220  *
221  * @param ec_id target ExecutionContext Id
222  *
223  * @return RTC::ReturnCode_t
224  *
225  *
226  */
227  // virtual RTC::ReturnCode_t onRateChanged(RTC::UniqueId ec_id);
228 
229 
230  protected:
231  // <rtc-template block="protected_attribute">
232 
233  // </rtc-template>
234 
235  // <rtc-template block="protected_operation">
236 
237  // </rtc-template>
238 
239  // DataInPort declaration
240  // <rtc-template block="inport_declare">
241  TimedShort m_SlideNumberIn;
244  InPort<TimedShort> m_SlideNumberInIn;
245  TimedShort m_EffectNumberIn;
248  InPort<TimedShort> m_EffectNumberInIn;
249  TimedShortSeq m_Pen;
252  InPort<TimedShortSeq> m_PenIn;
253 
254  // </rtc-template>
255 
256 
257  // DataOutPort declaration
258  // <rtc-template block="outport_declare">
259  TimedShort m_SlideNumberOut;
262  OutPort<TimedShort> m_SlideNumberOutOut;
263 
264  // </rtc-template>
265 
266  // CORBA Port declaration
267  // <rtc-template block="corbaport_declare">
268 
269  // </rtc-template>
270 
271  // Service declaration
272  // <rtc-template block="service_declare">
273 
274  // </rtc-template>
275 
276  // Consumer declaration
277  // <rtc-template block="consumer_declare">
278 
279  // </rtc-template>
280 
281  private:
282  std::string file_path;
283  int SlideFileInitialNumber;
284  int SlideNumberInRelative;
285  PowerPointTask *pt;
286  int slidenum;
287 
288 
289  // <rtc-template block="private_attribute">
290 
291  // </rtc-template>
292 
293  // <rtc-template block="private_operation">
294 
295  // </rtc-template>
296 
297 };
298 
299 
300 //コンフィギュレーションパラメータが更新されたときのコールバック
302  : public RTC::ConfigurationSetListener
303 {
304 public:
306  {
307  m_rtc = e_rtc;
308  }
309  void operator()(const coil::Properties& config_set)
310  {
311 
312  m_rtc->ConfigUpdate();
313 
314  }
315  PowerPointControl *m_rtc;
316 
317 };
318 
319 extern "C"
320 {
321  DLL_EXPORT void PowerPointControlInit(RTC::Manager* manager);
322 };
323 
324 #endif // POWERPOINTCONTROL_H