00001 // -*- C++ -*- 00010 #ifndef GUIJOYSTICKCOMP_H 00011 #define GUIJOYSTICKCOMP_H 00012 00013 #include <rtm/Manager.h> 00014 #include <rtm/DataFlowComponentBase.h> 00015 #include <rtm/CorbaPort.h> 00016 #include <rtm/DataInPort.h> 00017 #include <rtm/DataOutPort.h> 00018 #include <rtm/idl/BasicDataTypeSkel.h> 00019 00020 00021 // Service implementation headers 00022 // <rtc-template block="service_impl_h"> 00023 00024 // </rtc-template> 00025 00026 // Service Consumer stub headers 00027 // <rtc-template block="consumer_stub_h"> 00028 00029 // </rtc-template> 00030 00031 using namespace RTC; 00032 00033 00034 class GuiJoystickComp 00035 : public RTC::DataFlowComponentBase 00036 { 00037 public: 00038 GuiJoystickComp(RTC::Manager* manager); 00039 ~GuiJoystickComp(); 00040 00041 // <rtc-template block="public_attribute"> 00042 00043 // </rtc-template> 00044 00045 // <rtc-template block="public_operation"> 00046 void operation_1(void); 00047 void operation_2(void); 00048 00049 // </rtc-template> 00050 00051 // The initialize action (on CREATED->ALIVE transition) 00052 // formaer rtc_init_entry() 00053 // virtual RTC::ReturnCode_t onInitialize(); 00054 00055 // The finalize action (on ALIVE->END transition) 00056 // formaer rtc_exiting_entry() 00057 // virtual RTC::ReturnCode_t onFinalize(); 00058 00059 // The startup action when ExecutionContext startup 00060 // former rtc_starting_entry() 00061 // virtual RTC::ReturnCode_t onStartup(RTC::UniqueId ec_id); 00062 00063 // The shutdown action when ExecutionContext stop 00064 // former rtc_stopping_entry() 00065 // virtual RTC::ReturnCode_t onShutdown(RTC::UniqueId ec_id); 00066 00067 // The activated action (Active state entry action) 00068 // former rtc_active_entry() 00069 // virtual RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id); 00070 00071 // The deactivated action (Active state exit action) 00072 // former rtc_active_exit() 00073 // virtual RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id); 00074 00075 // The execution action that is invoked periodically 00076 // former rtc_active_do() 00077 // virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id); 00078 00079 // The aborting action when main logic error occurred. 00080 // former rtc_aborting_entry() 00081 // virtual RTC::ReturnCode_t onAborting(RTC::UniqueId ec_id); 00082 00083 // The error action in ERROR state 00084 // former rtc_error_do() 00085 // virtual RTC::ReturnCode_t onError(RTC::UniqueId ec_id); 00086 00087 // The reset action that is invoked resetting 00088 // This is same but different the former rtc_init_entry() 00089 // virtual RTC::ReturnCode_t onReset(RTC::UniqueId ec_id); 00090 00091 // The state update action that is invoked after onExecute() action 00092 // no corresponding operation exists in OpenRTm-aist-0.2.0 00093 // virtual RTC::ReturnCode_t onStateUpdate(RTC::UniqueId ec_id); 00094 00095 // The action that is invoked when execution context's rate is changed 00096 // no corresponding operation exists in OpenRTm-aist-0.2.0 00097 // virtual RTC::ReturnCode_t onRateChanged(RTC::UniqueId ec_id); 00098 00099 00100 protected: 00101 // <rtc-template block="protected_attribute"> 00102 00103 // </rtc-template> 00104 00105 // <rtc-template block="protected_operation"> 00106 00107 // </rtc-template> 00108 00109 00110 // DataInPort declaration 00111 // <rtc-template block="inport_declare"> 00112 00113 // </rtc-template> 00114 00115 00116 // DataOutPort declaration 00117 // <rtc-template block="outport_declare"> 00118 TimedChar m_Horizon; 00119 OutPort<TimedChar> m_HorizonOut; 00120 TimedChar m_Vertical; 00121 OutPort<TimedChar> m_VerticalOut; 00122 00123 // </rtc-template> 00124 00125 // CORBA Port declaration 00126 // <rtc-template block="corbaport_declare"> 00127 00128 // </rtc-template> 00129 00130 // Service declaration 00131 // <rtc-template block="service_declare"> 00132 00133 // </rtc-template> 00134 00135 // Consumer declaration 00136 // <rtc-template block="consumer_declare"> 00137 00138 // </rtc-template> 00139 00140 private: 00141 int dummy; 00142 // <rtc-template block="private_attribute"> 00143 int attribute_1; 00144 int attribute_2; 00145 int attribute_3; 00146 00147 // </rtc-template> 00148 00149 // <rtc-template block="private_operation"> 00150 00151 // </rtc-template> 00152 00153 }; 00154 00155 00156 extern "C" 00157 { 00158 void GuiJoystickCompInit(RTC::Manager* manager); 00159 }; 00160 00161 #endif // GUIJOYSTICKCOMP_H