Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

TorqueCalibrate::TakeMeasurementControl Class Reference

#include <TorqueCalibrate.h>

Inheritance diagram for TorqueCalibrate::TakeMeasurementControl:

Detailed Description

Definition at line 47 of file TorqueCalibrate.h.

List of all members.

Public Member Functions

 TakeMeasurementControl (const TorqueCalibrate &tcParent, unsigned int jointToMeasure)
virtual ControlBaseactivate (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
MC_ID pidID
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 61 of file TorqueCalibrate.h.


Constructor & Destructor Documentation

TorqueCalibrate::TakeMeasurementControl::TakeMeasurementControl ( const TorqueCalibrate tcParent,
unsigned int  jointToMeasure 
)

Definition at line 49 of file TorqueCalibrate.h.


Member Function Documentation

ControlBase * TorqueCalibrate::TakeMeasurementControl::activate ( 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 55 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 180 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 74 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 93 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 129 of file TorqueCalibrate.cc.

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

requests a transition to another state

Definition at line 191 of file TorqueCalibrate.cc.

Referenced by processEvent(), and takeInput().


Member Data Documentation

Definition at line 73 of file TorqueCalibrate.h.

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

Definition at line 72 of file TorqueCalibrate.h.

Referenced by takeInput().

Definition at line 76 of file TorqueCalibrate.h.

Referenced by takeInput().


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:17 2016 by Doxygen 1.6.3