Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

TorqueCalibrate::TakeMeasurementControl Class Reference

#include <TorqueCalibrate.h>

Inheritance diagram for TorqueCalibrate::TakeMeasurementControl:

List of all members.


Detailed Description

Definition at line 40 of file TorqueCalibrate.h.


Public Member Functions

 TakeMeasurementControl (const TorqueCalibrate &tcParent, unsigned int jointToMeasure)
virtual ControlBaseactivate (MotionManager::MC_ID disp_id, Socket *gui)
 Called when the control is activated (or the control system is reactivating).
virtual void processEvent (const EventBase &event)
 for receiving events - you must override this to inherit
virtual void refresh ()
 called when the child has deactivated and this control should refresh its display, or some other event (such as the user pressing the refresh button) has happened to cause a refresh to be needed
virtual ControlBasetakeInput (const std::string &msg)
 called when the user has supplied a text string (may or may not have been prompted by doReadStdIn()! May not even be active yet - the user can direct the same input to a set of hilighted menus)
virtual void deactivate ()
 called when this control is being popped from the control stack

Protected Types

enum  State_t {
  ZERO_JOINT, RECORD_POSITION, INPUT_PULSE, DO_PULSE,
  RECORD_FORCE
}
 the states the TakeMeasurementControl goes through when recording measurements More...

Protected Member Functions

void transition (State_t newstate)
 requests a transition to another state

Protected Attributes

const TorqueCalibrateparent
unsigned int joint
float basePosition
float maxDuty
float sensorDist
State_t cstate
MotionManager::MC_ID pidID
MotionManager::MC_ID pulseID

Member Enumeration Documentation

the states the TakeMeasurementControl goes through when recording measurements

Enumerator:
ZERO_JOINT  turn off PID of joints, allow user to reposition them to the force sensor
RECORD_POSITION  record the length of the lever arm (distance from point of rotation to force sensor)
INPUT_PULSE  wait for user to specify size of pulse to perform
DO_PULSE  make the joint do the pulse
RECORD_FORCE  wait for user to report the recorded force applied

Definition at line 54 of file TorqueCalibrate.h.


Constructor & Destructor Documentation

TorqueCalibrate::TakeMeasurementControl::TakeMeasurementControl ( const TorqueCalibrate tcParent,
unsigned int  jointToMeasure 
) [inline]

Definition at line 42 of file TorqueCalibrate.h.


Member Function Documentation

ControlBase * TorqueCalibrate::TakeMeasurementControl::activate ( MotionManager::MC_ID  disp_id,
Socket gui 
) [virtual]

Called when the control is activated (or the control system is reactivating).

Takes the id number of a LedMC which the control should use, maintained by Controller. Controls share the display which is passed, and may use the socket gui to communicate with the GUI controller, if it is connected.

Returns:
a ControlBase pointer. Return:
  • this if the control should stay active (if it's not a one-shot command)
  • NULL to return to parent
  • other address to spawn a child control

Reimplemented from ControlBase.

Definition at line 52 of file TorqueCalibrate.cc.

void TorqueCalibrate::TakeMeasurementControl::processEvent ( const EventBase event  )  [virtual]

for receiving events - you must override this to inherit

See also:
EventRouter
Parameters:
event the event being received

Implements EventListener.

Definition at line 70 of file TorqueCalibrate.cc.

void TorqueCalibrate::TakeMeasurementControl::refresh (  )  [virtual]

called when the child has deactivated and this control should refresh its display, or some other event (such as the user pressing the refresh button) has happened to cause a refresh to be needed

Reimplemented from ControlBase.

Definition at line 89 of file TorqueCalibrate.cc.

Referenced by transition().

ControlBase * TorqueCalibrate::TakeMeasurementControl::takeInput ( const std::string &  msg  )  [virtual]

called when the user has supplied a text string (may or may not have been prompted by doReadStdIn()! May not even be active yet - the user can direct the same input to a set of hilighted menus)

The value which is returned is then activate()ed and pushed on the Controller's stack

Reimplemented from ControlBase.

Definition at line 125 of file TorqueCalibrate.cc.

void TorqueCalibrate::TakeMeasurementControl::deactivate (  )  [virtual]

called when this control is being popped from the control stack

Reimplemented from ControlBase.

Definition at line 176 of file TorqueCalibrate.cc.

void TorqueCalibrate::TakeMeasurementControl::transition ( State_t  newstate  )  [protected]

requests a transition to another state

Definition at line 187 of file TorqueCalibrate.cc.

Referenced by processEvent(), and takeInput().


Member Data Documentation

Definition at line 65 of file TorqueCalibrate.h.

Referenced by takeInput().

Definition at line 66 of file TorqueCalibrate.h.

Referenced by processEvent(), takeInput(), and transition().

Definition at line 67 of file TorqueCalibrate.h.

Referenced by processEvent(), and takeInput().

Definition at line 68 of file TorqueCalibrate.h.

Referenced by processEvent(), refresh(), takeInput(), and transition().

Definition at line 69 of file TorqueCalibrate.h.

Referenced by takeInput().


The documentation for this class was generated from the following files:

Tekkotsu v4.0
Generated Thu Nov 22 00:58:45 2007 by Doxygen 1.5.4