MovingHead Class Reference

#include <MovingHead.h>

List of all members.

Public Member Functions

 MovingHead ()
virtual ~MovingHead ()
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 NotifyCommand (const ONotifyEvent &event)
void ReadyMove (const OReadyEvent &event)
 MovingHead ()
virtual ~MovingHead ()
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]
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)
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

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

Static Private Attributes

const size_t NUM_COMMAND_VECTOR = 2
const size_t NUM_JOINTS = 3
const int TILT_INDEX = 0
const int PAN_INDEX = 1
const int ROLL_INDEX = 2
const word TILT_PGAIN = 0x000a
const word TILT_IGAIN = 0x0008
const word TILT_DGAIN = 0x000c
const word PAN_PGAIN = 0x000d
const word PAN_IGAIN = 0x0008
const word PAN_DGAIN = 0x000b
const word ROLL_PGAIN = 0x000a
const word ROLL_IGAIN = 0x0008
const word ROLL_DGAIN = 0x000c
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

MovingHead::MovingHead  ) 
 

Definition at line 20 of file BallTrackingHead/MovingHead2/MovingHead.cc.

References jointID, MHS_IDLE, and region.

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

Definition at line 42 of file BallTrackingHead/MovingHead2/MovingHead.h.

MovingHead::MovingHead  ) 
 

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

Definition at line 42 of file MovingHead/MovingHead/MovingHead.h.


Member Function Documentation

MovingResult MovingHead::AdjustDiffJointValue  )  [private]
 

MovingResult MovingHead::AdjustDiffJointValue  )  [private]
 

Definition at line 217 of file BallTrackingHead/MovingHead2/MovingHead.cc.

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

Referenced by NotifyCommand(), Ready(), and ReadyMove().

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

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

Definition at line 70 of file BallTrackingHead/MovingHead2/MovingHead.cc.

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

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

Definition at line 27 of file BallTrackingHead/MovingHead2/MovingHead.cc.

References NewCommandVectorData(), and OpenPrimitives().

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

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

Definition at line 47 of file BallTrackingHead/MovingHead2/MovingHead.cc.

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

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

Definition at line 58 of file BallTrackingHead/MovingHead2/MovingHead.cc.

References movingHeadState.

RCRegion* MovingHead::FindFreeRegion  )  [private]
 

RCRegion * MovingHead::FindFreeRegion  )  [private]
 

Definition at line 314 of file BallTrackingHead/MovingHead2/MovingHead.cc.

Referenced by MoveToZeroPos().

MovingResult MovingHead::MoveToZeroPos  )  [private]
 

MovingResult MovingHead::MoveToZeroPos  )  [private]
 

Definition at line 234 of file BallTrackingHead/MovingHead2/MovingHead.cc.

References FindFreeRegion(), GetJointValue(), jointID, MOVING_CONT, MOVING_FINISH, MovingResult, PAN_INDEX, ROLL_INDEX, SetJointValue(), subject, TILT_INDEX, and ZERO_POS_MAX_COUNTER.

Referenced by Ready(), and ReadyMove().

void MovingHead::NewCommandVectorData  )  [private]
 

void MovingHead::NewCommandVectorData  )  [private]
 

Definition at line 160 of file BallTrackingHead/MovingHead2/MovingHead.cc.

References jointID, NUM_JOINTS, and region.

Referenced by DoInit().

void MovingHead::NotifyCommand const ONotifyEvent &  event  ) 
 

Definition at line 77 of file BallTrackingHead/MovingHead2/MovingHead.cc.

References AdjustDiffJointValue(), BTH_INVALID_ARG, movingHeadState, observer, subject, and BallTrackingHeadCommand::type.

void MovingHead::OpenPrimitives  )  [private]
 

void MovingHead::OpenPrimitives  )  [private]
 

Definition at line 147 of file BallTrackingHead/MovingHead2/MovingHead.cc.

References jointID.

Referenced by DoInit().

void MovingHead::Ready const OReadyEvent &  event  ) 
 

Definition at line 84 of file MovingHead/MovingHead/MovingHead.cc.

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

void MovingHead::ReadyMove const OReadyEvent &  event  ) 
 

Definition at line 103 of file BallTrackingHead/MovingHead2/MovingHead.cc.

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

void MovingHead::SetJointGain  )  [private]
 

void MovingHead::SetJointGain  )  [private]
 

Definition at line 192 of file BallTrackingHead/MovingHead2/MovingHead.cc.

References DSHIFT, ISHIFT, jointID, PAN_DGAIN, PAN_IGAIN, PAN_INDEX, PAN_PGAIN, PSHIFT, ROLL_DGAIN, ROLL_IGAIN, ROLL_INDEX, ROLL_PGAIN, TILT_DGAIN, TILT_IGAIN, TILT_INDEX, and TILT_PGAIN.

Referenced by Ready(), and ReadyMove().

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

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

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

