delphyne
|
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.
T | must be a valid Eigen ScalarType |
#include <src/systems/vector_source.h>
Public Member Functions | |
VectorSource (T defaultval) | |
~VectorSource () override | |
T | 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 |
|
explicit |
|
override |
|
protected |
|
overrideprotected |
|
overrideprotected |
T Get | ( | const drake::systems::Context< T > & | context | ) | const |
Returns the value stored in context
.
const drake::systems::OutputPort<T>& output | ( | ) | const |
void Set | ( | T | new_val | ) |
Sets a new value that will eventually be synchronized into context
.