delphyne
VectorSource< T > Class Template Referencefinal

Detailed Description

template<typename T>
class delphyne::VectorSource< T >

The VectorSource is a drake system to continually set an output port to a fixed value until the user decides to change it via the Set API.

At that point, the value will be (safely) updated to the new value, and the ConstantVectorSettable will continue outputting that value until the user asks for a new one. This differs from drake's ConstantVectorSource in that it is thread-safe with respect to changes to the ConstantVector.

Template Parameters
Tmust be a valid Eigen ScalarType

#include <src/systems/vector_source.h>

Inheritance diagram for VectorSource< T >:
[legend]

Public Member Functions

 VectorSource (T defaultval)
 
 ~VectorSource () override
 
Get (const drake::systems::Context< T > &context) const
 Returns the value stored in context. More...
 
void Set (T new_val)
 Sets a new value that will eventually be synchronized into context. More...
 
const drake::systems::OutputPort< T > & output () const
 

Protected Member Functions

void DoCalcNextUpdateTime (const drake::systems::Context< T > &context, drake::systems::CompositeEventCollection< T > *events, T *time) const override
 
void DoCalcUnrestrictedUpdate (const drake::systems::Context< T > &context, const std::vector< const drake::systems::UnrestrictedUpdateEvent< T > * > &, drake::systems::State< T > *state) const override
 
void CalcOutputValue (const drake::systems::Context< T > &context, drake::systems::BasicVector< T > *output) const
 

Constructor & Destructor Documentation

◆ VectorSource()

VectorSource ( defaultval)
explicit

◆ ~VectorSource()

~VectorSource ( )
override

Member Function Documentation

◆ CalcOutputValue()

void CalcOutputValue ( const drake::systems::Context< T > &  context,
drake::systems::BasicVector< T > *  output 
) const
protected

◆ DoCalcNextUpdateTime()

void DoCalcNextUpdateTime ( const drake::systems::Context< T > &  context,
drake::systems::CompositeEventCollection< T > *  events,
T *  time 
) const
overrideprotected

◆ DoCalcUnrestrictedUpdate()

void DoCalcUnrestrictedUpdate ( const drake::systems::Context< T > &  context,
const std::vector< const drake::systems::UnrestrictedUpdateEvent< T > * > &  ,
drake::systems::State< T > *  state 
) const
overrideprotected

◆ Get()

T Get ( const drake::systems::Context< T > &  context) const

Returns the value stored in context.

◆ output()

const drake::systems::OutputPort<T>& output ( ) const

◆ Set()

void Set ( new_val)

Sets a new value that will eventually be synchronized into context.


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