#include <PrescribedController.h>
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 Object * | copy () const |
Copy this PrescribedController and return a pointer to the copy. | |
OPENSIM_DECLARE_DERIVED (PrescribedController, Controller) | |
PrescribedController & | operator= (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 |
PrescribedController::PrescribedController | ( | ) |
Default constructor.
PrescribedController::PrescribedController | ( | Model & | aModel | ) |
Constructor to create and add to a Model.
Constructor.
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.
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.
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.
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.
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.
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.
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.
aController | The controller to be copied. |
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.
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.
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.