MovingHead7 Class Reference

#include <MovingHead7.h>

List of all members.

Public Member Functions

 MovingHead7 ()
virtual ~MovingHead7 ()
virtual OStatus DoInit (const OSystemEvent &event)
virtual OStatus DoStart (const OSystemEvent &event)
virtual OStatus DoStop (const OSystemEvent &event)
virtual OStatus DoDestroy (const OSystemEvent &event)
void Ready (const OReadyEvent &event)

Public Attributes

OSubject * subject [numOfSubject]
OObserver * observer [numOfObserver]

Private Member Functions

void OpenPrimitives ()
void NewCommandVectorData ()
void SetJointGain ()
MovingResult AdjustDiffJointValue ()
MovingResult MoveToZeroPos ()
MovingResult SwingHead ()
RCRegion * FindFreeRegion ()
void SetJointValue (RCRegion *rgn, int idx, double start, double end)
void SetJointValue (RCRegion *rgn, int idx, int phase)

Private Attributes

MovingHead7State movingHeadState
OPrimitiveID jointID [NUM_JOINTS]
RCRegion * region [NUM_COMMAND_VECTOR]

Static Private Attributes

const size_t NUM_COMMAND_VECTOR = 2
const size_t NUM_JOINTS = 3
const int TILT1_INDEX = 0
const int PAN_INDEX = 1
const int TILT2_INDEX = 2
const double TILT1_ZERO_POS = 0.0
const double PAN_ZERO_POS = 0.0
const double TILT2_ZERO_POS = 0.0
const double SWING_AMPLITUDE = 80.0
const word TILT1_PGAIN = 0x000a
const word TILT1_IGAIN = 0x0004
const word TILT1_DGAIN = 0x0002
const word PAN_PGAIN = 0x0008
const word PAN_IGAIN = 0x0002
const word PAN_DGAIN = 0x0004
const word TILT2_PGAIN = 0x0008
const word TILT2_IGAIN = 0x0004
const word TILT2_DGAIN = 0x0002
const word PSHIFT = 0x000e
const word ISHIFT = 0x0002
const word DSHIFT = 0x000f
const int ZERO_POS_MAX_COUNTER = 16
const int MAX_PHASE = 128


Constructor & Destructor Documentation

MovingHead7::MovingHead7  ) 
 

Definition at line 19 of file MovingHead7.cc.

References jointID, MHS_IDLE, and region.

virtual MovingHead7::~MovingHead7  )  [inline, virtual]
 

Definition at line 42 of file MovingHead7.h.


Member Function Documentation

MovingResult MovingHead7::AdjustDiffJointValue  )  [private]
 

Definition at line 195 of file MovingHead7.cc.

References GetJointValue(), jointID, region, SetJointValue(), and subject.

Referenced by DoStart(), and Ready().

OStatus MovingHead7::DoDestroy const OSystemEvent &  event  )  [virtual]
 

Definition at line 77 of file MovingHead7.cc.

OStatus MovingHead7::DoInit const OSystemEvent &  event  )  [virtual]
 

Definition at line 26 of file MovingHead7.cc.

References NewCommandVectorData(), and OpenPrimitives().

OStatus MovingHead7::DoStart const OSystemEvent &  event  )  [virtual]
 

Definition at line 46 of file MovingHead7.cc.

References AdjustDiffJointValue(), movingHeadState, and subject.

OStatus MovingHead7::DoStop const OSystemEvent &  event  )  [virtual]
 

Definition at line 64 of file MovingHead7.cc.

References movingHeadState.

RCRegion * MovingHead7::FindFreeRegion  )  [private]
 

Definition at line 292 of file MovingHead7.cc.

Referenced by MoveToZeroPos().

MovingResult MovingHead7::MoveToZeroPos  )  [private]
 

Definition at line 212 of file MovingHead7.cc.

References FindFreeRegion(), GetJointValue(), jointID, MOVING_CONT, MOVING_FINISH, MovingResult, PAN_INDEX, PAN_ZERO_POS, SetJointValue(), subject, TILT1_INDEX, TILT1_ZERO_POS, TILT2_INDEX, TILT2_ZERO_POS, and ZERO_POS_MAX_COUNTER.

Referenced by Ready().

void MovingHead7::NewCommandVectorData  )  [private]
 

Definition at line 138 of file MovingHead7.cc.

References jointID, NUM_JOINTS, and region.

Referenced by DoInit().

void MovingHead7::OpenPrimitives  )  [private]
 

Definition at line 125 of file MovingHead7.cc.

References jointID.

Referenced by DoInit().

void MovingHead7::Ready const OReadyEvent &  event  ) 
 

Definition at line 84 of file MovingHead7.cc.

References AdjustDiffJointValue(), MoveToZeroPos(), movingHeadState, MovingResult, SetJointGain(), and SwingHead().

void MovingHead7::SetJointGain  )  [private]
 

Definition at line 170 of file MovingHead7.cc.

References DSHIFT, ISHIFT, jointID, PAN_DGAIN, PAN_IGAIN, PAN_INDEX, PAN_PGAIN, PSHIFT, TILT1_DGAIN, TILT1_IGAIN, TILT1_INDEX, TILT1_PGAIN, TILT2_DGAIN, TILT2_IGAIN, TILT2_INDEX, and TILT2_PGAIN.

Referenced by Ready().

void MovingHead7::SetJointValue RCRegion *  rgn,
int  idx,
int  phase
[private]
 

Definition at line 320 of file MovingHead7.cc.

