Drake
SystemOutput< T > Class Template Reference

Conveniently stores a snapshot of the values of every output port of a System. More...

#include <drake/systems/framework/system_output.h>

Public Member Functions

 ~SystemOutput ()=default
 
int get_num_ports () const
 Returns the number of output ports specified for this SystemOutput during allocation. More...
 
const AbstractValueget_data (int index) const
 Returns the last-saved value of output port index as an AbstractValue. More...
 
const BasicVector< T > * get_vector_data (int index) const
 Returns the last-saved value of output port index as a BasicVector<T>, although the actual concrete type is preserved from the actual output port. More...
 
AbstractValueGetMutableData (int index)
 (Advanced) Returns mutable access to an AbstractValue object that is suitable for holding the value of output port index of the allocating System. More...
 
BasicVector< T > * GetMutableVectorData (int index)
 (Advanced) Returns mutable access to a BasicVector<T> object that is suitable for holding the value of output port index of the allocating System. More...
 
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 SystemOutput (const SystemOutput &)=default
 
SystemOutputoperator= (const SystemOutput &)=default
 
 SystemOutput (SystemOutput &&)=default
 
SystemOutputoperator= (SystemOutput &&)=default
 

Friends

class System< T >
 
class SystemOutputTest
 

Detailed Description

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

Conveniently stores a snapshot of the values of every output port of a System.

There is framework support for allocating the right types and filling them in but otherwise this is not used internally. Note that there is never any live connection between a SystemOutput object and the System whose output values it has captured.

A SystemOutput<T> object can only be obtained using System<T>::AllocateOutput() or by copying an existing SystemOutput object.

Template Parameters
TThe type of the output data. Must be a valid Eigen scalar.

Constructor & Destructor Documentation

SystemOutput ( const SystemOutput< T > &  )
default
SystemOutput ( SystemOutput< T > &&  )
default
~SystemOutput ( )
default

Member Function Documentation

const AbstractValue* get_data ( int  index) const
inline

Returns the last-saved value of output port index as an AbstractValue.

This works for any output port regardless of it actual type.

Here is the caller graph for this function:

int get_num_ports ( ) const
inline

Returns the number of output ports specified for this SystemOutput during allocation.

Here is the caller graph for this function:

const BasicVector<T>* get_vector_data ( int  index) const
inline

Returns the last-saved value of output port index as a BasicVector<T>, although the actual concrete type is preserved from the actual output port.

Throws std::bad_cast if the port is not vector-valued.

Here is the caller graph for this function:

AbstractValue* GetMutableData ( int  index)
inline

(Advanced) Returns mutable access to an AbstractValue object that is suitable for holding the value of output port index of the allocating System.

This works for any output port regardless of it actual type. Most users should just call System<T>::CalcOutputs() to get all the output port values at once.

Here is the caller graph for this function:

BasicVector<T>* GetMutableVectorData ( int  index)
inline

(Advanced) Returns mutable access to a BasicVector<T> object that is suitable for holding the value of output port index of the allocating System.

The object's concrete type is preserved from the output port. Most users should just call System<T>::CalcOutputs() to get all the output port values at once. Throws std::bad_cast if the port is not vector-valued.

Here is the caller graph for this function:

SystemOutput& operator= ( const SystemOutput< T > &  )
default
SystemOutput& operator= ( SystemOutput< T > &&  )
default

Friends And Related Function Documentation

friend class System< T >
friend
friend class SystemOutputTest
friend

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