OpenSim::ControllerSet Class Reference

A class for holding and managing a set of controllers for a model. More...

#include <ControllerSet.h>

Inheritance diagram for OpenSim::ControllerSet:
OpenSim::ModelComponentSet< Controller > OpenSim::Set< Controller > OpenSim::Object

List of all members.

Public Member Functions

 ControllerSet ()
 Default constructor.
 ControllerSet (Model &model)
 ControllerSet (const ControllerSet &aControllerSet)
 Copy constructor.
 ControllerSet (Model &model, const std::string &aFileName, bool aUpdateFromXMLNode=true)
 Construct a controller set from file.
virtual ~ControllerSet ()
 Destructor.
virtual Objectcopy () const
 Copy this ControllerSet and return a pointer to the copy.
void copyData (const ControllerSet &aAbsControllerSet)
 Copy the member variables of the ControllerSet.
ControllerSetoperator= (const ControllerSet &aSet)
 Assignment operator.
bool set (int aIndex, Controller *aController)
 Set the controller at an index.
bool addController (Controller *aController)
 Add a Controller to the set.
virtual void constructStorage ()
virtual void storeControls (const SimTK::State &s, int step)
virtual void printControlStorage (const std::string &fileName) const
virtual void setActuators (Set< Actuator > &)
virtual void setModel (Model *model)
virtual bool check () const
 Check that all actuators have a valid controller.
virtual double getFirstTime () const
virtual double getLastTime () const
virtual void setDesiredStates (Storage *yStore)
virtual void setup (Model &aModel)
virtual void setupSystem (SimTK::MultibodySystem &system)
virtual void printInfo () const

Detailed Description

A class for holding and managing a set of controllers for a model.

Authors:
Jack Middleton
Version:
1.0

Constructor & Destructor Documentation

ControllerSet::ControllerSet (  ) 

Default constructor.

ControllerSet::ControllerSet ( Model model  ) 
ControllerSet::ControllerSet ( const ControllerSet aControllerSet  ) 

Copy constructor.

Parameters:
aControllerSet ControllerSet to be copied.
ControllerSet::ControllerSet ( Model model,
const std::string &  aFileName,
bool  aUpdateFromXMLNode = true 
)

Construct a controller set from file.

Parameters:
aFileName Name of the file.
ControllerSet::~ControllerSet (  )  [virtual]

Destructor.


Member Function Documentation

bool ControllerSet::addController ( Controller aController  ) 

Add a Controller to the set.

A copy of the specified controller is not made.

This method overrides the method in Set<Controller> so that several internal variables of the controller set can be updated.

Parameters:
aController Pointer to the controller to be appended.
Returns:
True if successful; false otherwise.
bool ControllerSet::check (  )  const [virtual]

Check that all actuators have a valid controller.

void ControllerSet::constructStorage (  )  [virtual]
Object * ControllerSet::copy (  )  const [virtual]

Copy this ControllerSet and return a pointer to the copy.

The copy constructor for this class is used.

Returns:
Pointer to a copy of this ControllerSet.

Reimplemented from OpenSim::ModelComponentSet< Controller >.

void ControllerSet::copyData ( const ControllerSet aControllerSet  ) 

Copy the member variables of the ControllerSet.

Parameters:
aControllerSet controller set to be copied
double ControllerSet::getFirstTime (  )  const [virtual]
double ControllerSet::getLastTime (  )  const [virtual]
ControllerSet & ControllerSet::operator= ( const ControllerSet aControllerSet  ) 

Assignment operator.

Returns:
Reference to this object.

Reimplemented from OpenSim::Object.

virtual void OpenSim::ControllerSet::printControlStorage ( const std::string &  fileName  )  const [virtual]
void ControllerSet::printInfo (  )  const [virtual]
bool ControllerSet::set ( int  aIndex,
Controller aController 
)

Set the controller at an index.

A copy of the specified controller is NOT made. The controller previously set a the index is removed (and deleted).

This method overrides the method in Set<Controller> so that several internal variables of the controller set can be updated.

Parameters:
aIndex Array index where the controller is to be stored. aIndex should be in the range 0 <= aIndex <= getSize();
acontroller Pointer to the controller to be set.
Returns:
True if successful; false otherwise.
void ControllerSet::setActuators ( Set< Actuator > &  as  )  [virtual]
void ControllerSet::setDesiredStates ( Storage yStore  )  [virtual]
void ControllerSet::setModel ( Model model  )  [virtual]
void ControllerSet::setup ( Model aModel  )  [virtual]
void ControllerSet::setupSystem ( SimTK::MultibodySystem &  system  )  [virtual]
void ControllerSet::storeControls ( const SimTK::State &  s,
int  step 
) [virtual]

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

Generated on Wed Dec 16 15:03:45 2009 for OpenSim by  doxygen 1.6.1