References jointID, and SWING_AMPLITUDE.

void MovingHead7::SetJointValue RCRegion *  rgn,
int  idx,
double  start,
double  end
[private]
 

Definition at line 302 of file MovingHead7.cc.

Referenced by AdjustDiffJointValue(), and MoveToZeroPos().

MovingResult MovingHead7::SwingHead  )  [private]
 

Definition at line 268 of file MovingHead7.cc.

Referenced by Ready().


Member Data Documentation

const word MovingHead7::DSHIFT = 0x000f [static, private]
 

Definition at line 91 of file MovingHead7.h.

Referenced by SetJointGain().

const word MovingHead7::ISHIFT = 0x0002 [static, private]
 

Definition at line 90 of file MovingHead7.h.

Referenced by SetJointGain().

OPrimitiveID MovingHead7::jointID[NUM_JOINTS] [private]
 

Definition at line 97 of file MovingHead7.h.

Referenced by AdjustDiffJointValue(), MoveToZeroPos(), MovingHead7(), NewCommandVectorData(), OpenPrimitives(), SetJointGain(), and SetJointValue().

const int MovingHead7::MAX_PHASE = 128 [static, private]
 

Definition at line 94 of file MovingHead7.h.

MovingHead7State MovingHead7::movingHeadState [private]
 

Definition at line 96 of file MovingHead7.h.

Referenced by DoStart(), DoStop(), and Ready().

const size_t MovingHead7::NUM_COMMAND_VECTOR = 2 [static, private]
 

Definition at line 66 of file MovingHead7.h.

const size_t MovingHead7::NUM_JOINTS = 3 [static, private]
 

Definition at line 67 of file MovingHead7.h.

Referenced by NewCommandVectorData().

OObserver* MovingHead7::observer[numOfObserver]
 

Definition at line 45 of file MovingHead7.h.

const word MovingHead7::PAN_DGAIN = 0x0004 [static, private]
 

Definition at line 83 of file MovingHead7.h.

Referenced by SetJointGain().

const word MovingHead7::PAN_IGAIN = 0x0002 [static, private]
 

Definition at line 82 of file MovingHead7.h.

Referenced by SetJointGain().

const int MovingHead7::PAN_INDEX = 1 [static, private]
 

Definition at line 69 of file MovingHead7.h.

Referenced by MoveToZeroPos(), and SetJointGain().

const word MovingHead7::PAN_PGAIN = 0x0008 [static, private]
 

Definition at line 81 of file MovingHead7.h.

Referenced by SetJointGain().

const double MovingHead7::PAN_ZERO_POS = 0.0 [static, private]
 

Definition at line 73 of file MovingHead7.h.

Referenced by MoveToZeroPos().

const word MovingHead7::PSHIFT = 0x000e [static, private]
 

Definition at line 89 of file MovingHead7.h.

Referenced by SetJointGain().

RCRegion* MovingHead7::region[NUM_COMMAND_VECTOR] [private]
 

Definition at line 98 of file MovingHead7.h.

Referenced by AdjustDiffJointValue(), MovingHead7(), and NewCommandVectorData().

OSubject* MovingHead7::subject[numOfSubject]
 

Definition at line 44 of file MovingHead7.h.

Referenced by AdjustDiffJointValue(), DoStart(), and MoveToZeroPos().

const double MovingHead7::SWING_AMPLITUDE = 80.0 [static, private]
 

Definition at line 75 of file MovingHead7.h.

Referenced by SetJointValue().

const word MovingHead7::TILT1_DGAIN = 0x0002 [static, private]
 

Definition at line 79 of file MovingHead7.h.

Referenced by SetJointGain().

const word MovingHead7::TILT1_IGAIN = 0x0004 [static, private]
 

Definition at line 78 of file MovingHead7.h.

Referenced by SetJointGain().

const int MovingHead7::TILT1_INDEX = 0 [static, private]
 

Definition at line 68 of file MovingHead7.h.

Referenced by MoveToZeroPos(), and SetJointGain().

const word MovingHead7::TILT1_PGAIN = 0x000a [static, private]
 

Definition at line 77 of file MovingHead7.h.

Referenced by SetJointGain().

const double MovingHead7::TILT1_ZERO_POS = 0.0 [static, private]
 

Definition at line 72 of file MovingHead7.h.

Referenced by MoveToZeroPos().

const word MovingHead7::TILT2_DGAIN = 0x0002 [static, private]
 

Definition at line 87 of file MovingHead7.h.

Referenced by SetJointGain().

const word MovingHead7::TILT2_IGAIN = 0x0004 [static, private]
 

Definition at line 86 of file MovingHead7.h.

Referenced by SetJointGain().

const int MovingHead7::TILT2_INDEX = 2 [static, private]
 

Definition at line 70 of file MovingHead7.h.

Referenced by MoveToZeroPos(), and SetJointGain().

const word MovingHead7::TILT2_PGAIN = 0x0008 [static, private]
 

Definition at line 85 of file MovingHead7.h.

Referenced by SetJointGain().

const double MovingHead7::TILT2_ZERO_POS = 0.0 [static, private]
 

Definition at line 74 of file MovingHead7.h.

Referenced by MoveToZeroPos().

const int MovingHead7::ZERO_POS_MAX_COUNTER = 16 [static, private]
 

Definition at line 93 of file MovingHead7.h.

Referenced by MoveToZeroPos().


The documentation for this class was generated from the following files:
Generated on Sun Dec 2 23:04:34 2007 for openSDK by  doxygen 1.3.9.1