LMasterRSlave7 Class Reference

#include <LMasterRSlave7.h>

List of all members.

Public Member Functions

 LMasterRSlave7 ()
virtual ~LMasterRSlave7 ()
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 ReadyEffector (const OReadyEvent &event)
void NotifySensor (const ONotifyEvent &event)

Public Attributes

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

Private Member Functions

void OpenPrimitives ()
void NewCommandVectorData ()
void SetJointGain ()
MovingResult AdjustDiffJointValue ()
MovingResult MoveToBroadBase ()
MovingResult MoveToSleeping ()
MovingResult MasterSlave ()
RCRegion * FindFreeRegion ()
void SetJointValue (RCRegion *rgn, int idx, double start, double end)
void InitSensorIndex (OSensorFrameVectorData *sensorVecData)
void Sensor2Command (OSensorFrameVectorData *sensorVec, int sensorIdx, OCommandVectorData *commandVec, int commandIndex, OPrimitiveID id)

Private Attributes

LMasterRSlaveState lmasterRSlaveState
OPrimitiveID jointID [NUM_JOINTS]
RCRegion * region [NUM_COMMAND_VECTOR]
bool initSensorIndex
int sensorIndex [NUM_JOINTS]
RCRegion * latestSensorRegion

Static Private Attributes

const size_t NUM_COMMAND_VECTOR = 2
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 = 0x000a
const word TILT2_IGAIN = 0x0008
const word TILT2_DGAIN = 0x000c
const word J1_PGAIN = 0x0010
const word J1_IGAIN = 0x0004
const word J1_DGAIN = 0x0001
const word J2_PGAIN = 0x000a
const word J2_IGAIN = 0x0004
const word J2_DGAIN = 0x0001
const word J3_PGAIN = 0x0010
const word J3_IGAIN = 0x0004
const word J3_DGAIN = 0x0001
const word TAIL_PGAIN = 0x000a
const word TAIL_IGAIN = 0x0004
const word TAIL_DGAIN = 0x0004
const word PSHIFT = 0x000e
const word ISHIFT = 0x0002
const word DSHIFT = 0x000f
const int BROADBASE_MAX_COUNTER = 24
const int SLEEPING_MAX_COUNTER = 24


Constructor & Destructor Documentation

LMasterRSlave7::LMasterRSlave7  ) 
 

Definition at line 19 of file LMasterRSlave7.cc.

References jointID, LMRS_IDLE, region, and sensorIndex.

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

Definition at line 131 of file LMasterRSlave7.h.


Member Function Documentation

MovingResult LMasterRSlave7::AdjustDiffJointValue  )  [private]
 

Definition at line 253 of file LMasterRSlave7.cc.

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

Referenced by DoStart(), and ReadyEffector().

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

Definition at line 79 of file LMasterRSlave7.cc.

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

Definition at line 32 of file LMasterRSlave7.cc.

References NewCommandVectorData(), and OpenPrimitives().

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

Definition at line 48 of file LMasterRSlave7.cc.

References AdjustDiffJointValue(), lmasterRSlaveState, and subject.

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

Definition at line 66 of file LMasterRSlave7.cc.

References lmasterRSlaveState.

RCRegion * LMasterRSlave7::FindFreeRegion  )  [private]
 

Definition at line 395 of file LMasterRSlave7.cc.

References region.

Referenced by MasterSlave(), MoveToBroadBase(), and MoveToSleeping().

void LMasterRSlave7::InitSensorIndex OSensorFrameVectorData *  sensorVecData  )  [private]
 

Definition at line 423 of file LMasterRSlave7.cc.

References jointID, and sensorIndex.

Referenced by NotifySensor().

MovingResult LMasterRSlave7::MasterSlave  )  [private]
 

Definition at line 345 of file LMasterRSlave7.cc.

References FindFreeRegion(), jointID, latestSensorRegion, LFLEG_J1, LFLEG_J2, LFLEG_J3, LRLEG_J1, LRLEG_J2, LRLEG_J3, RFLEG_J1, RFLEG_J2, RFLEG_J3, RRLEG_J1, RRLEG_J2, RRLEG_J3, Sensor2Command(), sensorIndex, and subject.

Referenced by ReadyEffector().

MovingResult LMasterRSlave7::MoveToBroadBase  )  [private]
 

Definition at line 272 of file LMasterRSlave7.cc.

