Drake
State< T > Class Template Reference

State is a container for all the data comprising the complete state of a particular System at a particular moment. More...

#include <systems/framework/state.h>

Inheritance diagram for State< T >:
[legend]

Public Member Functions

 State ()
 
virtual ~State ()
 
void set_continuous_state (std::unique_ptr< ContinuousState< T >> xc)
 
const ContinuousState< T > & get_continuous_state () const
 
ContinuousState< T > & get_mutable_continuous_state ()
 
void set_discrete_state (std::unique_ptr< DiscreteValues< T >> xd)
 
const DiscreteValues< T > & get_discrete_state () const
 
DiscreteValues< T > & get_mutable_discrete_state ()
 
void set_abstract_state (std::unique_ptr< AbstractValues > xa)
 
const AbstractValuesget_abstract_state () const
 
AbstractValuesget_mutable_abstract_state ()
 
template<typename U >
const U & get_abstract_state (int index) const
 Returns a const pointer to the abstract component of the state at index. More...
 
template<typename U >
U & get_mutable_abstract_state (int index)
 Returns a mutable pointer to element index of the abstract state. More...
 
void CopyFrom (const State< T > &other)
 Copies the values from another State of the same scalar type into this State. More...
 
void SetFrom (const State< double > &other)
 Initializes this state (regardless of scalar type) from a State<double>. More...
 
Does not allow copy, move, or assignment
 State (const State &)=delete
 
Stateoperator= (const State &)=delete
 
 State (State &&)=delete
 
Stateoperator= (State &&)=delete
 

Detailed Description

template<typename T>
class drake::systems::State< T >

State is a container for all the data comprising the complete state of a particular System at a particular moment.

Any field in State may be empty if it is not applicable to the System in question. A System may not maintain state in any place other than a State object.

A State x contains three types of state variables:

Template Parameters
TA mathematical type compatible with Eigen's Scalar.

Constructor & Destructor Documentation

State ( const State< T > &  )
delete
State ( State< T > &&  )
delete
State ( )
inline
virtual ~State ( )
inlinevirtual

Member Function Documentation

void CopyFrom ( const State< T > &  other)
inline

Copies the values from another State of the same scalar type into this State.

Here is the caller graph for this function:

const AbstractValues& get_abstract_state ( ) const
inline

Here is the caller graph for this function:

const U& get_abstract_state ( int  index) const
inline

Returns a const pointer to the abstract component of the state at index.

Asserts if index doesn't exist.

const ContinuousState<T>& get_continuous_state ( ) const
inline

Here is the caller graph for this function:

const DiscreteValues<T>& get_discrete_state ( ) const
inline

Here is the caller graph for this function:

AbstractValues& get_mutable_abstract_state ( )
inline

Here is the caller graph for this function:

U& get_mutable_abstract_state ( int  index)
inline

Returns a mutable pointer to element index of the abstract state.

Asserts if index doesn't exist.

ContinuousState<T>& get_mutable_continuous_state ( )
inline

Here is the caller graph for this function:

DiscreteValues<T>& get_mutable_discrete_state ( )
inline

Here is the caller graph for this function:

State& operator= ( State< T > &&  )
delete
State& operator= ( const State< T > &  )
delete
void set_abstract_state ( std::unique_ptr< AbstractValues xa)
inline

Here is the caller graph for this function:

void set_continuous_state ( std::unique_ptr< ContinuousState< T >>  xc)
inline

Here is the caller graph for this function:

void set_discrete_state ( std::unique_ptr< DiscreteValues< T >>  xd)
inline

Here is the caller graph for this function:

void SetFrom ( const State< double > &  other)
inline

Initializes this state (regardless of scalar type) from a State<double>.

All scalar types in Drake must support initialization from doubles.


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