Go to the documentation of this file.00001
00002
00003 #ifndef ROBOTHARDWARESERVICE_IMPL_H
00004 #define ROBOTHARDWARESERVICE_IMPL_H
00005
00006 #include <boost/intrusive_ptr.hpp>
00007 #include "hrpsys/idl/RobotHardwareService.hh"
00008
00009 #include "robot.h"
00010
00011 class RobotHardwareService_impl
00012 : public virtual POA_OpenHRP::RobotHardwareService,
00013 public virtual PortableServer::RefCountServantBase
00014 {
00015 public:
00016 RobotHardwareService_impl();
00017 virtual ~RobotHardwareService_impl();
00018
00019 void getStatus(OpenHRP::RobotHardwareService::RobotState_out rs);
00020 void getStatus2(OpenHRP::RobotHardwareService::RobotState2_out rs);
00021
00022 CORBA::Boolean power(const char* jname, OpenHRP::RobotHardwareService::SwitchStatus ss);
00023 CORBA::Boolean servo(const char* jname, OpenHRP::RobotHardwareService::SwitchStatus ss);
00024 void setServoGainPercentage(const char *jname, double limit);
00025 void setServoTorqueGainPercentage(const char *jname, double limit);
00026 void setServoErrorLimit(const char *jname, double limit);
00027 void calibrateInertiaSensor();
00028 void removeForceSensorOffset();
00029 void initializeJointAngle(const char* name, const char* option);
00030 CORBA::Boolean addJointGroup(const char* gname, const OpenHRP::RobotHardwareService::StrSequence& jnames);
00031 CORBA::Boolean readDigitalInput(::OpenHRP::RobotHardwareService::OctSequence_out din);
00032 CORBA::Long lengthDigitalInput();
00033 CORBA::Boolean writeDigitalOutput(const ::OpenHRP::RobotHardwareService::OctSequence& dout);
00034 CORBA::Boolean writeDigitalOutputWithMask(const ::OpenHRP::RobotHardwareService::OctSequence& dout, const ::OpenHRP::RobotHardwareService::OctSequence& mask);
00035 CORBA::Long lengthDigitalOutput();
00036 CORBA::Boolean readDigitalOutput(::OpenHRP::RobotHardwareService::OctSequence_out dout);
00037 CORBA::Boolean setJointInertia(const char* name, ::CORBA::Double mn);
00038 void setJointInertias(const ::OpenHRP::RobotHardwareService::DblSequence& mns);
00039 void enableDisturbanceObserver();
00040 void disableDisturbanceObserver();
00041 void setDisturbanceObserverGain(::CORBA::Double gain);
00042 void setJointControlMode(const char *jname, OpenHRP::RobotHardwareService::JointControlMode jcm);
00043
00044 void setRobot(boost::shared_ptr<robot>& i_robot) { m_robot = i_robot; }
00045 private:
00046 boost::shared_ptr<robot> m_robot;
00047 };
00048 #endif