References BROADBASE_ANGLE, FindFreeRegion(), GetJointValue(), jointID, MOVING_FINISH, SetJointValue(), and subject.

Referenced by ReadyEffector().

MovingResult LMasterRSlave7::MoveToSleeping  )  [private]
 

Definition at line 314 of file LMasterRSlave7.cc.

References BROADBASE_ANGLE, FindFreeRegion(), MOVING_FINISH, SetJointValue(), SLEEPING_ANGLE, and subject.

Referenced by ReadyEffector().

void LMasterRSlave7::NewCommandVectorData  )  [private]
 

Definition at line 169 of file LMasterRSlave7.cc.

References jointID, NUM_JOINTS, and region.

Referenced by DoInit().

void LMasterRSlave7::NotifySensor const ONotifyEvent &  event  ) 
 

Definition at line 133 of file LMasterRSlave7.cc.

References InitSensorIndex(), initSensorIndex, latestSensorRegion, lmasterRSlaveState, and observer.

void LMasterRSlave7::OpenPrimitives  )  [private]
 

Definition at line 155 of file LMasterRSlave7.cc.

References jointID.

Referenced by DoInit().

void LMasterRSlave7::ReadyEffector const OReadyEvent &  event  ) 
 

Definition at line 86 of file LMasterRSlave7.cc.

References AdjustDiffJointValue(), lmasterRSlaveState, MasterSlave(), MoveToBroadBase(), MoveToSleeping(), MovingResult, and SetJointGain().

void LMasterRSlave7::Sensor2Command OSensorFrameVectorData *  sensorVec,
int  sensorIdx,
OCommandVectorData *  commandVec,
int  commandIndex,
OPrimitiveID  id
[private]
 

Definition at line 439 of file LMasterRSlave7.cc.

Referenced by MasterSlave().

void LMasterRSlave7::SetJointGain  )  [private]
 

Definition at line 201 of file LMasterRSlave7.cc.

References DSHIFT, HEAD_PAN, HEAD_TILT1, HEAD_TILT2, ISHIFT, J1_DGAIN, J1_IGAIN, J1_PGAIN, J2_DGAIN, J2_IGAIN, J2_PGAIN, J3_DGAIN, J3_IGAIN, J3_PGAIN, jointID, PAN_DGAIN, PAN_IGAIN, PAN_PGAIN, PSHIFT, TAIL_DGAIN, TAIL_IGAIN, TAIL_PAN, TAIL_PGAIN, TAIL_TILT, TILT1_DGAIN, TILT1_IGAIN, TILT1_PGAIN, TILT2_DGAIN, TILT2_IGAIN, and TILT2_PGAIN.

Referenced by ReadyEffector().

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

Definition at line 405 of file LMasterRSlave7.cc.

References jointID.

Referenced by AdjustDiffJointValue(), MoveToBroadBase(), and MoveToSleeping().


Member Data Documentation

const int LMasterRSlave7::BROADBASE_MAX_COUNTER = 24 [static, private]
 

Definition at line 194 of file LMasterRSlave7.h.

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

Definition at line 192 of file LMasterRSlave7.h.

Referenced by SetJointGain().

bool LMasterRSlave7::initSensorIndex [private]
 

Definition at line 202 of file LMasterRSlave7.h.

Referenced by NotifySensor().

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

Definition at line 191 of file LMasterRSlave7.h.

Referenced by SetJointGain().

const word LMasterRSlave7::J1_DGAIN = 0x0001 [static, private]
 

Definition at line 176 of file LMasterRSlave7.h.

Referenced by SetJointGain().

const word LMasterRSlave7::J1_IGAIN = 0x0004 [static, private]
 

Definition at line 175 of file LMasterRSlave7.h.

Referenced by SetJointGain().

const word LMasterRSlave7::J1_PGAIN = 0x0010 [static, private]
 

Definition at line 174 of file LMasterRSlave7.h.

Referenced by SetJointGain().

const word LMasterRSlave7::J2_DGAIN = 0x0001 [static, private]
 

Definition at line 180 of file LMasterRSlave7.h.

Referenced by SetJointGain().

const word LMasterRSlave7::J2_IGAIN = 0x0004 [static, private]
 

Definition at line 179 of file LMasterRSlave7.h.

Referenced by SetJointGain().

