00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef OPENR_STUBGEN
00018 #define OPENR_STUBGEN
00019 #endif
00020
00021 #if defined(__GNUC__)
00022 #include <apsys.h>
00023 #endif
00024 #include <MCOOP.h>
00025 #include <ObjectEntryTable.h>
00026 #include <OPENR/stub_macro.h>
00027 #include "def.h"
00028 #include "entry.h"
00029 #include "MMComboStub.h"
00030
00031
00032
00033
00034 #include "MMCombo.h"
00035 MMCombo Self;
00036
00037
00038
00039
00040 StubFuncDefine_Basic(Init)
00041 StubFuncDefine_Basic(Start)
00042 StubFuncDefine_Basic(Stop)
00043 StubFuncDefine_Basic(Destroy)
00044 StubFuncDefine_Control_nofunc(0)
00045 StubFuncDefine_Ready(0, ReadyRegisterWorldState)
00046 StubFuncDefine_Control_nofunc(1)
00047 StubFuncDefine_Ready(1, ReadyRegisterMotionManager)
00048 StubFuncDefine_Control_nofunc(2)
00049 StubFuncDefine_Ready(2, ReadyRegisterEventTranslatorQueue)
00050 StubFuncDefine_Control_nofunc(3)
00051 StubFuncDefine_Ready(3, ReadySendJoints)
00052 StubFuncDefine_Control_nofunc(4)
00053 StubFuncDefine_Ready_nofunc(4)
00054 StubFuncDefine_Control_nofunc(5)
00055 StubFuncDefine_Ready_nofunc(5)
00056 StubFuncDefine_Control_nofunc(6)
00057 StubFuncDefine_Ready(6, RPOPENR_ready)
00058 StubFuncDefine_Connect_nofunc(0)
00059 StubFuncDefine_Notify(0, GotWorldState)
00060 StubFuncDefine_Connect_nofunc(1)
00061 StubFuncDefine_Notify(1, GotMotionManager)
00062 StubFuncDefine_Connect_nofunc(2)
00063 StubFuncDefine_Notify(2, GotEventTranslatorQueue)
00064 StubFuncDefine_Connect_nofunc(3)
00065 StubFuncDefine_Notify(3, GotSensorFrame)
00066 StubFuncDefine_Connect_nofunc(4)
00067 StubFuncDefine_Notify(4, GotImage)
00068 StubFuncDefine_Connect_nofunc(5)
00069 StubFuncDefine_Notify(5, GotAudio)
00070 StubFuncDefine_Connect_nofunc(6)
00071 StubFuncDefine_Notify(6, GotMotionMsg)
00072 StubFuncDefine_Connect_nofunc(7)
00073 StubFuncDefine_Notify(7, GotSoundManager)
00074 StubFuncDefine_Connect_nofunc(8)
00075 StubFuncDefine_Notify(8, RPOPENR_notify)
00076
00077
00078
00079
00080 extern "C" void
00081 _GotPowerEvent(void* msg)
00082 {
00083 Self.GotPowerEvent(msg);
00084 Return();
00085 }
00086
00087 extern "C" void
00088 _ListenCont(void* msg)
00089 {
00090 Self.ListenCont(msg);
00091 Return();
00092 }
00093
00094 extern "C" void
00095 _BindCont(void* msg)
00096 {
00097 Self.BindCont(msg);
00098 Return();
00099 }
00100
00101 extern "C" void
00102 _ConnectCont(void* msg)
00103 {
00104 Self.ConnectCont(msg);
00105 Return();
00106 }
00107
00108 extern "C" void
00109 _SendCont(void* msg)
00110 {
00111 Self.SendCont(msg);
00112 Return();
00113 }
00114
00115 extern "C" void
00116 _ReceiveCont(void* msg)
00117 {
00118 Self.ReceiveCont(msg);
00119 Return();
00120 }
00121
00122 extern "C" void
00123 _CloseCont(void* msg)
00124 {
00125 Self.CloseCont(msg);
00126 Return();
00127 }
00128
00129
00130
00131
00132
00133 #if defined(__GNUC__)
00134 GEN_ENTRY(_hookstub0, _Init);
00135 GEN_ENTRY(_hookstub1, _Start);
00136 GEN_ENTRY(_hookstub2, _Stop);
00137 GEN_ENTRY(_hookstub3, _Destroy);
00138 GEN_ENTRY(_controlstub0, _Control0);
00139 GEN_ENTRY(_readystub0, _Ready0);
00140 GEN_ENTRY(_controlstub1, _Control1);
00141 GEN_ENTRY(_readystub1, _Ready1);
00142 GEN_ENTRY(_controlstub2, _Control2);
00143 GEN_ENTRY(_readystub2, _Ready2);
00144 GEN_ENTRY(_controlstub3, _Control3);
00145 GEN_ENTRY(_readystub3, _Ready3);
00146 GEN_ENTRY(_controlstub4, _Control4);
00147 GEN_ENTRY(_readystub4, _Ready4);
00148 GEN_ENTRY(_controlstub5, _Control5);
00149 GEN_ENTRY(_readystub5, _Ready5);
00150 GEN_ENTRY(_controlstub6, _Control6);
00151 GEN_ENTRY(_readystub6, _Ready6);
00152 GEN_ENTRY(_connectstub0, _Connect0);
00153 GEN_ENTRY(_notifystub0, _Notify0);
00154 GEN_ENTRY(_connectstub1, _Connect1);
00155 GEN_ENTRY(_notifystub1, _Notify1);
00156 GEN_ENTRY(_connectstub2, _Connect2);
00157 GEN_ENTRY(_notifystub2, _Notify2);
00158 GEN_ENTRY(_connectstub3, _Connect3);
00159 GEN_ENTRY(_notifystub3, _Notify3);
00160 GEN_ENTRY(_connectstub4, _Connect4);
00161 GEN_ENTRY(_notifystub4, _Notify4);
00162 GEN_ENTRY(_connectstub5, _Connect5);
00163 GEN_ENTRY(_notifystub5, _Notify5);
00164 GEN_ENTRY(_connectstub6, _Connect6);
00165 GEN_ENTRY(_notifystub6, _Notify6);
00166 GEN_ENTRY(_connectstub7, _Connect7);
00167 GEN_ENTRY(_notifystub7, _Notify7);
00168 GEN_ENTRY(_connectstub8, _Connect8);
00169 GEN_ENTRY(_notifystub8, _Notify8);
00170 GEN_ENTRY(_GotPowerEventstub, _GotPowerEvent);
00171 GEN_ENTRY(_ListenContstub, _ListenCont);
00172 GEN_ENTRY(_BindContstub, _BindCont);
00173 GEN_ENTRY(_ConnectContstub, _ConnectCont);
00174 GEN_ENTRY(_SendContstub, _SendCont);
00175 GEN_ENTRY(_ReceiveContstub, _ReceiveCont);
00176 GEN_ENTRY(_CloseContstub, _CloseCont);
00177 GEN_ENTRY(PrologueEntry, Prologue);
00178
00179 ObjectEntry ObjectEntryTable[] = {
00180 {Entry_Hook[0], (Entry)_hookstub0},
00181 {Entry_Hook[1], (Entry)_hookstub1},
00182 {Entry_Hook[2], (Entry)_hookstub2},
00183 {Entry_Hook[3], (Entry)_hookstub3},
00184 {Entry_Control[0], (Entry)_controlstub0},
00185 {Entry_Ready[0], (Entry)_readystub0},
00186 {Entry_Control[1], (Entry)_controlstub1},
00187 {Entry_Ready[1], (Entry)_readystub1},
00188 {Entry_Control[2], (Entry)_controlstub2},
00189 {Entry_Ready[2], (Entry)_readystub2},
00190 {Entry_Control[3], (Entry)_controlstub3},
00191 {Entry_Ready[3], (Entry)_readystub3},
00192 {Entry_Control[4], (Entry)_controlstub4},
00193 {Entry_Ready[4], (Entry)_readystub4},
00194 {Entry_Control[5], (Entry)_controlstub5},
00195 {Entry_Ready[5], (Entry)_readystub5},
00196 {Entry_Control[6], (Entry)_controlstub6},
00197 {Entry_Ready[6], (Entry)_readystub6},
00198 {Entry_Connect[0], (Entry)_connectstub0},
00199 {Entry_Notify[0], (Entry)_notifystub0},
00200 {Entry_Connect[1], (Entry)_connectstub1},
00201 {Entry_Notify[1], (Entry)_notifystub1},
00202 {Entry_Connect[2], (Entry)_connectstub2},
00203 {Entry_Notify[2], (Entry)_notifystub2},
00204 {Entry_Connect[3], (Entry)_connectstub3},
00205 {Entry_Notify[3], (Entry)_notifystub3},
00206 {Entry_Connect[4], (Entry)_connectstub4},
00207 {Entry_Notify[4], (Entry)_notifystub4},
00208 {Entry_Connect[5], (Entry)_connectstub5},
00209 {Entry_Notify[5], (Entry)_notifystub5},
00210 {Entry_Connect[6], (Entry)_connectstub6},
00211 {Entry_Notify[6], (Entry)_notifystub6},
00212 {Entry_Connect[7], (Entry)_connectstub7},
00213 {Entry_Notify[7], (Entry)_notifystub7},
00214 {Entry_Connect[8], (Entry)_connectstub8},
00215 {Entry_Notify[8], (Entry)_notifystub8},
00216 {Extra_Entry[0], (Entry)_GotPowerEventstub},
00217 {Extra_Entry[1], (Entry)_ListenContstub},
00218 {Extra_Entry[2], (Entry)_BindContstub},
00219 {Extra_Entry[3], (Entry)_ConnectContstub},
00220 {Extra_Entry[4], (Entry)_SendContstub},
00221 {Extra_Entry[5], (Entry)_ReceiveContstub},
00222 {Extra_Entry[6], (Entry)_CloseContstub},
00223 {UNDEF, (Entry) ENTRY_UNDEF}
00224 };
00225 #else
00226
00227
00228
00229
00230 _Hook _hook[numOfHook] = { _Hook(Init), _Hook(Start), _Hook(Stop), _Hook(Destroy) };
00231 _Control _control[numOfSubject] = { _Control(0), _Control(1), _Control(2), _Control(3), _Control(4), _Control(5), _Control(6) };
00232 _Ready _ready [numOfSubject] = { _Ready(0), _Ready(1), _Ready(2), _Ready(3), _Ready(4), _Ready(5), _Ready(6) };
00233 _Connect _connect[numOfObserver] = { _Connect(0), _Connect(1), _Connect(2), _Connect(3), _Connect(4), _Connect(5), _Connect(6), _Connect(7), _Connect(8) };
00234 _Notify _notify [numOfObserver] = { _Notify(0), _Notify(1), _Notify(2), _Notify(3), _Notify(4), _Notify(5), _Notify(6), _Notify(7), _Notify(8) };
00235
00236 ObjectEntry ObjectEntryTable[] = {
00237 {Entry_Hook[0], (Entry) _Hook(Init)},
00238 {Entry_Hook[1], (Entry) _Hook(Start)},
00239 {Entry_Hook[2], (Entry) _Hook(Stop)},
00240 {Entry_Hook[3], (Entry) _Hook(Destroy)},
00241 {Entry_Control[0], (Entry) _Control(0)},
00242 {Entry_Control[1], (Entry) _Control(1)},
00243 {Entry_Control[2], (Entry) _Control(2)},
00244 {Entry_Control[3], (Entry) _Control(3)},
00245 {Entry_Control[4], (Entry) _Control(4)},
00246 {Entry_Control[5], (Entry) _Control(5)},
00247 {Entry_Control[6], (Entry) _Control(6)},
00248 {Entry_Ready[0], (Entry) _Ready(0)},
00249 {Entry_Ready[1], (Entry) _Ready(1)},
00250 {Entry_Ready[2], (Entry) _Ready(2)},
00251 {Entry_Ready[3], (Entry) _Ready(3)},
00252 {Entry_Ready[4], (Entry) _Ready(4)},
00253 {Entry_Ready[5], (Entry) _Ready(5)},
00254 {Entry_Ready[6], (Entry) _Ready(6)},
00255 {Entry_Connect[0], (Entry) _Connect(0)},
00256 {Entry_Connect[1], (Entry) _Connect(1)},
00257 {Entry_Connect[2], (Entry) _Connect(2)},
00258 {Entry_Connect[3], (Entry) _Connect(3)},
00259 {Entry_Connect[4], (Entry) _Connect(4)},
00260 {Entry_Connect[5], (Entry) _Connect(5)},
00261 {Entry_Connect[6], (Entry) _Connect(6)},
00262 {Entry_Connect[7], (Entry) _Connect(7)},
00263 {Entry_Connect[8], (Entry) _Connect(8)},
00264 {Entry_Notify[0], (Entry) _Notify(0)},
00265 {Entry_Notify[1], (Entry) _Notify(1)},
00266 {Entry_Notify[2], (Entry) _Notify(2)},
00267 {Entry_Notify[3], (Entry) _Notify(3)},
00268 {Entry_Notify[4], (Entry) _Notify(4)},
00269 {Entry_Notify[5], (Entry) _Notify(5)},
00270 {Entry_Notify[6], (Entry) _Notify(6)},
00271 {Entry_Notify[7], (Entry) _Notify(7)},
00272 {Entry_Notify[8], (Entry) _Notify(8)},
00273 {Extra_Entry[0], (Entry) _GotPowerEvent},
00274 {Extra_Entry[1], (Entry) _ListenCont},
00275 {Extra_Entry[2], (Entry) _BindCont},
00276 {Extra_Entry[3], (Entry) _ConnectCont},
00277 {Extra_Entry[4], (Entry) _SendCont},
00278 {Extra_Entry[5], (Entry) _ReceiveCont},
00279 {Extra_Entry[6], (Entry) _CloseCont},
00280 {UNDEF, (Entry) ENTRY_UNDEF}
00281 };
00282 #endif