Definition at line 342 of file BallTrackingHead/MovingHead2/MovingHead.cc.

References jointID.

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

Definition at line 324 of file BallTrackingHead/MovingHead2/MovingHead.cc.

Referenced by AdjustDiffJointValue(), and MoveToZeroPos().

MovingResult MovingHead::SwingHead  )  [private]
 

MovingResult MovingHead::SwingHead  )  [private]
 

Definition at line 290 of file BallTrackingHead/MovingHead2/MovingHead.cc.

Referenced by Ready(), and ReadyMove().


Member Data Documentation

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

Definition at line 86 of file MovingHead/MovingHead/MovingHead.h.

Referenced by SetJointGain().

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

Definition at line 85 of file MovingHead/MovingHead/MovingHead.h.

Referenced by SetJointGain().

OPrimitiveID MovingHead::jointID [private]
 

Definition at line 92 of file MovingHead/MovingHead/MovingHead.h.

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

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

Definition at line 89 of file MovingHead/MovingHead/MovingHead.h.

MovingHeadState MovingHead::movingHeadState [private]
 

Definition at line 91 of file MovingHead/MovingHead/MovingHead.h.

Referenced by DoStop(), NotifyCommand(), Ready(), and ReadyMove().

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

Definition at line 66 of file MovingHead/MovingHead/MovingHead.h.

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

Definition at line 67 of file MovingHead/MovingHead/MovingHead.h.

Referenced by NewCommandVectorData().

OObserver* MovingHead::observer[numOfObserver]
 

Definition at line 45 of file MovingHead/MovingHead/MovingHead.h.

OObserver* MovingHead::observer[numOfObserver]
 

Definition at line 45 of file BallTrackingHead/MovingHead2/MovingHead.h.

Referenced by NotifyCommand().

const word MovingHead::PAN_DGAIN = 0x000b [static, private]
 

Definition at line 78 of file MovingHead/MovingHead/MovingHead.h.

Referenced by SetJointGain().

const word MovingHead::PAN_IGAIN = 0x0008 [static, private]
 

Definition at line 77 of file MovingHead/MovingHead/MovingHead.h.

Referenced by SetJointGain().

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

Definition at line 69 of file MovingHead/MovingHead/MovingHead.h.

Referenced by MoveToZeroPos(), and SetJointGain().

const word MovingHead::PAN_PGAIN = 0x000d [static, private]
 

Definition at line 76 of file MovingHead/MovingHead/MovingHead.h.

Referenced by SetJointGain().

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

Definition at line 84 of file MovingHead/MovingHead/MovingHead.h.

Referenced by SetJointGain().

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

Definition at line 93 of file MovingHead/MovingHead/MovingHead.h.

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

Definition at line 94 of file BallTrackingHead/MovingHead2/MovingHead.h.

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

const word MovingHead::ROLL_DGAIN = 0x000c [static, private]
 

Definition at line 82 of file MovingHead/MovingHead/MovingHead.h.

Referenced by SetJointGain().

const word MovingHead::ROLL_IGAIN = 0x0008 [static, private]
 

Definition at line 81 of file MovingHead/MovingHead/MovingHead.h.

Referenced by SetJointGain().

const int MovingHead::ROLL_INDEX = 2 [static, private]
 

Definition at line 70 of file MovingHead/MovingHead/MovingHead.h.

Referenced by MoveToZeroPos(), and SetJointGain().

const word MovingHead::ROLL_PGAIN = 0x000a [static, private]
 

Definition at line 80 of file MovingHead/MovingHead/MovingHead.h.

Referenced by SetJointGain().

OSubject* MovingHead::subject[numOfSubject]
 

Definition at line 44 of file MovingHead/MovingHead/MovingHead.h.

OSubject* MovingHead::subject[numOfSubject]
 

Definition at line 44 of file BallTrackingHead/MovingHead2/MovingHead.h.

Referenced by AdjustDiffJointValue(), MoveToZeroPos(), NotifyCommand(), and ReadyMove().

const word MovingHead::TILT_DGAIN = 0x000c [static, private]
 

Definition at line 74 of file MovingHead/MovingHead/MovingHead.h.

Referenced by SetJointGain().

const word MovingHead::TILT_IGAIN = 0x0008 [static, private]
 

Definition at line 73 of file MovingHead/MovingHead/MovingHead.h.

Referenced by SetJointGain().

const int MovingHead::TILT_INDEX = 0 [static, private]
 

Definition at line 68 of file MovingHead/MovingHead/MovingHead.h.

Referenced by MoveToZeroPos(), and SetJointGain().

const word MovingHead::TILT_PGAIN = 0x000a [static, private]
 

Definition at line 72 of file MovingHead/MovingHead/MovingHead.h.

Referenced by SetJointGain().

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

Definition at line 88 of file MovingHead/MovingHead/MovingHead.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