const word LMasterRSlave7::J2_PGAIN = 0x000a [static, private]
 

Definition at line 178 of file LMasterRSlave7.h.

Referenced by SetJointGain().

const word LMasterRSlave7::J3_DGAIN = 0x0001 [static, private]
 

Definition at line 184 of file LMasterRSlave7.h.

Referenced by SetJointGain().

const word LMasterRSlave7::J3_IGAIN = 0x0004 [static, private]
 

Definition at line 183 of file LMasterRSlave7.h.

Referenced by SetJointGain().

const word LMasterRSlave7::J3_PGAIN = 0x0010 [static, private]
 

Definition at line 182 of file LMasterRSlave7.h.

Referenced by SetJointGain().

OPrimitiveID LMasterRSlave7::jointID[NUM_JOINTS] [private]
 

Definition at line 199 of file LMasterRSlave7.h.

Referenced by AdjustDiffJointValue(), InitSensorIndex(), LMasterRSlave7(), MasterSlave(), MoveToBroadBase(), NewCommandVectorData(), OpenPrimitives(), SetJointGain(), and SetJointValue().

RCRegion* LMasterRSlave7::latestSensorRegion [private]
 

Definition at line 204 of file LMasterRSlave7.h.

Referenced by MasterSlave(), and NotifySensor().

LMasterRSlaveState LMasterRSlave7::lmasterRSlaveState [private]
 

Definition at line 197 of file LMasterRSlave7.h.

Referenced by DoStart(), DoStop(), NotifySensor(), and ReadyEffector().

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

Definition at line 160 of file LMasterRSlave7.h.

OObserver* LMasterRSlave7::observer[numOfObserver]
 

Definition at line 134 of file LMasterRSlave7.h.

Referenced by NotifySensor().

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

Definition at line 168 of file LMasterRSlave7.h.

Referenced by SetJointGain().

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

Definition at line 167 of file LMasterRSlave7.h.

Referenced by SetJointGain().

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

Definition at line 166 of file LMasterRSlave7.h.

Referenced by SetJointGain().

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

Definition at line 190 of file LMasterRSlave7.h.

Referenced by SetJointGain().

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

Definition at line 200 of file LMasterRSlave7.h.

Referenced by AdjustDiffJointValue(), FindFreeRegion(), LMasterRSlave7(), and NewCommandVectorData().

int LMasterRSlave7::sensorIndex[NUM_JOINTS] [private]
 

Definition at line 203 of file LMasterRSlave7.h.

Referenced by InitSensorIndex(), LMasterRSlave7(), and MasterSlave().

const int LMasterRSlave7::SLEEPING_MAX_COUNTER = 24 [static, private]
 

Definition at line 195 of file LMasterRSlave7.h.

OSubject* LMasterRSlave7::subject[numOfSubject]
 

Definition at line 133 of file LMasterRSlave7.h.

Referenced by AdjustDiffJointValue(), DoStart(), MasterSlave(), MoveToBroadBase(), and MoveToSleeping().

const word LMasterRSlave7::TAIL_DGAIN = 0x0004 [static, private]
 

Definition at line 188 of file LMasterRSlave7.h.

Referenced by SetJointGain().

const word LMasterRSlave7::TAIL_IGAIN = 0x0004 [static, private]
 

Definition at line 187 of file LMasterRSlave7.h.

Referenced by SetJointGain().

const word LMasterRSlave7::TAIL_PGAIN = 0x000a [static, private]
 

Definition at line 186 of file LMasterRSlave7.h.

Referenced by SetJointGain().

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

Definition at line 164 of file LMasterRSlave7.h.

Referenced by SetJointGain().

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

Definition at line 163 of file LMasterRSlave7.h.

Referenced by SetJointGain().

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

Definition at line 162 of file LMasterRSlave7.h.

Referenced by SetJointGain().

const word LMasterRSlave7::TILT2_DGAIN = 0x000c [static, private]
 

Definition at line 172 of file LMasterRSlave7.h.

Referenced by SetJointGain().

const word LMasterRSlave7::TILT2_IGAIN = 0x0008 [static, private]
 

Definition at line 171 of file LMasterRSlave7.h.

Referenced by SetJointGain().

const word LMasterRSlave7::TILT2_PGAIN = 0x000a [static, private]
 

Definition at line 170 of file LMasterRSlave7.h.

Referenced by SetJointGain().


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