#include <ControlSetController.h>
Public Member Functions | |
ControlSetController () | |
Default constructor. | |
ControlSetController (const std::string &aFileName, bool aUpdateFromXMLNode=true) | |
Constructor from an XML Document. | |
ControlSetController (const ControlSetController &aController) | |
Copy constructor. | |
virtual | ~ControlSetController () |
Destructor. | |
virtual Object * | copy () const |
Copy this ControlSetController and return a pointer to the copy. | |
const ControlSet * | getControlSet () |
ControlSet * | updControlSet () |
void | setControlSet (ControlSet *aControlSet) |
ControlSetController & | operator= (const ControlSetController &aController) |
Assignment operator. | |
virtual double | computeControl (const SimTK::State &s, int index) const |
Compute the control value for an acuator. | |
virtual void | setActuators (Set< Actuator > &actuators) |
virtual void | setControlSetFileName (const std::string &controlSetFileName) |
Set name of ControlSet file. | |
const std::string & | getControlSetFileName () const |
virtual void | setup (Model &model) |
virtual void | createSystem (SimTK::MultibodySystem &system) |
virtual void | initState (SimTK::State &s) |
virtual double | getFirstTime () const |
return the min an max times that a controller knows how to supply controlls for | |
virtual double | getLastTime () const |
Protected Member Functions | |
virtual void | setupProperties () |
Connect properties to local pointers. | |
void | copyData (const ControlSetController &aController) |
Copy the member variables of the specified controller. | |
Protected Attributes | |
ControlSet * | _controlSet |
PropertyStr | _controlsFileNameProp |
Name of the controls file. | |
std::string & | _controlsFileName |
ControlSetController::ControlSetController | ( | ) |
Default constructor.
ControlSetController::ControlSetController | ( | const std::string & | aFileName, | |
bool | aUpdateFromXMLNode = true | |||
) |
Constructor from an XML Document.
aFileName | The name of the XML file in which this Controller is defined. | |
aUpdateFromXMLNode | A flag indicating whether or not to call updateFromXMLNode() from this constructor. If true, the method will be called from this class. Typically, the flag should be true for this class, but in the member initializer list for this constructor, this class's parent class's constructor with the same parameters will be called, but with aUpdateFromXMLNode set to false. |
ControlSetController::ControlSetController | ( | const ControlSetController & | aController | ) |
Copy constructor.
This constructor is called by any code that contains a command of the form "Controller newController(oldController);".
aController | The controller to be copied. |
ControlSetController::~ControlSetController | ( | ) | [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.
double ControlSetController::computeControl | ( | const SimTK::State & | s, | |
int | index | |||
) | const [virtual] |
Compute the control value for an acuator.
s | system state | |
index | the id the controller uses to determin which actuator |
Implements OpenSim::Controller.
Object * ControlSetController::copy | ( | ) | const [virtual] |
Copy this ControlSetController 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 ControlSetController::copyData | ( | const ControlSetController & | 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.
void ControlSetController::createSystem | ( | SimTK::MultibodySystem & | system | ) | [virtual] |
Reimplemented from OpenSim::Controller.
const ControlSet* OpenSim::ControlSetController::getControlSet | ( | ) | [inline] |
const std::string& OpenSim::ControlSetController::getControlSetFileName | ( | ) | const [inline] |
double ControlSetController::getFirstTime | ( | ) | const [virtual] |
return the min an max times that a controller knows how to supply controlls for
Reimplemented from OpenSim::Controller.
double ControlSetController::getLastTime | ( | ) | const [virtual] |
Reimplemented from OpenSim::Controller.
void ControlSetController::initState | ( | SimTK::State & | s | ) | [virtual] |
Reimplemented from OpenSim::Controller.
ControlSetController & ControlSetController::operator= | ( | const ControlSetController & | aController | ) |
Assignment operator.
This method is called automatically whenever a command of the form "controller1 = controller2;" is made, where both controller1 and controller2 are both of type Controller. Although Controller cannot be instantiated directly, a subclass of Controller could implement its own operator= method that calls Controller's operator= method. If the subclass does not implement its own operator= method, then when a command of the form "controller1 = controller2" is made, where both controller1 and controller2 are instants of the subclass, the Controller class's operator= method will be called automatically.
aController | The controller to be copied. |
Reimplemented from OpenSim::Controller.
Reimplemented from OpenSim::Controller.
void OpenSim::ControlSetController::setControlSet | ( | ControlSet * | aControlSet | ) | [inline] |
void ControlSetController::setControlSetFileName | ( | const std::string & | controlSetFileName | ) | [virtual] |
Set name of ControlSet file.
Connect properties to local pointers.
void ControlSetController::setup | ( | Model & | model | ) | [virtual] |
Reimplemented from OpenSim::Controller.
void ControlSetController::setupProperties | ( | void | ) | [protected, virtual] |
Connect properties to local pointers.
Reimplemented from OpenSim::Controller.
ControlSet* OpenSim::ControlSetController::updControlSet | ( | ) | [inline] |
ControlSet* OpenSim::ControlSetController::_controlSet [protected] |
std::string& OpenSim::ControlSetController::_controlsFileName [protected] |
Name of the controls file.