00001 // This file is generated by omniidl (C++ backend)- omniORB_4_1. Do not edit. 00002 00003 #include "BotArmControlSK.hh" 00004 #include <omniORB4/IOP_S.h> 00005 #include <omniORB4/IOP_C.h> 00006 #include <omniORB4/callDescriptor.h> 00007 #include <omniORB4/callHandle.h> 00008 #include <omniORB4/objTracker.h> 00009 00010 00011 OMNI_USING_NAMESPACE(omni) 00012 00013 static const char* _0RL_library_version = omniORB_4_1; 00014 00015 00016 00017 BotArmControl_ptr BotArmControl_Helper::_nil() { 00018 return ::BotArmControl::_nil(); 00019 } 00020 00021 ::CORBA::Boolean BotArmControl_Helper::is_nil(::BotArmControl_ptr p) { 00022 return ::CORBA::is_nil(p); 00023 00024 } 00025 00026 void BotArmControl_Helper::release(::BotArmControl_ptr p) { 00027 ::CORBA::release(p); 00028 } 00029 00030 void BotArmControl_Helper::marshalObjRef(::BotArmControl_ptr obj, cdrStream& s) { 00031 ::BotArmControl::_marshalObjRef(obj, s); 00032 } 00033 00034 BotArmControl_ptr BotArmControl_Helper::unmarshalObjRef(cdrStream& s) { 00035 return ::BotArmControl::_unmarshalObjRef(s); 00036 } 00037 00038 void BotArmControl_Helper::duplicate(::BotArmControl_ptr obj) { 00039 if( obj && !obj->_NP_is_nil() ) omni::duplicateObjRef(obj); 00040 } 00041 00042 BotArmControl_ptr 00043 BotArmControl::_duplicate(::BotArmControl_ptr obj) 00044 { 00045 if( obj && !obj->_NP_is_nil() ) omni::duplicateObjRef(obj); 00046 return obj; 00047 } 00048 00049 BotArmControl_ptr 00050 BotArmControl::_narrow(::CORBA::Object_ptr obj) 00051 { 00052 if( !obj || obj->_NP_is_nil() || obj->_NP_is_pseudo() ) return _nil(); 00053 _ptr_type e = (_ptr_type) obj->_PR_getobj()->_realNarrow(_PD_repoId); 00054 return e ? e : _nil(); 00055 } 00056 00057 00058 BotArmControl_ptr 00059 BotArmControl::_unchecked_narrow(::CORBA::Object_ptr obj) 00060 { 00061 if( !obj || obj->_NP_is_nil() || obj->_NP_is_pseudo() ) return _nil(); 00062 _ptr_type e = (_ptr_type) obj->_PR_getobj()->_uncheckedNarrow(_PD_repoId); 00063 return e ? e : _nil(); 00064 } 00065 00066 BotArmControl_ptr 00067 BotArmControl::_nil() 00068 { 00069 #ifdef OMNI_UNLOADABLE_STUBS 00070 static _objref_BotArmControl _the_nil_obj; 00071 return &_the_nil_obj; 00072 #else 00073 static _objref_BotArmControl* _the_nil_ptr = 0; 00074 if( !_the_nil_ptr ) { 00075 omni::nilRefLock().lock(); 00076 if( !_the_nil_ptr ) { 00077 _the_nil_ptr = new _objref_BotArmControl; 00078 registerNilCorbaObject(_the_nil_ptr); 00079 } 00080 omni::nilRefLock().unlock(); 00081 } 00082 return _the_nil_ptr; 00083 #endif 00084 } 00085 00086 const char* BotArmControl::_PD_repoId = "IDL:BotArmControl:1.0"; 00087 00088 00089 _objref_BotArmControl::~_objref_BotArmControl() { 00090 00091 } 00092 00093 00094 _objref_BotArmControl::_objref_BotArmControl(omniIOR* ior, omniIdentity* id) : 00095 omniObjRef(::BotArmControl::_PD_repoId, ior, id, 1) 00096 00097 00098 { 00099 _PR_setobj(this); 00100 } 00101 00102 void* 00103 _objref_BotArmControl::_ptrToObjRef(const char* id) 00104 { 00105 if( id == ::BotArmControl::_PD_repoId ) 00106 return (::BotArmControl_ptr) this; 00107 00108 if( id == ::CORBA::Object::_PD_repoId ) 00109 return (::CORBA::Object_ptr) this; 00110 00111 if( omni::strMatch(id, ::BotArmControl::_PD_repoId) ) 00112 return (::BotArmControl_ptr) this; 00113 00114 if( omni::strMatch(id, ::CORBA::Object::_PD_repoId) ) 00115 return (::CORBA::Object_ptr) this; 00116 00117 return 0; 00118 } 00119 00120 // Proxy call descriptor class. Mangled signature: 00121 // _cshort_i_cshort 00122 class _0RL_cd_26cb7021134ed319_00000000 00123 : public omniCallDescriptor 00124 { 00125 public: 00126 inline _0RL_cd_26cb7021134ed319_00000000(LocalCallFn lcfn,const char* op_,size_t oplen,_CORBA_Boolean upcall=0): 00127 omniCallDescriptor(lcfn, op_, oplen, 0, 0, 0, upcall) 00128 { 00129 00130 } 00131 00132 void marshalArguments(cdrStream&); 00133 void unmarshalArguments(cdrStream&); 00134 00135 void unmarshalReturnedValues(cdrStream&); 00136 void marshalReturnedValues(cdrStream&); 00137 00138 00139 ::CORBA::Short arg_0; 00140 ::CORBA::Short result; 00141 }; 00142 00143 void _0RL_cd_26cb7021134ed319_00000000::marshalArguments(cdrStream& _n) 00144 { 00145 arg_0 >>= _n; 00146 00147 } 00148 00149 void _0RL_cd_26cb7021134ed319_00000000::unmarshalArguments(cdrStream& _n) 00150 { 00151 (::CORBA::Short&)arg_0 <<= _n; 00152 00153 } 00154 00155 void _0RL_cd_26cb7021134ed319_00000000::marshalReturnedValues(cdrStream& _n) 00156 { 00157 result >>= _n; 00158 00159 } 00160 00161 void _0RL_cd_26cb7021134ed319_00000000::unmarshalReturnedValues(cdrStream& _n) 00162 { 00163 (::CORBA::Short&)result <<= _n; 00164 00165 } 00166 00167 // Local call call-back function. 00168 static void 00169 _0RL_lcfn_26cb7021134ed319_10000000(omniCallDescriptor* cd, omniServant* svnt) 00170 { 00171 _0RL_cd_26cb7021134ed319_00000000* tcd = (_0RL_cd_26cb7021134ed319_00000000*)cd; 00172 _impl_BotArmControl* impl = (_impl_BotArmControl*) svnt->_ptrToInterface(BotArmControl::_PD_repoId); 00173 tcd->result = impl->getEncoder(tcd->arg_0); 00174 00175 00176 } 00177 00178 ::CORBA::Short _objref_BotArmControl::getEncoder(::CORBA::Short motor) 00179 { 00180 _0RL_cd_26cb7021134ed319_00000000 _call_desc(_0RL_lcfn_26cb7021134ed319_10000000, "getEncoder", 11); 00181 _call_desc.arg_0 = motor; 00182 00183 _invoke(_call_desc); 00184 return _call_desc.result; 00185 00186 00187 } 00188 // Proxy call descriptor class. Mangled signature: 00189 // void_i_cshort_i_cfloat 00190 class _0RL_cd_26cb7021134ed319_20000000 00191 : public omniCallDescriptor 00192 { 00193 public: 00194 inline _0RL_cd_26cb7021134ed319_20000000(LocalCallFn lcfn,const char* op_,size_t oplen,_CORBA_Boolean upcall=0): 00195 omniCallDescriptor(lcfn, op_, oplen, 0, 0, 0, upcall) 00196 { 00197 00198 } 00199 00200 void marshalArguments(cdrStream&); 00201 void unmarshalArguments(cdrStream&); 00202 00203 00204 00205 ::CORBA::Short arg_0; 00206 ::CORBA::Float arg_1; 00207 }; 00208 00209 void _0RL_cd_26cb7021134ed319_20000000::marshalArguments(cdrStream& _n) 00210 { 00211 arg_0 >>= _n; 00212 arg_1 >>= _n; 00213 00214 } 00215 00216 void _0RL_cd_26cb7021134ed319_20000000::unmarshalArguments(cdrStream& _n) 00217 { 00218 (::CORBA::Short&)arg_0 <<= _n; 00219 (::CORBA::Float&)arg_1 <<= _n; 00220 00221 } 00222 00223 // Local call call-back function. 00224 static void 00225 _0RL_lcfn_26cb7021134ed319_30000000(omniCallDescriptor* cd, omniServant* svnt) 00226 { 00227 _0RL_cd_26cb7021134ed319_20000000* tcd = (_0RL_cd_26cb7021134ed319_20000000*)cd; 00228 _impl_BotArmControl* impl = (_impl_BotArmControl*) svnt->_ptrToInterface(BotArmControl::_PD_repoId); 00229 impl->setMotor(tcd->arg_0, tcd->arg_1); 00230 00231 00232 } 00233 00234 void _objref_BotArmControl::setMotor(::CORBA::Short i, ::CORBA::Float val) 00235 { 00236 _0RL_cd_26cb7021134ed319_20000000 _call_desc(_0RL_lcfn_26cb7021134ed319_30000000, "setMotor", 9); 00237 _call_desc.arg_0 = i; 00238 _call_desc.arg_1 = val; 00239 00240 _invoke(_call_desc); 00241 00242 00243 00244 } 00245 // Proxy call descriptor class. Mangled signature: 00246 // void 00247 class _0RL_cd_26cb7021134ed319_40000000 00248 : public omniCallDescriptor 00249 { 00250 public: 00251 inline _0RL_cd_26cb7021134ed319_40000000(LocalCallFn lcfn,const char* op_,size_t oplen,_CORBA_Boolean upcall=0): 00252 omniCallDescriptor(lcfn, op_, oplen, 0, 0, 0, upcall) 00253 { 00254 00255 } 00256 00257 00258 00259 00260 00261 }; 00262 00263 // Local call call-back function. 00264 static void 00265 _0RL_lcfn_26cb7021134ed319_50000000(omniCallDescriptor*, omniServant* svnt) 00266 { 00267 00268 _impl_BotArmControl* impl = (_impl_BotArmControl*) svnt->_ptrToInterface(BotArmControl::_PD_repoId); 00269 impl->shutdown(); 00270 00271 00272 } 00273 00274 void _objref_BotArmControl::shutdown() 00275 { 00276 _0RL_cd_26cb7021134ed319_40000000 _call_desc(_0RL_lcfn_26cb7021134ed319_50000000, "shutdown", 9); 00277 00278 00279 _invoke(_call_desc); 00280 00281 00282 00283 } 00284 _pof_BotArmControl::~_pof_BotArmControl() {} 00285 00286 00287 omniObjRef* 00288 _pof_BotArmControl::newObjRef(omniIOR* ior, omniIdentity* id) 00289 { 00290 return new ::_objref_BotArmControl(ior, id); 00291 } 00292 00293 00294 ::CORBA::Boolean 00295 _pof_BotArmControl::is_a(const char* id) const 00296 { 00297 if( omni::ptrStrMatch(id, ::BotArmControl::_PD_repoId) ) 00298 return 1; 00299 00300 return 0; 00301 } 00302 00303 const _pof_BotArmControl _the_pof_BotArmControl; 00304 00305 _impl_BotArmControl::~_impl_BotArmControl() {} 00306 00307 00308 ::CORBA::Boolean 00309 _impl_BotArmControl::_dispatch(omniCallHandle& _handle) 00310 { 00311 const char* op = _handle.operation_name(); 00312 00313 if( omni::strMatch(op, "getEncoder") ) { 00314 00315 _0RL_cd_26cb7021134ed319_00000000 _call_desc(_0RL_lcfn_26cb7021134ed319_10000000, "getEncoder", 11, 1); 00316 00317 _handle.upcall(this,_call_desc); 00318 return 1; 00319 } 00320 00321 if( omni::strMatch(op, "setMotor") ) { 00322 00323 _0RL_cd_26cb7021134ed319_20000000 _call_desc(_0RL_lcfn_26cb7021134ed319_30000000, "setMotor", 9, 1); 00324 00325 _handle.upcall(this,_call_desc); 00326 return 1; 00327 } 00328 00329 if( omni::strMatch(op, "shutdown") ) { 00330 00331 _0RL_cd_26cb7021134ed319_40000000 _call_desc(_0RL_lcfn_26cb7021134ed319_50000000, "shutdown", 9, 1); 00332 00333 _handle.upcall(this,_call_desc); 00334 return 1; 00335 } 00336 00337 00338 return 0; 00339 } 00340 00341 void* 00342 _impl_BotArmControl::_ptrToInterface(const char* id) 00343 { 00344 if( id == ::BotArmControl::_PD_repoId ) 00345 return (::_impl_BotArmControl*) this; 00346 00347 if( id == ::CORBA::Object::_PD_repoId ) 00348 return (void*) 1; 00349 00350 if( omni::strMatch(id, ::BotArmControl::_PD_repoId) ) 00351 return (::_impl_BotArmControl*) this; 00352 00353 if( omni::strMatch(id, ::CORBA::Object::_PD_repoId) ) 00354 return (void*) 1; 00355 return 0; 00356 } 00357 00358 const char* 00359 _impl_BotArmControl::_mostDerivedRepoId() 00360 { 00361 return ::BotArmControl::_PD_repoId; 00362 } 00363 00364 POA_BotArmControl::~POA_BotArmControl() {} 00365