NeutralAgent7.h

Go to the documentation of this file.
00001 //
00002 // Copyright 2002,2004 Sony Corporation 
00003 //
00004 // Permission to use, copy, modify, and redistribute this software for
00005 // non-commercial use is hereby granted.
00006 //
00007 // This software is provided "as is" without warranty of any kind,
00008 // either expressed or implied, including but not limited to the
00009 // implied warranties of fitness for a particular purpose.
00010 //
00011 
00012 #ifndef NeutralAgent7_h_DEFINED
00013 #define NeutralAgent7_h_DEFINED
00014 
00015 #include <MoNetData.h>
00016 #include "MoNetAgent.h"
00017 
00018 enum NeutralAgent7State {
00019     NAS7_IDLE,
00020     NAS7_ADJUSTING_DIFF_JOINT_VALUE,
00021     NAS7_MOVING_TO_BROADBASE,
00022     NAS7_MOVING_TO_SLEEPING
00023 };
00024 
00025 class NeutralAgent7 : public MoNetAgent {
00026 public:
00027     NeutralAgent7();
00028     virtual ~NeutralAgent7() {}
00029 
00030     virtual bool AreYou(MoNetAgentID agent);
00031     virtual void Init(ODA* oda);
00032     virtual void NotifyCommand(const MoNetAgentCommand& command,
00033                                MoNetAgentResult* result);
00034     virtual void ReadyEffector(const MoNetAgentCommand& command,
00035                                MoNetAgentResult* result);
00036     virtual void SetJointGain();
00037 
00038 private:
00039     static const word   TILT1_PGAIN = 0x000a;
00040     static const word   TILT1_IGAIN = 0x0004;
00041     static const word   TILT1_DGAIN = 0x0002;
00042 
00043     static const word   PAN_PGAIN   = 0x0008;
00044     static const word   PAN_IGAIN   = 0x0002;
00045     static const word   PAN_DGAIN   = 0x0004;
00046 
00047     static const word   TILT2_PGAIN = 0x0008;
00048     static const word   TILT2_IGAIN = 0x0004;
00049     static const word   TILT2_DGAIN = 0x0002;
00050 
00051     static const word   J1_PGAIN    = 0x0010;
00052     static const word   J1_IGAIN    = 0x0004;
00053     static const word   J1_DGAIN    = 0x0001;
00054 
00055     static const word   J2_PGAIN    = 0x000a;
00056     static const word   J2_IGAIN    = 0x0004;
00057     static const word   J2_DGAIN    = 0x0001;
00058 
00059     static const word   J3_PGAIN    = 0x0010;
00060     static const word   J3_IGAIN    = 0x0004;
00061     static const word   J3_DGAIN    = 0x0001;
00062 
00063     static const word   TAIL_PGAIN  = 0x000a;
00064     static const word   TAIL_IGAIN  = 0x0004;
00065     static const word   TAIL_DGAIN  = 0x0004;
00066 
00067     static const word   PSHIFT      = 0x000e;
00068     static const word   ISHIFT      = 0x0002;
00069     static const word   DSHIFT      = 0x000f;
00070 
00071     static const int BROADBASE_MAX_COUNTER = 96; // 32ms * 96 = 3072ms
00072     static const int SLEEPING_MAX_COUNTER  = 96; // 32ms * 96 = 3072ms
00073 
00074     MoNetStatus AdjustDiffJointValue(OVRSyncKey syncKey);
00075     MoNetStatus MoveToBroadBase();
00076     MoNetStatus MoveToSleeping();
00077 
00078     void SetJointValue(RCRegion* rgn, int idx, double start, double end);
00079 
00080     NeutralAgent7State neutralAgentState;
00081 };
00082 
00083 #endif // NeutralAgent7_h_DEFINED

Generated on Sun Dec 2 23:04:30 2007 for openSDK by  doxygen 1.3.9.1