OpenSim::PrescribedController Class Reference

#include <PrescribedController.h>

Inheritance diagram for OpenSim::PrescribedController:
OpenSim::Controller OpenSim::ModelComponent OpenSim::Object

List of all members.

Public Member Functions

 PrescribedController ()
 Default constructor.
 PrescribedController (Model &aModel)
 Constructor to create and add to a Model.
 PrescribedController (const std::string &aFileName, bool aUpdateFromXMLNode=true)
 Constructor from an XML Document.
 PrescribedController (const PrescribedController &PrescribedController)
 Copy constructor.
virtual ~PrescribedController ()
 Destructor.
virtual Objectcopy () const
 Copy this PrescribedController and return a pointer to the copy.
 OPENSIM_DECLARE_DERIVED (PrescribedController, Controller)
PrescribedControlleroperator= (const PrescribedController &PrescribedController)
 Assignment operator.
virtual void computeControls (const SimTK::State &s, SimTK::Vector &controls) const
 Set this class's pointer to the set containing functions of the desired controls to be executed by this Controller.
void prescribeControlForActuator (int index, OpenSim::Function *prescribedFunction)
 Assign a prescribe control function for the desired actuator identified by its index.
void prescribeControlForActuator (const std::string actName, OpenSim::Function *prescribedFunction)
 Assign a prescribe control function for the desired actuator identified by its name.

Protected Member Functions

virtual void setupProperties ()
 Connect properties to local pointers.
void copyData (const PrescribedController &aController)
 Copy the member variables of the specified controller.

Protected Attributes

PropertyObj _prescribedControlFunctionsProp
FunctionSet_prescribedControlFunctions

Constructor & Destructor Documentation

PrescribedController::PrescribedController (  ) 

Default constructor.

PrescribedController::PrescribedController ( Model aModel  ) 

Constructor to create and add to a Model.

Constructor.

Parameters:
aModel The model that has actuators being controlled by this Controller.
PrescribedController::PrescribedController ( const std::string &  aFileName,
bool  aUpdateFromXMLNode = true 
)

Constructor from an XML Document.

Parameters:
aFileName,: The XML file in which this Controller is defined
aUpdateFromXMLNode,: A flag indicating whether or not to call updateFromXMLNode() from this constructor.
PrescribedController::PrescribedController ( const PrescribedController PrescribedController  ) 

Copy constructor.

Parameters:
aController The controller to be copied.
PrescribedController::~PrescribedController (  )  [virtual]

Destructor.

This method should be a member of any subclass of the Controller class. It will be called automatically whenever an instance of the subclass is deleted from memory.


Member Function Documentation

void PrescribedController::computeControls ( const SimTK::State &  s,
SimTK::Vector &  controls 
) const [virtual]

Set this class's pointer to the set containing functions of the desired controls to be executed by this Controller.

Parameters:
functions Pointer to a Set of Functions- one per actuator Compute the control values for all actuators under the control of this Controller
s system state
model controls

Implements OpenSim::Controller.

Object * PrescribedController::copy (  )  const [virtual]

Copy this PrescribedController and return a pointer to the copy.

The copy constructor for this class is used. This method is called when a description of this controller is read in from an XML file.

Returns:
Pointer to a copy of this PrescribedController.

Reimplemented from OpenSim::Object.

void PrescribedController::copyData ( const PrescribedController aController  )  [protected]

Copy the member variables of the specified controller.

This method is called by the copy constructor of the Controller class.

Parameters:
aController The controller whose data is to be copied.

Reimplemented from OpenSim::Controller.

OpenSim::PrescribedController::OPENSIM_DECLARE_DERIVED ( PrescribedController  ,
Controller   
)
PrescribedController & PrescribedController::operator= ( const PrescribedController PrescribedController  ) 

Assignment operator.

Parameters:
aController The controller to be copied.
Returns:
Reference to the altered object.

Reimplemented from OpenSim::Controller.

void PrescribedController::prescribeControlForActuator ( const std::string  actName,
OpenSim::Function prescribedFunction 
)

Assign a prescribe control function for the desired actuator identified by its name.

Parameters:
name,the actuator's name to be found in the controller's actuator set
prescribedFunction,the actuator's control function
void PrescribedController::prescribeControlForActuator ( int  index,
OpenSim::Function prescribedFunction 
)

Assign a prescribe control function for the desired actuator identified by its index.

Parameters:
index,the actuator's index in the controller's actuator set
prescribedFunction,the actuator's control function
void PrescribedController::setupProperties ( void   )  [protected, virtual]

Connect properties to local pointers.

Reimplemented from OpenSim::Controller.


Member Data Documentation


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

Generated on Sun Sep 25 00:19:54 2011 for OpenSim by  doxygen 1.6.1