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)
 Another constructor.
 PrescribedController (const std::string &aFileName, bool aUpdateFromXMLNode=true)
 Constructor from an XML Document.
 PrescribedController (const PrescribedController &PrescribedController)
 Copy constructor.
virtual ~PrescribedController ()
 Destructor.
PrescribedControlleroperator= (const PrescribedController &PrescribedController)
 Assignment operator.
virtual double computeControl (const SimTK::State &s, int index) 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

Array< OpenSim::Function * > _prescribedControlFunctions

Constructor & Destructor Documentation

PrescribedController::PrescribedController (  ) 

Default constructor.

PrescribedController::PrescribedController ( Model aModel  ) 

Another constructor.

Constructor.

Parameters:
aModel The model that has actualtors 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

double PrescribedController::computeControl ( const SimTK::State &  s,
int  index 
) 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 Evalate the specified functions for the control values.
s system state
rControlSet Control set used for the simulation. This method alters the control set in order to control the simulation.

Implements OpenSim::Controller.

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.

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 Wed Dec 16 15:03:44 2009 for OpenSim by  doxygen 1.6.1