00001 // ********************************************************************** 00002 // 00003 // Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved. 00004 // 00005 // This copy of Ice is licensed to you under the terms described in the 00006 // ICE_LICENSE file included in this distribution. 00007 // 00008 // ********************************************************************** 00009 00010 // Ice version 3.3.1 00011 // Generated from file `Scorbot.ice' 00012 00013 #include <Scorbot.ice.H> 00014 #include <Ice/LocalException.h> 00015 #include <Ice/ObjectFactory.h> 00016 #include <Ice/BasicStream.h> 00017 #include <IceUtil/Iterator.h> 00018 #include <IceUtil/ScopedArray.h> 00019 00020 #ifndef ICE_IGNORE_VERSION 00021 # if ICE_INT_VERSION / 100 != 303 00022 # error Ice version mismatch! 00023 # endif 00024 # if ICE_INT_VERSION % 100 > 50 00025 # error Beta header file detected 00026 # endif 00027 # if ICE_INT_VERSION % 100 < 1 00028 # error Ice patch level mismatch! 00029 # endif 00030 #endif 00031 00032 static const ::std::string __ScorbotIce__Scorbot__setJoint_name = "setJoint"; 00033 00034 static const ::std::string __ScorbotIce__Scorbot__setJoints_name = "setJoints"; 00035 00036 static const ::std::string __ScorbotIce__Scorbot__getEncoder_name = "getEncoder"; 00037 00038 static const ::std::string __ScorbotIce__Scorbot__getEncoders_name = "getEncoders"; 00039 00040 static const ::std::string __ScorbotIce__Scorbot__setEnabled_name = "setEnabled"; 00041 00042 static const ::std::string __ScorbotIce__Scorbot__resetEncoders_name = "resetEncoders"; 00043 00044 static const ::std::string __ScorbotIce__Scorbot__getPWM_name = "getPWM"; 00045 00046 static const ::std::string __ScorbotIce__Scorbot__getPWMs_name = "getPWMs"; 00047 00048 static const ::std::string __ScorbotIce__Scorbot__setControlParams_name = "setControlParams"; 00049 00050 static const ::std::string __ScorbotIce__Scorbot__getPIDVals_name = "getPIDVals"; 00051 00052 static const ::std::string __ScorbotIce__Scorbot__getTuningVals_name = "getTuningVals"; 00053 00054 static const ::std::string __ScorbotIce__Scorbot__setGravityParameters_name = "setGravityParameters"; 00055 00056 static const ::std::string __ScorbotIce__Scorbot__getGravityParameters_name = "getGravityParameters"; 00057 00058 ::Ice::Object* IceInternal::upCast(::ScorbotIce::Scorbot* p) { return p; } 00059 ::IceProxy::Ice::Object* IceInternal::upCast(::IceProxy::ScorbotIce::Scorbot* p) { return p; } 00060 00061 void 00062 ScorbotIce::__read(::IceInternal::BasicStream* __is, ::ScorbotIce::ScorbotPrx& v) 00063 { 00064 ::Ice::ObjectPrx proxy; 00065 __is->read(proxy); 00066 if(!proxy) 00067 { 00068 v = 0; 00069 } 00070 else 00071 { 00072 v = new ::IceProxy::ScorbotIce::Scorbot; 00073 v->__copyFrom(proxy); 00074 } 00075 } 00076 00077 void 00078 ScorbotIce::__write(::IceInternal::BasicStream* __os, ::ScorbotIce::JointType v) 00079 { 00080 __os->write(static_cast< ::Ice::Byte>(v), 7); 00081 } 00082 00083 void 00084 ScorbotIce::__read(::IceInternal::BasicStream* __is, ::ScorbotIce::JointType& v) 00085 { 00086 ::Ice::Byte val; 00087 __is->read(val, 7); 00088 v = static_cast< ::ScorbotIce::JointType>(val); 00089 } 00090 00091 void 00092 ScorbotIce::__writeencoderValsType(::IceInternal::BasicStream* __os, const ::ScorbotIce::encoderValsType& v) 00093 { 00094 __os->writeSize(::Ice::Int(v.size())); 00095 ::ScorbotIce::encoderValsType::const_iterator p; 00096 for(p = v.begin(); p != v.end(); ++p) 00097 { 00098 ::ScorbotIce::__write(__os, p->first); 00099 __os->write(p->second); 00100 } 00101 } 00102 00103 void 00104 ScorbotIce::__readencoderValsType(::IceInternal::BasicStream* __is, ::ScorbotIce::encoderValsType& v) 00105 { 00106 ::Ice::Int sz; 00107 __is->readSize(sz); 00108 while(sz--) 00109 { 00110 ::std::pair<const ::ScorbotIce::JointType, ::Ice::Int> pair; 00111 ::ScorbotIce::__read(__is, const_cast< ::ScorbotIce::JointType&>(pair.first)); 00112 ::ScorbotIce::encoderValsType::iterator __i = v.insert(v.end(), pair); 00113 __is->read(__i->second); 00114 } 00115 } 00116 00117 void 00118 ScorbotIce::__writepwmValsType(::IceInternal::BasicStream* __os, const ::ScorbotIce::pwmValsType& v) 00119 { 00120 __os->writeSize(::Ice::Int(v.size())); 00121 ::ScorbotIce::pwmValsType::const_iterator p; 00122 for(p = v.begin(); p != v.end(); ++p) 00123 { 00124 ::ScorbotIce::__write(__os, p->first); 00125 __os->write(p->second); 00126 } 00127 } 00128 00129 void 00130 ScorbotIce::__readpwmValsType(::IceInternal::BasicStream* __is, ::ScorbotIce::pwmValsType& v) 00131 { 00132 ::Ice::Int sz; 00133 __is->readSize(sz); 00134 while(sz--) 00135 { 00136 ::std::pair<const ::ScorbotIce::JointType, ::Ice::Float> pair; 00137 ::ScorbotIce::__read(__is, const_cast< ::ScorbotIce::JointType&>(pair.first)); 00138 ::ScorbotIce::pwmValsType::iterator __i = v.insert(v.end(), pair); 00139 __is->read(__i->second); 00140 } 00141 } 00142 00143 void 00144 IceProxy::ScorbotIce::Scorbot::setJoint(::ScorbotIce::JointType joint, ::Ice::Int encoderPos, ::Ice::Int timeMS, const ::Ice::Context* __ctx) 00145 { 00146 int __cnt = 0; 00147 while(true) 00148 { 00149 ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase; 00150 try 00151 { 00152 #if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug 00153 IceUtil::DummyBCC dummy; 00154 #endif 00155 __delBase = __getDelegate(false); 00156 ::IceDelegate::ScorbotIce::Scorbot* __del = dynamic_cast< ::IceDelegate::ScorbotIce::Scorbot*>(__delBase.get()); 00157 __del->setJoint(joint, encoderPos, timeMS, __ctx); 00158 return; 00159 } 00160 catch(const ::IceInternal::LocalExceptionWrapper& __ex) 00161 { 00162 __handleExceptionWrapper(__delBase, __ex, 0); 00163 } 00164 catch(const ::Ice::LocalException& __ex) 00165 { 00166 __handleException(__delBase, __ex, 0, __cnt); 00167 } 00168 } 00169 } 00170 00171 void 00172 IceProxy::ScorbotIce::Scorbot::setJoints(const ::ScorbotIce::encoderValsType& pos, ::Ice::Int timeMS, const ::Ice::Context* __ctx) 00173 { 00174 int __cnt = 0; 00175 while(true) 00176 { 00177 ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase; 00178 try 00179 { 00180 #if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug 00181 IceUtil::DummyBCC dummy; 00182 #endif 00183 __delBase = __getDelegate(false); 00184 ::IceDelegate::ScorbotIce::Scorbot* __del = dynamic_cast< ::IceDelegate::ScorbotIce::Scorbot*>(__delBase.get()); 00185 __del->setJoints(pos, timeMS, __ctx); 00186 return; 00187 } 00188 catch(const ::IceInternal::LocalExceptionWrapper& __ex) 00189 { 00190 __handleExceptionWrapper(__delBase, __ex, 0); 00191 } 00192 catch(const ::Ice::LocalException& __ex) 00193 { 00194 __handleException(__delBase, __ex, 0, __cnt); 00195 } 00196 } 00197 } 00198 00199 ::Ice::Int 00200 IceProxy::ScorbotIce::Scorbot::getEncoder(::ScorbotIce::JointType joint, const ::Ice::Context* __ctx) 00201 { 00202 int __cnt = 0; 00203 while(true) 00204 { 00205 ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase; 00206 try 00207 { 00208 #if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug 00209 IceUtil::DummyBCC dummy; 00210 #endif 00211 __checkTwowayOnly(__ScorbotIce__Scorbot__getEncoder_name); 00212 __delBase = __getDelegate(false); 00213 ::IceDelegate::ScorbotIce::Scorbot* __del = dynamic_cast< ::IceDelegate::ScorbotIce::Scorbot*>(__delBase.get()); 00214 return __del->getEncoder(joint, __ctx); 00215 } 00216 catch(const ::IceInternal::LocalExceptionWrapper& __ex) 00217 { 00218 __handleExceptionWrapper(__delBase, __ex, 0); 00219 } 00220 catch(const ::Ice::LocalException& __ex) 00221 { 00222 __handleException(__delBase, __ex, 0, __cnt); 00223 } 00224 } 00225 } 00226 00227 ::ScorbotIce::encoderValsType 00228 IceProxy::ScorbotIce::Scorbot::getEncoders(const ::Ice::Context* __ctx) 00229 { 00230 int __cnt = 0; 00231 while(true) 00232 { 00233 ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase; 00234 try 00235 { 00236 #if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug 00237 IceUtil::DummyBCC dummy; 00238 #endif 00239 __checkTwowayOnly(__ScorbotIce__Scorbot__getEncoders_name); 00240 __delBase = __getDelegate(false); 00241 ::IceDelegate::ScorbotIce::Scorbot* __del = dynamic_cast< ::IceDelegate::ScorbotIce::Scorbot*>(__delBase.get()); 00242 return __del->getEncoders(__ctx); 00243 } 00244 catch(const ::IceInternal::LocalExceptionWrapper& __ex) 00245 { 00246 __handleExceptionWrapper(__delBase, __ex, 0); 00247 } 00248 catch(const ::Ice::LocalException& __ex) 00249 { 00250 __handleException(__delBase, __ex, 0, __cnt); 00251 } 00252 } 00253 } 00254 00255 void 00256 IceProxy::ScorbotIce::Scorbot::setEnabled(bool enabled, const ::Ice::Context* __ctx) 00257 { 00258 int __cnt = 0; 00259 while(true) 00260 { 00261 ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase; 00262 try 00263 { 00264 #if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug 00265 IceUtil::DummyBCC dummy; 00266 #endif 00267 __delBase = __getDelegate(false); 00268 ::IceDelegate::ScorbotIce::Scorbot* __del = dynamic_cast< ::IceDelegate::ScorbotIce::Scorbot*>(__delBase.get()); 00269 __del->setEnabled(enabled, __ctx); 00270 return; 00271 } 00272 catch(const ::IceInternal::LocalExceptionWrapper& __ex) 00273 { 00274 __handleExceptionWrapper(__delBase, __ex, 0); 00275 } 00276 catch(const ::Ice::LocalException& __ex) 00277 { 00278 __handleException(__delBase, __ex, 0, __cnt); 00279 } 00280 } 00281 } 00282 00283 void 00284 IceProxy::ScorbotIce::Scorbot::resetEncoders(const ::Ice::Context* __ctx) 00285 { 00286 int __cnt = 0; 00287 while(true) 00288 { 00289 ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase; 00290 try 00291 { 00292 #if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug 00293 IceUtil::DummyBCC dummy; 00294 #endif 00295 __delBase = __getDelegate(false); 00296 ::IceDelegate::ScorbotIce::Scorbot* __del = dynamic_cast< ::IceDelegate::ScorbotIce::Scorbot*>(__delBase.get()); 00297 __del->resetEncoders(__ctx); 00298 return; 00299 } 00300 catch(const ::IceInternal::LocalExceptionWrapper& __ex) 00301 { 00302 __handleExceptionWrapper(__delBase, __ex, 0); 00303 } 00304 catch(const ::Ice::LocalException& __ex) 00305 { 00306 __handleException(__delBase, __ex, 0, __cnt); 00307 } 00308 } 00309 } 00310 00311 ::Ice::Float 00312 IceProxy::ScorbotIce::Scorbot::getPWM(::ScorbotIce::JointType joint, const ::Ice::Context* __ctx) 00313 { 00314 int __cnt = 0; 00315 while(true) 00316 { 00317 ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase; 00318 try 00319 { 00320 #if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug 00321 IceUtil::DummyBCC dummy; 00322 #endif 00323 __checkTwowayOnly(__ScorbotIce__Scorbot__getPWM_name); 00324 __delBase = __getDelegate(false); 00325 ::IceDelegate::ScorbotIce::Scorbot* __del = dynamic_cast< ::IceDelegate::ScorbotIce::Scorbot*>(__delBase.get()); 00326 return __del->getPWM(joint, __ctx); 00327 } 00328 catch(const ::IceInternal::LocalExceptionWrapper& __ex) 00329 { 00330 __handleExceptionWrapper(__delBase, __ex, 0); 00331 } 00332 catch(const ::Ice::LocalException& __ex) 00333 { 00334 __handleException(__delBase, __ex, 0, __cnt); 00335 } 00336 } 00337 } 00338 00339 ::ScorbotIce::pwmValsType 00340 IceProxy::ScorbotIce::Scorbot::getPWMs(const ::Ice::Context* __ctx) 00341 { 00342 int __cnt = 0; 00343 while(true) 00344 { 00345 ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase; 00346 try 00347 { 00348 #if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug 00349 IceUtil::DummyBCC dummy; 00350 #endif 00351 __checkTwowayOnly(__ScorbotIce__Scorbot__getPWMs_name); 00352 __delBase = __getDelegate(false); 00353 ::IceDelegate::ScorbotIce::Scorbot* __del = dynamic_cast< ::IceDelegate::ScorbotIce::Scorbot*>(__delBase.get()); 00354 return __del->getPWMs(__ctx); 00355 } 00356 catch(const ::IceInternal::LocalExceptionWrapper& __ex) 00357 { 00358 __handleExceptionWrapper(__delBase, __ex, 0); 00359 } 00360 catch(const ::Ice::LocalException& __ex) 00361 { 00362 __handleException(__delBase, __ex, 0, __cnt); 00363 } 00364 } 00365 } 00366 00367 void 00368 IceProxy::ScorbotIce::Scorbot::setControlParams(::ScorbotIce::JointType joint, ::Ice::Float pGain, ::Ice::Float iGain, ::Ice::Float dGain, ::Ice::Float maxI, ::Ice::Float maxPWM, ::Ice::Float pwmOffset, const ::Ice::Context* __ctx) 00369 { 00370 int __cnt = 0; 00371 while(true) 00372 { 00373 ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase; 00374 try 00375 { 00376 #if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug 00377 IceUtil::DummyBCC dummy; 00378 #endif 00379 __delBase = __getDelegate(false); 00380 ::IceDelegate::ScorbotIce::Scorbot* __del = dynamic_cast< ::IceDelegate::ScorbotIce::Scorbot*>(__delBase.get()); 00381 __del->setControlParams(joint, pGain, iGain, dGain, maxI, maxPWM, pwmOffset, __ctx); 00382 return; 00383 } 00384 catch(const ::IceInternal::LocalExceptionWrapper& __ex) 00385 { 00386 __handleExceptionWrapper(__delBase, __ex, 0); 00387 } 00388 catch(const ::Ice::LocalException& __ex) 00389 { 00390 __handleException(__delBase, __ex, 0, __cnt); 00391 } 00392 } 00393 } 00394 00395 void 00396 IceProxy::ScorbotIce::Scorbot::getPIDVals(::ScorbotIce::JointType joint, ::Ice::Float& pGain, ::Ice::Float& iGain, ::Ice::Float& dGain, ::Ice::Float& maxI, ::Ice::Float& maxPWM, ::Ice::Float& pwmOffset, const ::Ice::Context* __ctx) 00397 { 00398 int __cnt = 0; 00399 while(true) 00400 { 00401 ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase; 00402 try 00403 { 00404 #if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug 00405 IceUtil::DummyBCC dummy; 00406 #endif 00407 __checkTwowayOnly(__ScorbotIce__Scorbot__getPIDVals_name); 00408 __delBase = __getDelegate(false); 00409 ::IceDelegate::ScorbotIce::Scorbot* __del = dynamic_cast< ::IceDelegate::ScorbotIce::Scorbot*>(__delBase.get()); 00410 __del->getPIDVals(joint, pGain, iGain, dGain, maxI, maxPWM, pwmOffset, __ctx); 00411 return; 00412 } 00413 catch(const ::IceInternal::LocalExceptionWrapper& __ex) 00414 { 00415 __handleExceptionWrapper(__delBase, __ex, 0); 00416 } 00417 catch(const ::Ice::LocalException& __ex) 00418 { 00419 __handleException(__delBase, __ex, 0, __cnt); 00420 } 00421 } 00422 } 00423 00424 void 00425 IceProxy::ScorbotIce::Scorbot::getTuningVals(::ScorbotIce::JointType joint, ::Ice::Int& targetPos, ::Ice::Int& targetVel, ::Ice::Float& gravityCompensation, const ::Ice::Context* __ctx) 00426 { 00427 int __cnt = 0; 00428 while(true) 00429 { 00430 ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase; 00431 try 00432 { 00433 #if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug 00434 IceUtil::DummyBCC dummy; 00435 #endif 00436 __checkTwowayOnly(__ScorbotIce__Scorbot__getTuningVals_name); 00437 __delBase = __getDelegate(false); 00438 ::IceDelegate::ScorbotIce::Scorbot* __del = dynamic_cast< ::IceDelegate::ScorbotIce::Scorbot*>(__delBase.get()); 00439 __del->getTuningVals(joint, targetPos, targetVel, gravityCompensation, __ctx); 00440 return; 00441 } 00442 catch(const ::IceInternal::LocalExceptionWrapper& __ex) 00443 { 00444 __handleExceptionWrapper(__delBase, __ex, 0); 00445 } 00446 catch(const ::Ice::LocalException& __ex) 00447 { 00448 __handleException(__delBase, __ex, 0, __cnt); 00449 } 00450 } 00451 } 00452 00453 void 00454 IceProxy::ScorbotIce::Scorbot::setGravityParameters(::Ice::Int upperArmMass, ::Ice::Int foreArmMass, ::Ice::Float compensationScale, const ::Ice::Context* __ctx) 00455 { 00456 int __cnt = 0; 00457 while(true) 00458 { 00459 ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase; 00460 try 00461 { 00462 #if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug 00463 IceUtil::DummyBCC dummy; 00464 #endif 00465 __delBase = __getDelegate(false); 00466 ::IceDelegate::ScorbotIce::Scorbot* __del = dynamic_cast< ::IceDelegate::ScorbotIce::Scorbot*>(__delBase.get()); 00467 __del->setGravityParameters(upperArmMass, foreArmMass, compensationScale, __ctx); 00468 return; 00469 } 00470 catch(const ::IceInternal::LocalExceptionWrapper& __ex) 00471 { 00472 __handleExceptionWrapper(__delBase, __ex, 0); 00473 } 00474 catch(const ::Ice::LocalException& __ex) 00475 { 00476 __handleException(__delBase, __ex, 0, __cnt); 00477 } 00478 } 00479 } 00480 00481 void 00482 IceProxy::ScorbotIce::Scorbot::getGravityParameters(::Ice::Int& upperArmMass, ::Ice::Int& foreArmMass, ::Ice::Float& compensationScale, const ::Ice::Context* __ctx) 00483 { 00484 int __cnt = 0; 00485 while(true) 00486 { 00487 ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase; 00488 try 00489 { 00490 #if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug 00491 IceUtil::DummyBCC dummy; 00492 #endif 00493 __checkTwowayOnly(__ScorbotIce__Scorbot__getGravityParameters_name); 00494 __delBase = __getDelegate(false); 00495 ::IceDelegate::ScorbotIce::Scorbot* __del = dynamic_cast< ::IceDelegate::ScorbotIce::Scorbot*>(__delBase.get()); 00496 __del->getGravityParameters(upperArmMass, foreArmMass, compensationScale, __ctx); 00497 return; 00498 } 00499 catch(const ::IceInternal::LocalExceptionWrapper& __ex) 00500 { 00501 __handleExceptionWrapper(__delBase, __ex, 0); 00502 } 00503 catch(const ::Ice::LocalException& __ex) 00504 { 00505 __handleException(__delBase, __ex, 0, __cnt); 00506 } 00507 } 00508 } 00509 00510 const ::std::string& 00511 IceProxy::ScorbotIce::Scorbot::ice_staticId() 00512 { 00513 return ::ScorbotIce::Scorbot::ice_staticId(); 00514 } 00515 00516 ::IceInternal::Handle< ::IceDelegateM::Ice::Object> 00517 IceProxy::ScorbotIce::Scorbot::__createDelegateM() 00518 { 00519 return ::IceInternal::Handle< ::IceDelegateM::Ice::Object>(new ::IceDelegateM::ScorbotIce::Scorbot); 00520 } 00521 00522 ::IceInternal::Handle< ::IceDelegateD::Ice::Object> 00523 IceProxy::ScorbotIce::Scorbot::__createDelegateD() 00524 { 00525 return ::IceInternal::Handle< ::IceDelegateD::Ice::Object>(new ::IceDelegateD::ScorbotIce::Scorbot); 00526 } 00527 00528 ::IceProxy::Ice::Object* 00529 IceProxy::ScorbotIce::Scorbot::__newInstance() const 00530 { 00531 return new Scorbot; 00532 } 00533 00534 void 00535 IceDelegateM::ScorbotIce::Scorbot::setJoint(::ScorbotIce::JointType joint, ::Ice::Int encoderPos, ::Ice::Int timeMS, const ::Ice::Context* __context) 00536 { 00537 ::IceInternal::Outgoing __og(__handler.get(), __ScorbotIce__Scorbot__setJoint_name, ::Ice::Normal, __context); 00538 try 00539 { 00540 ::IceInternal::BasicStream* __os = __og.os(); 00541 ::ScorbotIce::__write(__os, joint); 00542 __os->write(encoderPos); 00543 __os->write(timeMS); 00544 } 00545 catch(const ::Ice::LocalException& __ex) 00546 { 00547 __og.abort(__ex); 00548 } 00549 bool __ok = __og.invoke(); 00550 if(!__og.is()->b.empty()) 00551 { 00552 try 00553 { 00554 if(!__ok) 00555 { 00556 try 00557 { 00558 __og.throwUserException(); 00559 } 00560 catch(const ::Ice::UserException& __ex) 00561 { 00562 ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name()); 00563 throw __uue; 00564 } 00565 } 00566 __og.is()->skipEmptyEncaps(); 00567 } 00568 catch(const ::Ice::LocalException& __ex) 00569 { 00570 throw ::IceInternal::LocalExceptionWrapper(__ex, false); 00571 } 00572 } 00573 } 00574 00575 void 00576 IceDelegateM::ScorbotIce::Scorbot::setJoints(const ::ScorbotIce::encoderValsType& pos, ::Ice::Int timeMS, const ::Ice::Context* __context) 00577 { 00578 ::IceInternal::Outgoing __og(__handler.get(), __ScorbotIce__Scorbot__setJoints_name, ::Ice::Normal, __context); 00579 try 00580 { 00581 ::IceInternal::BasicStream* __os = __og.os(); 00582 ::ScorbotIce::__writeencoderValsType(__os, pos); 00583 __os->write(timeMS); 00584 } 00585 catch(const ::Ice::LocalException& __ex) 00586 { 00587 __og.abort(__ex); 00588 } 00589 bool __ok = __og.invoke(); 00590 if(!__og.is()->b.empty()) 00591 { 00592 try 00593 { 00594 if(!__ok) 00595 { 00596 try 00597 { 00598 __og.throwUserException(); 00599 } 00600 catch(const ::Ice::UserException& __ex) 00601 { 00602 ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name()); 00603 throw __uue; 00604 } 00605 } 00606 __og.is()->skipEmptyEncaps(); 00607 } 00608 catch(const ::Ice::LocalException& __ex) 00609 { 00610 throw ::IceInternal::LocalExceptionWrapper(__ex, false); 00611 } 00612 } 00613 } 00614 00615 ::Ice::Int 00616 IceDelegateM::ScorbotIce::Scorbot::getEncoder(::ScorbotIce::JointType joint, const ::Ice::Context* __context) 00617 { 00618 ::IceInternal::Outgoing __og(__handler.get(), __ScorbotIce__Scorbot__getEncoder_name, ::Ice::Normal, __context); 00619 try 00620 { 00621 ::IceInternal::BasicStream* __os = __og.os(); 00622 ::ScorbotIce::__write(__os, joint); 00623 } 00624 catch(const ::Ice::LocalException& __ex) 00625 { 00626 __og.abort(__ex); 00627 } 00628 bool __ok = __og.invoke(); 00629 ::Ice::Int __ret; 00630 try 00631 { 00632 if(!__ok) 00633 { 00634 try 00635 { 00636 __og.throwUserException(); 00637 } 00638 catch(const ::Ice::UserException& __ex) 00639 { 00640 ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name()); 00641 throw __uue; 00642 } 00643 } 00644 ::IceInternal::BasicStream* __is = __og.is(); 00645 __is->startReadEncaps(); 00646 __is->read(__ret); 00647 __is->endReadEncaps(); 00648 return __ret; 00649 } 00650 catch(const ::Ice::LocalException& __ex) 00651 { 00652 throw ::IceInternal::LocalExceptionWrapper(__ex, false); 00653 } 00654 } 00655 00656 ::ScorbotIce::encoderValsType 00657 IceDelegateM::ScorbotIce::Scorbot::getEncoders(const ::Ice::Context* __context) 00658 { 00659 ::IceInternal::Outgoing __og(__handler.get(), __ScorbotIce__Scorbot__getEncoders_name, ::Ice::Normal, __context); 00660 bool __ok = __og.invoke(); 00661 ::ScorbotIce::encoderValsType __ret; 00662 try 00663 { 00664 if(!__ok) 00665 { 00666 try 00667 { 00668 __og.throwUserException(); 00669 } 00670 catch(const ::Ice::UserException& __ex) 00671 { 00672 ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name()); 00673 throw __uue; 00674 } 00675 } 00676 ::IceInternal::BasicStream* __is = __og.is(); 00677 __is->startReadEncaps(); 00678 ::ScorbotIce::__readencoderValsType(__is, __ret); 00679 __is->endReadEncaps(); 00680 return __ret; 00681 } 00682 catch(const ::Ice::LocalException& __ex) 00683 { 00684 throw ::IceInternal::LocalExceptionWrapper(__ex, false); 00685 } 00686 } 00687 00688 void 00689 IceDelegateM::ScorbotIce::Scorbot::setEnabled(bool enabled, const ::Ice::Context* __context) 00690 { 00691 ::IceInternal::Outgoing __og(__handler.get(), __ScorbotIce__Scorbot__setEnabled_name, ::Ice::Normal, __context); 00692 try 00693 { 00694 ::IceInternal::BasicStream* __os = __og.os(); 00695 __os->write(enabled); 00696 } 00697 catch(const ::Ice::LocalException& __ex) 00698 { 00699 __og.abort(__ex); 00700 } 00701 bool __ok = __og.invoke(); 00702 if(!__og.is()->b.empty()) 00703 { 00704 try 00705 { 00706 if(!__ok) 00707 { 00708 try 00709 { 00710 __og.throwUserException(); 00711 } 00712 catch(const ::Ice::UserException& __ex) 00713 { 00714 ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name()); 00715 throw __uue; 00716 } 00717 } 00718 __og.is()->skipEmptyEncaps(); 00719 } 00720 catch(const ::Ice::LocalException& __ex) 00721 { 00722 throw ::IceInternal::LocalExceptionWrapper(__ex, false); 00723 } 00724 } 00725 } 00726 00727 void 00728 IceDelegateM::ScorbotIce::Scorbot::resetEncoders(const ::Ice::Context* __context) 00729 { 00730 ::IceInternal::Outgoing __og(__handler.get(), __ScorbotIce__Scorbot__resetEncoders_name, ::Ice::Normal, __context); 00731 bool __ok = __og.invoke(); 00732 if(!__og.is()->b.empty()) 00733 { 00734 try 00735 { 00736 if(!__ok) 00737 { 00738 try 00739 { 00740 __og.throwUserException(); 00741 } 00742 catch(const ::Ice::UserException& __ex) 00743 { 00744 ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name()); 00745 throw __uue; 00746 } 00747 } 00748 __og.is()->skipEmptyEncaps(); 00749 } 00750 catch(const ::Ice::LocalException& __ex) 00751 { 00752 throw ::IceInternal::LocalExceptionWrapper(__ex, false); 00753 } 00754 } 00755 } 00756 00757 ::Ice::Float 00758 IceDelegateM::ScorbotIce::Scorbot::getPWM(::ScorbotIce::JointType joint, const ::Ice::Context* __context) 00759 { 00760 ::IceInternal::Outgoing __og(__handler.get(), __ScorbotIce__Scorbot__getPWM_name, ::Ice::Normal, __context); 00761 try 00762 { 00763 ::IceInternal::BasicStream* __os = __og.os(); 00764 ::ScorbotIce::__write(__os, joint); 00765 } 00766 catch(const ::Ice::LocalException& __ex) 00767 { 00768 __og.abort(__ex); 00769 } 00770 bool __ok = __og.invoke(); 00771 ::Ice::Float __ret; 00772 try 00773 { 00774 if(!__ok) 00775 { 00776 try 00777 { 00778 __og.throwUserException(); 00779 } 00780 catch(const ::Ice::UserException& __ex) 00781 { 00782 ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name()); 00783 throw __uue; 00784 } 00785 } 00786 ::IceInternal::BasicStream* __is = __og.is(); 00787 __is->startReadEncaps(); 00788 __is->read(__ret); 00789 __is->endReadEncaps(); 00790 return __ret; 00791 } 00792 catch(const ::Ice::LocalException& __ex) 00793 { 00794 throw ::IceInternal::LocalExceptionWrapper(__ex, false); 00795 } 00796 } 00797 00798 ::ScorbotIce::pwmValsType 00799 IceDelegateM::ScorbotIce::Scorbot::getPWMs(const ::Ice::Context* __context) 00800 { 00801 ::IceInternal::Outgoing __og(__handler.get(), __ScorbotIce__Scorbot__getPWMs_name, ::Ice::Normal, __context); 00802 bool __ok = __og.invoke(); 00803 ::ScorbotIce::pwmValsType __ret; 00804 try 00805 { 00806 if(!__ok) 00807 { 00808 try 00809 { 00810 __og.throwUserException(); 00811 } 00812 catch(const ::Ice::UserException& __ex) 00813 { 00814 ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name()); 00815 throw __uue; 00816 } 00817 } 00818 ::IceInternal::BasicStream* __is = __og.is(); 00819 __is->startReadEncaps(); 00820 ::ScorbotIce::__readpwmValsType(__is, __ret); 00821 __is->endReadEncaps(); 00822 return __ret; 00823 } 00824 catch(const ::Ice::LocalException& __ex) 00825 { 00826 throw ::IceInternal::LocalExceptionWrapper(__ex, false); 00827 } 00828 } 00829 00830 void 00831 IceDelegateM::ScorbotIce::Scorbot::setControlParams(::ScorbotIce::JointType joint, ::Ice::Float pGain, ::Ice::Float iGain, ::Ice::Float dGain, ::Ice::Float maxI, ::Ice::Float maxPWM, ::Ice::Float pwmOffset, const ::Ice::Context* __context) 00832 { 00833 ::IceInternal::Outgoing __og(__handler.get(), __ScorbotIce__Scorbot__setControlParams_name, ::Ice::Normal, __context); 00834 try 00835 { 00836 ::IceInternal::BasicStream* __os = __og.os(); 00837 ::ScorbotIce::__write(__os, joint); 00838 __os->write(pGain); 00839 __os->write(iGain); 00840 __os->write(dGain); 00841 __os->write(maxI); 00842 __os->write(maxPWM); 00843 __os->write(pwmOffset); 00844 } 00845 catch(const ::Ice::LocalException& __ex) 00846 { 00847 __og.abort(__ex); 00848 } 00849 bool __ok = __og.invoke(); 00850 if(!__og.is()->b.empty()) 00851 { 00852 try 00853 { 00854 if(!__ok) 00855 { 00856 try 00857 { 00858 __og.throwUserException(); 00859 } 00860 catch(const ::Ice::UserException& __ex) 00861 { 00862 ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name()); 00863 throw __uue; 00864 } 00865 } 00866 __og.is()->skipEmptyEncaps(); 00867 } 00868 catch(const ::Ice::LocalException& __ex) 00869 { 00870 throw ::IceInternal::LocalExceptionWrapper(__ex, false); 00871 } 00872 } 00873 } 00874 00875 void 00876 IceDelegateM::ScorbotIce::Scorbot::getPIDVals(::ScorbotIce::JointType joint, ::Ice::Float& pGain, ::Ice::Float& iGain, ::Ice::Float& dGain, ::Ice::Float& maxI, ::Ice::Float& maxPWM, ::Ice::Float& pwmOffset, const ::Ice::Context* __context) 00877 { 00878 ::IceInternal::Outgoing __og(__handler.get(), __ScorbotIce__Scorbot__getPIDVals_name, ::Ice::Normal, __context); 00879 try 00880 { 00881 ::IceInternal::BasicStream* __os = __og.os(); 00882 ::ScorbotIce::__write(__os, joint); 00883 } 00884 catch(const ::Ice::LocalException& __ex) 00885 { 00886 __og.abort(__ex); 00887 } 00888 bool __ok = __og.invoke(); 00889 try 00890 { 00891 if(!__ok) 00892 { 00893 try 00894 { 00895 __og.throwUserException(); 00896 } 00897 catch(const ::Ice::UserException& __ex) 00898 { 00899 ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name()); 00900 throw __uue; 00901 } 00902 } 00903 ::IceInternal::BasicStream* __is = __og.is(); 00904 __is->startReadEncaps(); 00905 __is->read(pGain); 00906 __is->read(iGain); 00907 __is->read(dGain); 00908 __is->read(maxI); 00909 __is->read(maxPWM); 00910 __is->read(pwmOffset); 00911 __is->endReadEncaps(); 00912 } 00913 catch(const ::Ice::LocalException& __ex) 00914 { 00915 throw ::IceInternal::LocalExceptionWrapper(__ex, false); 00916 } 00917 } 00918 00919 void 00920 IceDelegateM::ScorbotIce::Scorbot::getTuningVals(::ScorbotIce::JointType joint, ::Ice::Int& targetPos, ::Ice::Int& targetVel, ::Ice::Float& gravityCompensation, const ::Ice::Context* __context) 00921 { 00922 ::IceInternal::Outgoing __og(__handler.get(), __ScorbotIce__Scorbot__getTuningVals_name, ::Ice::Normal, __context); 00923 try 00924 { 00925 ::IceInternal::BasicStream* __os = __og.os(); 00926 ::ScorbotIce::__write(__os, joint); 00927 } 00928 catch(const ::Ice::LocalException& __ex) 00929 { 00930 __og.abort(__ex); 00931 } 00932 bool __ok = __og.invoke(); 00933 try 00934 { 00935 if(!__ok) 00936 { 00937 try 00938 { 00939 __og.throwUserException(); 00940 } 00941 catch(const ::Ice::UserException& __ex) 00942 { 00943 ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name()); 00944 throw __uue; 00945 } 00946 } 00947 ::IceInternal::BasicStream* __is = __og.is(); 00948 __is->startReadEncaps(); 00949 __is->read(targetPos); 00950 __is->read(targetVel); 00951 __is->read(gravityCompensation); 00952 __is->endReadEncaps(); 00953 } 00954 catch(const ::Ice::LocalException& __ex) 00955 { 00956 throw ::IceInternal::LocalExceptionWrapper(__ex, false); 00957 } 00958 } 00959 00960 void 00961 IceDelegateM::ScorbotIce::Scorbot::setGravityParameters(::Ice::Int upperArmMass, ::Ice::Int foreArmMass, ::Ice::Float compensationScale, const ::Ice::Context* __context) 00962 { 00963 ::IceInternal::Outgoing __og(__handler.get(), __ScorbotIce__Scorbot__setGravityParameters_name, ::Ice::Normal, __context); 00964 try 00965 { 00966 ::IceInternal::BasicStream* __os = __og.os(); 00967 __os->write(upperArmMass); 00968 __os->write(foreArmMass); 00969 __os->write(compensationScale); 00970 } 00971 catch(const ::Ice::LocalException& __ex) 00972 { 00973 __og.abort(__ex); 00974 } 00975 bool __ok = __og.invoke(); 00976 if(!__og.is()->b.empty()) 00977 { 00978 try 00979 { 00980 if(!__ok) 00981 { 00982 try 00983 { 00984 __og.throwUserException(); 00985 } 00986 catch(const ::Ice::UserException& __ex) 00987 { 00988 ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name()); 00989 throw __uue; 00990 } 00991 } 00992 __og.is()->skipEmptyEncaps(); 00993 } 00994 catch(const ::Ice::LocalException& __ex) 00995 { 00996 throw ::IceInternal::LocalExceptionWrapper(__ex, false); 00997 } 00998 } 00999 } 01000 01001 void 01002 IceDelegateM::ScorbotIce::Scorbot::getGravityParameters(::Ice::Int& upperArmMass, ::Ice::Int& foreArmMass, ::Ice::Float& compensationScale, const ::Ice::Context* __context) 01003 { 01004 ::IceInternal::Outgoing __og(__handler.get(), __ScorbotIce__Scorbot__getGravityParameters_name, ::Ice::Normal, __context); 01005 bool __ok = __og.invoke(); 01006 try 01007 { 01008 if(!__ok) 01009 { 01010 try 01011 { 01012 __og.throwUserException(); 01013 } 01014 catch(const ::Ice::UserException& __ex) 01015 { 01016 ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name()); 01017 throw __uue; 01018 } 01019 } 01020 ::IceInternal::BasicStream* __is = __og.is(); 01021 __is->startReadEncaps(); 01022 __is->read(upperArmMass); 01023 __is->read(foreArmMass); 01024 __is->read(compensationScale); 01025 __is->endReadEncaps(); 01026 } 01027 catch(const ::Ice::LocalException& __ex) 01028 { 01029 throw ::IceInternal::LocalExceptionWrapper(__ex, false); 01030 } 01031 } 01032 01033 void 01034 IceDelegateD::ScorbotIce::Scorbot::setJoint(::ScorbotIce::JointType joint, ::Ice::Int encoderPos, ::Ice::Int timeMS, const ::Ice::Context* __context) 01035 { 01036 class _DirectI : public ::IceInternal::Direct 01037 { 01038 public: 01039 01040 _DirectI(::ScorbotIce::JointType joint, ::Ice::Int encoderPos, ::Ice::Int timeMS, const ::Ice::Current& __current) : 01041 ::IceInternal::Direct(__current), 01042 _m_joint(joint), 01043 _m_encoderPos(encoderPos), 01044 _m_timeMS(timeMS) 01045 { 01046 } 01047 01048 virtual ::Ice::DispatchStatus 01049 run(::Ice::Object* object) 01050 { 01051 ::ScorbotIce::Scorbot* servant = dynamic_cast< ::ScorbotIce::Scorbot*>(object); 01052 if(!servant) 01053 { 01054 throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation); 01055 } 01056 servant->setJoint(_m_joint, _m_encoderPos, _m_timeMS, _current); 01057 return ::Ice::DispatchOK; 01058 } 01059 01060 private: 01061 01062 ::ScorbotIce::JointType _m_joint; 01063 ::Ice::Int _m_encoderPos; 01064 ::Ice::Int _m_timeMS; 01065 }; 01066 01067 ::Ice::Current __current; 01068 __initCurrent(__current, __ScorbotIce__Scorbot__setJoint_name, ::Ice::Normal, __context); 01069 try 01070 { 01071 _DirectI __direct(joint, encoderPos, timeMS, __current); 01072 try 01073 { 01074 __direct.servant()->__collocDispatch(__direct); 01075 } 01076 catch(...) 01077 { 01078 __direct.destroy(); 01079 throw; 01080 } 01081 __direct.destroy(); 01082 } 01083 catch(const ::Ice::SystemException&) 01084 { 01085 throw; 01086 } 01087 catch(const ::IceInternal::LocalExceptionWrapper&) 01088 { 01089 throw; 01090 } 01091 catch(const ::std::exception& __ex) 01092 { 01093 ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex); 01094 } 01095 catch(...) 01096 { 01097 throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false); 01098 } 01099 } 01100 01101 void 01102 IceDelegateD::ScorbotIce::Scorbot::setJoints(const ::ScorbotIce::encoderValsType& pos, ::Ice::Int timeMS, const ::Ice::Context* __context) 01103 { 01104 class _DirectI : public ::IceInternal::Direct 01105 { 01106 public: 01107 01108 _DirectI(const ::ScorbotIce::encoderValsType& pos, ::Ice::Int timeMS, const ::Ice::Current& __current) : 01109 ::IceInternal::Direct(__current), 01110 _m_pos(pos), 01111 _m_timeMS(timeMS) 01112 { 01113 } 01114 01115 virtual ::Ice::DispatchStatus 01116 run(::Ice::Object* object) 01117 { 01118 ::ScorbotIce::Scorbot* servant = dynamic_cast< ::ScorbotIce::Scorbot*>(object); 01119 if(!servant) 01120 { 01121 throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation); 01122 } 01123 servant->setJoints(_m_pos, _m_timeMS, _current); 01124 return ::Ice::DispatchOK; 01125 } 01126 01127 private: 01128 01129 const ::ScorbotIce::encoderValsType& _m_pos; 01130 ::Ice::Int _m_timeMS; 01131 }; 01132 01133 ::Ice::Current __current; 01134 __initCurrent(__current, __ScorbotIce__Scorbot__setJoints_name, ::Ice::Normal, __context); 01135 try 01136 { 01137 _DirectI __direct(pos, timeMS, __current); 01138 try 01139 { 01140 __direct.servant()->__collocDispatch(__direct); 01141 } 01142 catch(...) 01143 { 01144 __direct.destroy(); 01145 throw; 01146 } 01147 __direct.destroy(); 01148 } 01149 catch(const ::Ice::SystemException&) 01150 { 01151 throw; 01152 } 01153 catch(const ::IceInternal::LocalExceptionWrapper&) 01154 { 01155 throw; 01156 } 01157 catch(const ::std::exception& __ex) 01158 { 01159 ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex); 01160 } 01161 catch(...) 01162 { 01163 throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false); 01164 } 01165 } 01166 01167 ::Ice::Int 01168 IceDelegateD::ScorbotIce::Scorbot::getEncoder(::ScorbotIce::JointType joint, const ::Ice::Context* __context) 01169 { 01170 class _DirectI : public ::IceInternal::Direct 01171 { 01172 public: 01173 01174 _DirectI(::Ice::Int& __result, ::ScorbotIce::JointType joint, const ::Ice::Current& __current) : 01175 ::IceInternal::Direct(__current), 01176 _result(__result), 01177 _m_joint(joint) 01178 { 01179 } 01180 01181 virtual ::Ice::DispatchStatus 01182 run(::Ice::Object* object) 01183 { 01184 ::ScorbotIce::Scorbot* servant = dynamic_cast< ::ScorbotIce::Scorbot*>(object); 01185 if(!servant) 01186 { 01187 throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation); 01188 } 01189 _result = servant->getEncoder(_m_joint, _current); 01190 return ::Ice::DispatchOK; 01191 } 01192 01193 private: 01194 01195 ::Ice::Int& _result; 01196 ::ScorbotIce::JointType _m_joint; 01197 }; 01198 01199 ::Ice::Current __current; 01200 __initCurrent(__current, __ScorbotIce__Scorbot__getEncoder_name, ::Ice::Normal, __context); 01201 ::Ice::Int __result; 01202 try 01203 { 01204 _DirectI __direct(__result, joint, __current); 01205 try 01206 { 01207 __direct.servant()->__collocDispatch(__direct); 01208 } 01209 catch(...) 01210 { 01211 __direct.destroy(); 01212 throw; 01213 } 01214 __direct.destroy(); 01215 } 01216 catch(const ::Ice::SystemException&) 01217 { 01218 throw; 01219 } 01220 catch(const ::IceInternal::LocalExceptionWrapper&) 01221 { 01222 throw; 01223 } 01224 catch(const ::std::exception& __ex) 01225 { 01226 ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex); 01227 } 01228 catch(...) 01229 { 01230 throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false); 01231 } 01232 return __result; 01233 } 01234 01235 ::ScorbotIce::encoderValsType 01236 IceDelegateD::ScorbotIce::Scorbot::getEncoders(const ::Ice::Context* __context) 01237 { 01238 class _DirectI : public ::IceInternal::Direct 01239 { 01240 public: 01241 01242 _DirectI(::ScorbotIce::encoderValsType& __result, const ::Ice::Current& __current) : 01243 ::IceInternal::Direct(__current), 01244 _result(__result) 01245 { 01246 } 01247 01248 virtual ::Ice::DispatchStatus 01249 run(::Ice::Object* object) 01250 { 01251 ::ScorbotIce::Scorbot* servant = dynamic_cast< ::ScorbotIce::Scorbot*>(object); 01252 if(!servant) 01253 { 01254 throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation); 01255 } 01256 _result = servant->getEncoders(_current); 01257 return ::Ice::DispatchOK; 01258 } 01259 01260 private: 01261 01262 ::ScorbotIce::encoderValsType& _result; 01263 }; 01264 01265 ::Ice::Current __current; 01266 __initCurrent(__current, __ScorbotIce__Scorbot__getEncoders_name, ::Ice::Normal, __context); 01267 ::ScorbotIce::encoderValsType __result; 01268 try 01269 { 01270 _DirectI __direct(__result, __current); 01271 try 01272 { 01273 __direct.servant()->__collocDispatch(__direct); 01274 } 01275 catch(...) 01276 { 01277 __direct.destroy(); 01278 throw; 01279 } 01280 __direct.destroy(); 01281 } 01282 catch(const ::Ice::SystemException&) 01283 { 01284 throw; 01285 } 01286 catch(const ::IceInternal::LocalExceptionWrapper&) 01287 { 01288 throw; 01289 } 01290 catch(const ::std::exception& __ex) 01291 { 01292 ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex); 01293 } 01294 catch(...) 01295 { 01296 throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false); 01297 } 01298 return __result; 01299 } 01300 01301 void 01302 IceDelegateD::ScorbotIce::Scorbot::setEnabled(bool enabled, const ::Ice::Context* __context) 01303 { 01304 class _DirectI : public ::IceInternal::Direct 01305 { 01306 public: 01307 01308 _DirectI(bool enabled, const ::Ice::Current& __current) : 01309 ::IceInternal::Direct(__current), 01310 _m_enabled(enabled) 01311 { 01312 } 01313 01314 virtual ::Ice::DispatchStatus 01315 run(::Ice::Object* object) 01316 { 01317 ::ScorbotIce::Scorbot* servant = dynamic_cast< ::ScorbotIce::Scorbot*>(object); 01318 if(!servant) 01319 { 01320 throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation); 01321 } 01322 servant->setEnabled(_m_enabled, _current); 01323 return ::Ice::DispatchOK; 01324 } 01325 01326 private: 01327 01328 bool _m_enabled; 01329 }; 01330 01331 ::Ice::Current __current; 01332 __initCurrent(__current, __ScorbotIce__Scorbot__setEnabled_name, ::Ice::Normal, __context); 01333 try 01334 { 01335 _DirectI __direct(enabled, __current); 01336 try 01337 { 01338 __direct.servant()->__collocDispatch(__direct); 01339 } 01340 catch(...) 01341 { 01342 __direct.destroy(); 01343 throw; 01344 } 01345 __direct.destroy(); 01346 } 01347 catch(const ::Ice::SystemException&) 01348 { 01349 throw; 01350 } 01351 catch(const ::IceInternal::LocalExceptionWrapper&) 01352 { 01353 throw; 01354 } 01355 catch(const ::std::exception& __ex) 01356 { 01357 ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex); 01358 } 01359 catch(...) 01360 { 01361 throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false); 01362 } 01363 } 01364 01365 void 01366 IceDelegateD::ScorbotIce::Scorbot::resetEncoders(const ::Ice::Context* __context) 01367 { 01368 class _DirectI : public ::IceInternal::Direct 01369 { 01370 public: 01371 01372 _DirectI(const ::Ice::Current& __current) : 01373 ::IceInternal::Direct(__current) 01374 { 01375 } 01376 01377 virtual ::Ice::DispatchStatus 01378 run(::Ice::Object* object) 01379 { 01380 ::ScorbotIce::Scorbot* servant = dynamic_cast< ::ScorbotIce::Scorbot*>(object); 01381 if(!servant) 01382 { 01383 throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation); 01384 } 01385 servant->resetEncoders(_current); 01386 return ::Ice::DispatchOK; 01387 } 01388 01389 private: 01390 01391 }; 01392 01393 ::Ice::Current __current; 01394 __initCurrent(__current, __ScorbotIce__Scorbot__resetEncoders_name, ::Ice::Normal, __context); 01395 try 01396 { 01397 _DirectI __direct(__current); 01398 try 01399 { 01400 __direct.servant()->__collocDispatch(__direct); 01401 } 01402 catch(...) 01403 { 01404 __direct.destroy(); 01405 throw; 01406 } 01407 __direct.destroy(); 01408 } 01409 catch(const ::Ice::SystemException&) 01410 { 01411 throw; 01412 } 01413 catch(const ::IceInternal::LocalExceptionWrapper&) 01414 { 01415 throw; 01416 } 01417 catch(const ::std::exception& __ex) 01418 { 01419 ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex); 01420 } 01421 catch(...) 01422 { 01423 throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false); 01424 } 01425 } 01426 01427 ::Ice::Float 01428 IceDelegateD::ScorbotIce::Scorbot::getPWM(::ScorbotIce::JointType joint, const ::Ice::Context* __context) 01429 { 01430 class _DirectI : public ::IceInternal::Direct 01431 { 01432 public: 01433 01434 _DirectI(::Ice::Float& __result, ::ScorbotIce::JointType joint, const ::Ice::Current& __current) : 01435 ::IceInternal::Direct(__current), 01436 _result(__result), 01437 _m_joint(joint) 01438 { 01439 } 01440 01441 virtual ::Ice::DispatchStatus 01442 run(::Ice::Object* object) 01443 { 01444 ::ScorbotIce::Scorbot* servant = dynamic_cast< ::ScorbotIce::Scorbot*>(object); 01445 if(!servant) 01446 { 01447 throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation); 01448 } 01449 _result = servant->getPWM(_m_joint, _current); 01450 return ::Ice::DispatchOK; 01451 } 01452 01453 private: 01454 01455 ::Ice::Float& _result; 01456 ::ScorbotIce::JointType _m_joint; 01457 }; 01458 01459 ::Ice::Current __current; 01460 __initCurrent(__current, __ScorbotIce__Scorbot__getPWM_name, ::Ice::Normal, __context); 01461 ::Ice::Float __result; 01462 try 01463 { 01464 _DirectI __direct(__result, joint, __current); 01465 try 01466 { 01467 __direct.servant()->__collocDispatch(__direct); 01468 } 01469 catch(...) 01470 { 01471 __direct.destroy(); 01472 throw; 01473 } 01474 __direct.destroy(); 01475 } 01476 catch(const ::Ice::SystemException&) 01477 { 01478 throw; 01479 } 01480 catch(const ::IceInternal::LocalExceptionWrapper&) 01481 { 01482 throw; 01483 } 01484 catch(const ::std::exception& __ex) 01485 { 01486 ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex); 01487 } 01488 catch(...) 01489 { 01490 throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false); 01491 } 01492 return __result; 01493 } 01494 01495 ::ScorbotIce::pwmValsType 01496 IceDelegateD::ScorbotIce::Scorbot::getPWMs(const ::Ice::Context* __context) 01497 { 01498 class _DirectI : public ::IceInternal::Direct 01499 { 01500 public: 01501 01502 _DirectI(::ScorbotIce::pwmValsType& __result, const ::Ice::Current& __current) : 01503 ::IceInternal::Direct(__current), 01504 _result(__result) 01505 { 01506 } 01507 01508 virtual ::Ice::DispatchStatus 01509 run(::Ice::Object* object) 01510 { 01511 ::ScorbotIce::Scorbot* servant = dynamic_cast< ::ScorbotIce::Scorbot*>(object); 01512 if(!servant) 01513 { 01514 throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation); 01515 } 01516 _result = servant->getPWMs(_current); 01517 return ::Ice::DispatchOK; 01518 } 01519 01520 private: 01521 01522 ::ScorbotIce::pwmValsType& _result; 01523 }; 01524 01525 ::Ice::Current __current; 01526 __initCurrent(__current, __ScorbotIce__Scorbot__getPWMs_name, ::Ice::Normal, __context); 01527 ::ScorbotIce::pwmValsType __result; 01528 try 01529 { 01530 _DirectI __direct(__result, __current); 01531 try 01532 { 01533 __direct.servant()->__collocDispatch(__direct); 01534 } 01535 catch(...) 01536 { 01537 __direct.destroy(); 01538 throw; 01539 } 01540 __direct.destroy(); 01541 } 01542 catch(const ::Ice::SystemException&) 01543 { 01544 throw; 01545 } 01546 catch(const ::IceInternal::LocalExceptionWrapper&) 01547 { 01548 throw; 01549 } 01550 catch(const ::std::exception& __ex) 01551 { 01552 ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex); 01553 } 01554 catch(...) 01555 { 01556 throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false); 01557 } 01558 return __result; 01559 } 01560 01561 void 01562 IceDelegateD::ScorbotIce::Scorbot::setControlParams(::ScorbotIce::JointType joint, ::Ice::Float pGain, ::Ice::Float iGain, ::Ice::Float dGain, ::Ice::Float maxI, ::Ice::Float maxPWM, ::Ice::Float pwmOffset, const ::Ice::Context* __context) 01563 { 01564 class _DirectI : public ::IceInternal::Direct 01565 { 01566 public: 01567 01568 _DirectI(::ScorbotIce::JointType joint, ::Ice::Float pGain, ::Ice::Float iGain, ::Ice::Float dGain, ::Ice::Float maxI, ::Ice::Float maxPWM, ::Ice::Float pwmOffset, const ::Ice::Current& __current) : 01569 ::IceInternal::Direct(__current), 01570 _m_joint(joint), 01571 _m_pGain(pGain), 01572 _m_iGain(iGain), 01573 _m_dGain(dGain), 01574 _m_maxI(maxI), 01575 _m_maxPWM(maxPWM), 01576 _m_pwmOffset(pwmOffset) 01577 { 01578 } 01579 01580 virtual ::Ice::DispatchStatus 01581 run(::Ice::Object* object) 01582 { 01583 ::ScorbotIce::Scorbot* servant = dynamic_cast< ::ScorbotIce::Scorbot*>(object); 01584 if(!servant) 01585 { 01586 throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation); 01587 } 01588 servant->setControlParams(_m_joint, _m_pGain, _m_iGain, _m_dGain, _m_maxI, _m_maxPWM, _m_pwmOffset, _current); 01589 return ::Ice::DispatchOK; 01590 } 01591 01592 private: 01593 01594 ::ScorbotIce::JointType _m_joint; 01595 ::Ice::Float _m_pGain; 01596 ::Ice::Float _m_iGain; 01597 ::Ice::Float _m_dGain; 01598 ::Ice::Float _m_maxI; 01599 ::Ice::Float _m_maxPWM; 01600 ::Ice::Float _m_pwmOffset; 01601 }; 01602 01603 ::Ice::Current __current; 01604 __initCurrent(__current, __ScorbotIce__Scorbot__setControlParams_name, ::Ice::Normal, __context); 01605 try 01606 { 01607 _DirectI __direct(joint, pGain, iGain, dGain, maxI, maxPWM, pwmOffset, __current); 01608 try 01609 { 01610 __direct.servant()->__collocDispatch(__direct); 01611 } 01612 catch(...) 01613 { 01614 __direct.destroy(); 01615 throw; 01616 } 01617 __direct.destroy(); 01618 } 01619 catch(const ::Ice::SystemException&) 01620 { 01621 throw; 01622 } 01623 catch(const ::IceInternal::LocalExceptionWrapper&) 01624 { 01625 throw; 01626 } 01627 catch(const ::std::exception& __ex) 01628 { 01629 ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex); 01630 } 01631 catch(...) 01632 { 01633 throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false); 01634 } 01635 } 01636 01637 void 01638 IceDelegateD::ScorbotIce::Scorbot::getPIDVals(::ScorbotIce::JointType joint, ::Ice::Float& pGain, ::Ice::Float& iGain, ::Ice::Float& dGain, ::Ice::Float& maxI, ::Ice::Float& maxPWM, ::Ice::Float& pwmOffset, const ::Ice::Context* __context) 01639 { 01640 class _DirectI : public ::IceInternal::Direct 01641 { 01642 public: 01643 01644 _DirectI(::ScorbotIce::JointType joint, ::Ice::Float& pGain, ::Ice::Float& iGain, ::Ice::Float& dGain, ::Ice::Float& maxI, ::Ice::Float& maxPWM, ::Ice::Float& pwmOffset, const ::Ice::Current& __current) : 01645 ::IceInternal::Direct(__current), 01646 _m_joint(joint), 01647 _m_pGain(pGain), 01648 _m_iGain(iGain), 01649 _m_dGain(dGain), 01650 _m_maxI(maxI), 01651 _m_maxPWM(maxPWM), 01652 _m_pwmOffset(pwmOffset) 01653 { 01654 } 01655 01656 virtual ::Ice::DispatchStatus 01657 run(::Ice::Object* object) 01658 { 01659 ::ScorbotIce::Scorbot* servant = dynamic_cast< ::ScorbotIce::Scorbot*>(object); 01660 if(!servant) 01661 { 01662 throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation); 01663 } 01664 servant->getPIDVals(_m_joint, _m_pGain, _m_iGain, _m_dGain, _m_maxI, _m_maxPWM, _m_pwmOffset, _current); 01665 return ::Ice::DispatchOK; 01666 } 01667 01668 private: 01669 01670 ::ScorbotIce::JointType _m_joint; 01671 ::Ice::Float& _m_pGain; 01672 ::Ice::Float& _m_iGain; 01673 ::Ice::Float& _m_dGain; 01674 ::Ice::Float& _m_maxI; 01675 ::Ice::Float& _m_maxPWM; 01676 ::Ice::Float& _m_pwmOffset; 01677 }; 01678 01679 ::Ice::Current __current; 01680 __initCurrent(__current, __ScorbotIce__Scorbot__getPIDVals_name, ::Ice::Normal, __context); 01681 try 01682 { 01683 _DirectI __direct(joint, pGain, iGain, dGain, maxI, maxPWM, pwmOffset, __current); 01684 try 01685 { 01686 __direct.servant()->__collocDispatch(__direct); 01687 } 01688 catch(...) 01689 { 01690 __direct.destroy(); 01691 throw; 01692 } 01693 __direct.destroy(); 01694 } 01695 catch(const ::Ice::SystemException&) 01696 { 01697 throw; 01698 } 01699 catch(const ::IceInternal::LocalExceptionWrapper&) 01700 { 01701 throw; 01702 } 01703 catch(const ::std::exception& __ex) 01704 { 01705 ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex); 01706 } 01707 catch(...) 01708 { 01709 throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false); 01710 } 01711 } 01712 01713 void 01714 IceDelegateD::ScorbotIce::Scorbot::getTuningVals(::ScorbotIce::JointType joint, ::Ice::Int& targetPos, ::Ice::Int& targetVel, ::Ice::Float& gravityCompensation, const ::Ice::Context* __context) 01715 { 01716 class _DirectI : public ::IceInternal::Direct 01717 { 01718 public: 01719 01720 _DirectI(::ScorbotIce::JointType joint, ::Ice::Int& targetPos, ::Ice::Int& targetVel, ::Ice::Float& gravityCompensation, const ::Ice::Current& __current) : 01721 ::IceInternal::Direct(__current), 01722 _m_joint(joint), 01723 _m_targetPos(targetPos), 01724 _m_targetVel(targetVel), 01725 _m_gravityCompensation(gravityCompensation) 01726 { 01727 } 01728 01729 virtual ::Ice::DispatchStatus 01730 run(::Ice::Object* object) 01731 { 01732 ::ScorbotIce::Scorbot* servant = dynamic_cast< ::ScorbotIce::Scorbot*>(object); 01733 if(!servant) 01734 { 01735 throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation); 01736 } 01737 servant->getTuningVals(_m_joint, _m_targetPos, _m_targetVel, _m_gravityCompensation, _current); 01738 return ::Ice::DispatchOK; 01739 } 01740 01741 private: 01742 01743 ::ScorbotIce::JointType _m_joint; 01744 ::Ice::Int& _m_targetPos; 01745 ::Ice::Int& _m_targetVel; 01746 ::Ice::Float& _m_gravityCompensation; 01747 }; 01748 01749 ::Ice::Current __current; 01750 __initCurrent(__current, __ScorbotIce__Scorbot__getTuningVals_name, ::Ice::Normal, __context); 01751 try 01752 { 01753 _DirectI __direct(joint, targetPos, targetVel, gravityCompensation, __current); 01754 try 01755 { 01756 __direct.servant()->__collocDispatch(__direct); 01757 } 01758 catch(...) 01759 { 01760 __direct.destroy(); 01761 throw; 01762 } 01763 __direct.destroy(); 01764 } 01765 catch(const ::Ice::SystemException&) 01766 { 01767 throw; 01768 } 01769 catch(const ::IceInternal::LocalExceptionWrapper&) 01770 { 01771 throw; 01772 } 01773 catch(const ::std::exception& __ex) 01774 { 01775 ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex); 01776 } 01777 catch(...) 01778 { 01779 throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false); 01780 } 01781 } 01782 01783 void 01784 IceDelegateD::ScorbotIce::Scorbot::setGravityParameters(::Ice::Int upperArmMass, ::Ice::Int foreArmMass, ::Ice::Float compensationScale, const ::Ice::Context* __context) 01785 { 01786 class _DirectI : public ::IceInternal::Direct 01787 { 01788 public: 01789 01790 _DirectI(::Ice::Int upperArmMass, ::Ice::Int foreArmMass, ::Ice::Float compensationScale, const ::Ice::Current& __current) : 01791 ::IceInternal::Direct(__current), 01792 _m_upperArmMass(upperArmMass), 01793 _m_foreArmMass(foreArmMass), 01794 _m_compensationScale(compensationScale) 01795 { 01796 } 01797 01798 virtual ::Ice::DispatchStatus 01799 run(::Ice::Object* object) 01800 { 01801 ::ScorbotIce::Scorbot* servant = dynamic_cast< ::ScorbotIce::Scorbot*>(object); 01802 if(!servant) 01803 { 01804 throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation); 01805 } 01806 servant->setGravityParameters(_m_upperArmMass, _m_foreArmMass, _m_compensationScale, _current); 01807 return ::Ice::DispatchOK; 01808 } 01809 01810 private: 01811 01812 ::Ice::Int _m_upperArmMass; 01813 ::Ice::Int _m_foreArmMass; 01814 ::Ice::Float _m_compensationScale; 01815 }; 01816 01817 ::Ice::Current __current; 01818 __initCurrent(__current, __ScorbotIce__Scorbot__setGravityParameters_name, ::Ice::Normal, __context); 01819 try 01820 { 01821 _DirectI __direct(upperArmMass, foreArmMass, compensationScale, __current); 01822 try 01823 { 01824 __direct.servant()->__collocDispatch(__direct); 01825 } 01826 catch(...) 01827 { 01828 __direct.destroy(); 01829 throw; 01830 } 01831 __direct.destroy(); 01832 } 01833 catch(const ::Ice::SystemException&) 01834 { 01835 throw; 01836 } 01837 catch(const ::IceInternal::LocalExceptionWrapper&) 01838 { 01839 throw; 01840 } 01841 catch(const ::std::exception& __ex) 01842 { 01843 ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex); 01844 } 01845 catch(...) 01846 { 01847 throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false); 01848 } 01849 } 01850 01851 void 01852 IceDelegateD::ScorbotIce::Scorbot::getGravityParameters(::Ice::Int& upperArmMass, ::Ice::Int& foreArmMass, ::Ice::Float& compensationScale, const ::Ice::Context* __context) 01853 { 01854 class _DirectI : public ::IceInternal::Direct 01855 { 01856 public: 01857 01858 _DirectI(::Ice::Int& upperArmMass, ::Ice::Int& foreArmMass, ::Ice::Float& compensationScale, const ::Ice::Current& __current) : 01859 ::IceInternal::Direct(__current), 01860 _m_upperArmMass(upperArmMass), 01861 _m_foreArmMass(foreArmMass), 01862 _m_compensationScale(compensationScale) 01863 { 01864 } 01865 01866 virtual ::Ice::DispatchStatus 01867 run(::Ice::Object* object) 01868 { 01869 ::ScorbotIce::Scorbot* servant = dynamic_cast< ::ScorbotIce::Scorbot*>(object); 01870 if(!servant) 01871 { 01872 throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation); 01873 } 01874 servant->getGravityParameters(_m_upperArmMass, _m_foreArmMass, _m_compensationScale, _current); 01875 return ::Ice::DispatchOK; 01876 } 01877 01878 private: 01879 01880 ::Ice::Int& _m_upperArmMass; 01881 ::Ice::Int& _m_foreArmMass; 01882 ::Ice::Float& _m_compensationScale; 01883 }; 01884 01885 ::Ice::Current __current; 01886 __initCurrent(__current, __ScorbotIce__Scorbot__getGravityParameters_name, ::Ice::Normal, __context); 01887 try 01888 { 01889 _DirectI __direct(upperArmMass, foreArmMass, compensationScale, __current); 01890 try 01891 { 01892 __direct.servant()->__collocDispatch(__direct); 01893 } 01894 catch(...) 01895 { 01896 __direct.destroy(); 01897 throw; 01898 } 01899 __direct.destroy(); 01900 } 01901 catch(const ::Ice::SystemException&) 01902 { 01903 throw; 01904 } 01905 catch(const ::IceInternal::LocalExceptionWrapper&) 01906 { 01907 throw; 01908 } 01909 catch(const ::std::exception& __ex) 01910 { 01911 ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex); 01912 } 01913 catch(...) 01914 { 01915 throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false); 01916 } 01917 } 01918 01919 ::Ice::ObjectPtr 01920 ScorbotIce::Scorbot::ice_clone() const 01921 { 01922 throw ::Ice::CloneNotImplementedException(__FILE__, __LINE__); 01923 return 0; // to avoid a warning with some compilers 01924 } 01925 01926 static const ::std::string __ScorbotIce__Scorbot_ids[2] = 01927 { 01928 "::Ice::Object", 01929 "::ScorbotIce::Scorbot" 01930 }; 01931 01932 bool 01933 ScorbotIce::Scorbot::ice_isA(const ::std::string& _s, const ::Ice::Current&) const 01934 { 01935 return ::std::binary_search(__ScorbotIce__Scorbot_ids, __ScorbotIce__Scorbot_ids + 2, _s); 01936 } 01937 01938 ::std::vector< ::std::string> 01939 ScorbotIce::Scorbot::ice_ids(const ::Ice::Current&) const 01940 { 01941 return ::std::vector< ::std::string>(&__ScorbotIce__Scorbot_ids[0], &__ScorbotIce__Scorbot_ids[2]); 01942 } 01943 01944 const ::std::string& 01945 ScorbotIce::Scorbot::ice_id(const ::Ice::Current&) const 01946 { 01947 return __ScorbotIce__Scorbot_ids[1]; 01948 } 01949 01950 const ::std::string& 01951 ScorbotIce::Scorbot::ice_staticId() 01952 { 01953 return __ScorbotIce__Scorbot_ids[1]; 01954 } 01955 01956 ::Ice::DispatchStatus 01957 ScorbotIce::Scorbot::___setJoint(::IceInternal::Incoming& __inS, const ::Ice::Current& __current) 01958 { 01959 __checkMode(::Ice::Normal, __current.mode); 01960 ::IceInternal::BasicStream* __is = __inS.is(); 01961 __is->startReadEncaps(); 01962 ::ScorbotIce::JointType joint; 01963 ::Ice::Int encoderPos; 01964 ::Ice::Int timeMS; 01965 ::ScorbotIce::__read(__is, joint); 01966 __is->read(encoderPos); 01967 __is->read(timeMS); 01968 __is->endReadEncaps(); 01969 setJoint(joint, encoderPos, timeMS, __current); 01970 return ::Ice::DispatchOK; 01971 } 01972 01973 ::Ice::DispatchStatus 01974 ScorbotIce::Scorbot::___setJoints(::IceInternal::Incoming& __inS, const ::Ice::Current& __current) 01975 { 01976 __checkMode(::Ice::Normal, __current.mode); 01977 ::IceInternal::BasicStream* __is = __inS.is(); 01978 __is->startReadEncaps(); 01979 ::ScorbotIce::encoderValsType pos; 01980 ::Ice::Int timeMS; 01981 ::ScorbotIce::__readencoderValsType(__is, pos); 01982 __is->read(timeMS); 01983 __is->endReadEncaps(); 01984 setJoints(pos, timeMS, __current); 01985 return ::Ice::DispatchOK; 01986 } 01987 01988 ::Ice::DispatchStatus 01989 ScorbotIce::Scorbot::___getEncoder(::IceInternal::Incoming& __inS, const ::Ice::Current& __current) 01990 { 01991 __checkMode(::Ice::Normal, __current.mode); 01992 ::IceInternal::BasicStream* __is = __inS.is(); 01993 __is->startReadEncaps(); 01994 ::ScorbotIce::JointType joint; 01995 ::ScorbotIce::__read(__is, joint); 01996 __is->endReadEncaps(); 01997 ::IceInternal::BasicStream* __os = __inS.os(); 01998 ::Ice::Int __ret = getEncoder(joint, __current); 01999 __os->write(__ret); 02000 return ::Ice::DispatchOK; 02001 } 02002 02003 ::Ice::DispatchStatus 02004 ScorbotIce::Scorbot::___getEncoders(::IceInternal::Incoming& __inS, const ::Ice::Current& __current) 02005 { 02006 __checkMode(::Ice::Normal, __current.mode); 02007 __inS.is()->skipEmptyEncaps(); 02008 ::IceInternal::BasicStream* __os = __inS.os(); 02009 ::ScorbotIce::encoderValsType __ret = getEncoders(__current); 02010 ::ScorbotIce::__writeencoderValsType(__os, __ret); 02011 return ::Ice::DispatchOK; 02012 } 02013 02014 ::Ice::DispatchStatus 02015 ScorbotIce::Scorbot::___setEnabled(::IceInternal::Incoming& __inS, const ::Ice::Current& __current) 02016 { 02017 __checkMode(::Ice::Normal, __current.mode); 02018 ::IceInternal::BasicStream* __is = __inS.is(); 02019 __is->startReadEncaps(); 02020 bool enabled; 02021 __is->read(enabled); 02022 __is->endReadEncaps(); 02023 setEnabled(enabled, __current); 02024 return ::Ice::DispatchOK; 02025 } 02026 02027 ::Ice::DispatchStatus 02028 ScorbotIce::Scorbot::___resetEncoders(::IceInternal::Incoming& __inS, const ::Ice::Current& __current) 02029 { 02030 __checkMode(::Ice::Normal, __current.mode); 02031 __inS.is()->skipEmptyEncaps(); 02032 resetEncoders(__current); 02033 return ::Ice::DispatchOK; 02034 } 02035 02036 ::Ice::DispatchStatus 02037 ScorbotIce::Scorbot::___getPWM(::IceInternal::Incoming& __inS, const ::Ice::Current& __current) 02038 { 02039 __checkMode(::Ice::Normal, __current.mode); 02040 ::IceInternal::BasicStream* __is = __inS.is(); 02041 __is->startReadEncaps(); 02042 ::ScorbotIce::JointType joint; 02043 ::ScorbotIce::__read(__is, joint); 02044 __is->endReadEncaps(); 02045 ::IceInternal::BasicStream* __os = __inS.os(); 02046 ::Ice::Float __ret = getPWM(joint, __current); 02047 __os->write(__ret); 02048 return ::Ice::DispatchOK; 02049 } 02050 02051 ::Ice::DispatchStatus 02052 ScorbotIce::Scorbot::___getPWMs(::IceInternal::Incoming& __inS, const ::Ice::Current& __current) 02053 { 02054 __checkMode(::Ice::Normal, __current.mode); 02055 __inS.is()->skipEmptyEncaps(); 02056 ::IceInternal::BasicStream* __os = __inS.os(); 02057 ::ScorbotIce::pwmValsType __ret = getPWMs(__current); 02058 ::ScorbotIce::__writepwmValsType(__os, __ret); 02059 return ::Ice::DispatchOK; 02060 } 02061 02062 ::Ice::DispatchStatus 02063 ScorbotIce::Scorbot::___setControlParams(::IceInternal::Incoming& __inS, const ::Ice::Current& __current) 02064 { 02065 __checkMode(::Ice::Normal, __current.mode); 02066 ::IceInternal::BasicStream* __is = __inS.is(); 02067 __is->startReadEncaps(); 02068 ::ScorbotIce::JointType joint; 02069 ::Ice::Float pGain; 02070 ::Ice::Float iGain; 02071 ::Ice::Float dGain; 02072 ::Ice::Float maxI; 02073 ::Ice::Float maxPWM; 02074 ::Ice::Float pwmOffset; 02075 ::ScorbotIce::__read(__is, joint); 02076 __is->read(pGain); 02077 __is->read(iGain); 02078 __is->read(dGain); 02079 __is->read(maxI); 02080 __is->read(maxPWM); 02081 __is->read(pwmOffset); 02082 __is->endReadEncaps(); 02083 setControlParams(joint, pGain, iGain, dGain, maxI, maxPWM, pwmOffset, __current); 02084 return ::Ice::DispatchOK; 02085 } 02086 02087 ::Ice::DispatchStatus 02088 ScorbotIce::Scorbot::___getPIDVals(::IceInternal::Incoming& __inS, const ::Ice::Current& __current) 02089 { 02090 __checkMode(::Ice::Normal, __current.mode); 02091 ::IceInternal::BasicStream* __is = __inS.is(); 02092 __is->startReadEncaps(); 02093 ::ScorbotIce::JointType joint; 02094 ::ScorbotIce::__read(__is, joint); 02095 __is->endReadEncaps(); 02096 ::IceInternal::BasicStream* __os = __inS.os(); 02097 ::Ice::Float pGain; 02098 ::Ice::Float iGain; 02099 ::Ice::Float dGain; 02100 ::Ice::Float maxI; 02101 ::Ice::Float maxPWM; 02102 ::Ice::Float pwmOffset; 02103 getPIDVals(joint, pGain, iGain, dGain, maxI, maxPWM, pwmOffset, __current); 02104 __os->write(pGain); 02105 __os->write(iGain); 02106 __os->write(dGain); 02107 __os->write(maxI); 02108 __os->write(maxPWM); 02109 __os->write(pwmOffset); 02110 return ::Ice::DispatchOK; 02111 } 02112 02113 ::Ice::DispatchStatus 02114 ScorbotIce::Scorbot::___getTuningVals(::IceInternal::Incoming& __inS, const ::Ice::Current& __current) 02115 { 02116 __checkMode(::Ice::Normal, __current.mode); 02117 ::IceInternal::BasicStream* __is = __inS.is(); 02118 __is->startReadEncaps(); 02119 ::ScorbotIce::JointType joint; 02120 ::ScorbotIce::__read(__is, joint); 02121 __is->endReadEncaps(); 02122 ::IceInternal::BasicStream* __os = __inS.os(); 02123 ::Ice::Int targetPos; 02124 ::Ice::Int targetVel; 02125 ::Ice::Float gravityCompensation; 02126 getTuningVals(joint, targetPos, targetVel, gravityCompensation, __current); 02127 __os->write(targetPos); 02128 __os->write(targetVel); 02129 __os->write(gravityCompensation); 02130 return ::Ice::DispatchOK; 02131 } 02132 02133 ::Ice::DispatchStatus 02134 ScorbotIce::Scorbot::___setGravityParameters(::IceInternal::Incoming& __inS, const ::Ice::Current& __current) 02135 { 02136 __checkMode(::Ice::Normal, __current.mode); 02137 ::IceInternal::BasicStream* __is = __inS.is(); 02138 __is->startReadEncaps(); 02139 ::Ice::Int upperArmMass; 02140 ::Ice::Int foreArmMass; 02141 ::Ice::Float compensationScale; 02142 __is->read(upperArmMass); 02143 __is->read(foreArmMass); 02144 __is->read(compensationScale); 02145 __is->endReadEncaps(); 02146 setGravityParameters(upperArmMass, foreArmMass, compensationScale, __current); 02147 return ::Ice::DispatchOK; 02148 } 02149 02150 ::Ice::DispatchStatus 02151 ScorbotIce::Scorbot::___getGravityParameters(::IceInternal::Incoming& __inS, const ::Ice::Current& __current) 02152 { 02153 __checkMode(::Ice::Normal, __current.mode); 02154 __inS.is()->skipEmptyEncaps(); 02155 ::IceInternal::BasicStream* __os = __inS.os(); 02156 ::Ice::Int upperArmMass; 02157 ::Ice::Int foreArmMass; 02158 ::Ice::Float compensationScale; 02159 getGravityParameters(upperArmMass, foreArmMass, compensationScale, __current); 02160 __os->write(upperArmMass); 02161 __os->write(foreArmMass); 02162 __os->write(compensationScale); 02163 return ::Ice::DispatchOK; 02164 } 02165 02166 static ::std::string __ScorbotIce__Scorbot_all[] = 02167 { 02168 "getEncoder", 02169 "getEncoders", 02170 "getGravityParameters", 02171 "getPIDVals", 02172 "getPWM", 02173 "getPWMs", 02174 "getTuningVals", 02175 "ice_id", 02176 "ice_ids", 02177 "ice_isA", 02178 "ice_ping", 02179 "resetEncoders", 02180 "setControlParams", 02181 "setEnabled", 02182 "setGravityParameters", 02183 "setJoint", 02184 "setJoints" 02185 }; 02186 02187 ::Ice::DispatchStatus 02188 ScorbotIce::Scorbot::__dispatch(::IceInternal::Incoming& in, const ::Ice::Current& current) 02189 { 02190 ::std::pair< ::std::string*, ::std::string*> r = ::std::equal_range(__ScorbotIce__Scorbot_all, __ScorbotIce__Scorbot_all + 17, current.operation); 02191 if(r.first == r.second) 02192 { 02193 throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); 02194 } 02195 02196 switch(r.first - __ScorbotIce__Scorbot_all) 02197 { 02198 case 0: 02199 { 02200 return ___getEncoder(in, current); 02201 } 02202 case 1: 02203 { 02204 return ___getEncoders(in, current); 02205 } 02206 case 2: 02207 { 02208 return ___getGravityParameters(in, current); 02209 } 02210 case 3: 02211 { 02212 return ___getPIDVals(in, current); 02213 } 02214 case 4: 02215 { 02216 return ___getPWM(in, current); 02217 } 02218 case 5: 02219 { 02220 return ___getPWMs(in, current); 02221 } 02222 case 6: 02223 { 02224 return ___getTuningVals(in, current); 02225 } 02226 case 7: 02227 { 02228 return ___ice_id(in, current); 02229 } 02230 case 8: 02231 { 02232 return ___ice_ids(in, current); 02233 } 02234 case 9: 02235 { 02236 return ___ice_isA(in, current); 02237 } 02238 case 10: 02239 { 02240 return ___ice_ping(in, current); 02241 } 02242 case 11: 02243 { 02244 return ___resetEncoders(in, current); 02245 } 02246 case 12: 02247 { 02248 return ___setControlParams(in, current); 02249 } 02250 case 13: 02251 { 02252 return ___setEnabled(in, current); 02253 } 02254 case 14: 02255 { 02256 return ___setGravityParameters(in, current); 02257 } 02258 case 15: 02259 { 02260 return ___setJoint(in, current); 02261 } 02262 case 16: 02263 { 02264 return ___setJoints(in, current); 02265 } 02266 } 02267 02268 assert(false); 02269 throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); 02270 } 02271 02272 void 02273 ScorbotIce::Scorbot::__write(::IceInternal::BasicStream* __os) const 02274 { 02275 __os->writeTypeId(ice_staticId()); 02276 __os->startWriteSlice(); 02277 __os->endWriteSlice(); 02278 #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug 02279 Object::__write(__os); 02280 #else 02281 ::Ice::Object::__write(__os); 02282 #endif 02283 } 02284 02285 void 02286 ScorbotIce::Scorbot::__read(::IceInternal::BasicStream* __is, bool __rid) 02287 { 02288 if(__rid) 02289 { 02290 ::std::string myId; 02291 __is->readTypeId(myId); 02292 } 02293 __is->startReadSlice(); 02294 __is->endReadSlice(); 02295 #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug 02296 Object::__read(__is, true); 02297 #else 02298 ::Ice::Object::__read(__is, true); 02299 #endif 02300 } 02301 02302 void 02303 ScorbotIce::Scorbot::__write(const ::Ice::OutputStreamPtr&) const 02304 { 02305 Ice::MarshalException ex(__FILE__, __LINE__); 02306 ex.reason = "type ScorbotIce::Scorbot was not generated with stream support"; 02307 throw ex; 02308 } 02309 02310 void 02311 ScorbotIce::Scorbot::__read(const ::Ice::InputStreamPtr&, bool) 02312 { 02313 Ice::MarshalException ex(__FILE__, __LINE__); 02314 ex.reason = "type ScorbotIce::Scorbot was not generated with stream support"; 02315 throw ex; 02316 } 02317 02318 void 02319 ScorbotIce::__patch__ScorbotPtr(void* __addr, ::Ice::ObjectPtr& v) 02320 { 02321 ::ScorbotIce::ScorbotPtr* p = static_cast< ::ScorbotIce::ScorbotPtr*>(__addr); 02322 assert(p); 02323 *p = ::ScorbotIce::ScorbotPtr::dynamicCast(v); 02324 if(v && !*p) 02325 { 02326 IceInternal::Ex::throwUOE(::ScorbotIce::Scorbot::ice_staticId(), v->ice_id()); 02327 } 02328 } 02329 02330 bool 02331 ScorbotIce::operator==(const ::ScorbotIce::Scorbot& l, const ::ScorbotIce::Scorbot& r) 02332 { 02333 return static_cast<const ::Ice::Object&>(l) == static_cast<const ::Ice::Object&>(r); 02334 } 02335 02336 bool 02337 ScorbotIce::operator<(const ::ScorbotIce::Scorbot& l, const ::ScorbotIce::Scorbot& r) 02338 { 02339 return static_cast<const ::Ice::Object&>(l) < static_cast<const ::Ice::Object&>(r); 02340 }