maliput
State< T > Class Template Reference

Detailed Description

template<typename T>
class maliput::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:

@tparam_default_scalar

#include <src/maliput/drake/systems/framework/state.h>

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 ()
 
const BasicVector< T > & get_discrete_state (int index) const
 
BasicVector< T > & get_mutable_discrete_state (int index)
 
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...
 
template<typename U >
void SetFrom (const State< U > &other)
 Initializes this state from a State. More...
 

System compatibility

See System Compatibility.

internal::SystemId get_system_id () const
 (Internal use only) Gets the id of the subsystem that created this state. More...
 
void set_system_id (internal::SystemId id)
 (Internal use only) Records the id of the subsystem that created this state. More...
 

Constructor & Destructor Documentation

◆ State()

◆ ~State()

~State
virtual

Member Function Documentation

◆ get_abstract_state() [1/2]

const AbstractValues& get_abstract_state ( ) const

◆ get_abstract_state() [2/2]

const U& get_abstract_state ( int  index) const

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

Asserts if index doesn't exist.

◆ get_continuous_state()

const ContinuousState<T>& get_continuous_state ( ) const

◆ get_discrete_state() [1/2]

const DiscreteValues<T>& get_discrete_state ( ) const

◆ get_discrete_state() [2/2]

const BasicVector<T>& get_discrete_state ( int  index) const

◆ get_mutable_abstract_state() [1/2]

AbstractValues& get_mutable_abstract_state ( )

◆ get_mutable_abstract_state() [2/2]

U& get_mutable_abstract_state ( int  index)

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

Asserts if index doesn't exist.

◆ get_mutable_continuous_state()

ContinuousState<T>& get_mutable_continuous_state ( )

◆ get_mutable_discrete_state() [1/2]

DiscreteValues<T>& get_mutable_discrete_state ( )

◆ get_mutable_discrete_state() [2/2]

BasicVector<T>& get_mutable_discrete_state ( int  index)

◆ get_system_id()

internal::SystemId get_system_id ( ) const

(Internal use only) Gets the id of the subsystem that created this state.

◆ set_abstract_state()

void set_abstract_state ( std::unique_ptr< AbstractValues xa)

◆ set_continuous_state()

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

◆ set_discrete_state()

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

◆ set_system_id()

void set_system_id ( internal::SystemId  id)

(Internal use only) Records the id of the subsystem that created this state.

◆ SetFrom()

void SetFrom ( const State< U > &  other)

Initializes this state from a State.


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