Drake
|
The FreestandingInputPort encapsulates a vector of data for use as an input to a System. More...
#include <drake/systems/framework/system_input.h>
Public Member Functions | |
FreestandingInputPort (std::unique_ptr< VectorInterface< T >> vector_data) | |
Constructs a continuous FreestandingInputPort. More... | |
FreestandingInputPort (std::unique_ptr< VectorInterface< T >> vector_data, double sample_time_sec) | |
Constructs a FreestandingInputPort with the given sample rate sample_time_sec , which should be zero for continuous ports. More... | |
~FreestandingInputPort () override | |
int64_t | get_version () const override |
Returns a positive and monotonically increasing number that is guaranteed to change whenever GetMutableVectorData is called. More... | |
double | get_sample_time_sec () const override |
Returns the sampling interval of this port in seconds, or zero if this port is continuous. More... | |
const VectorInterface< T > * | get_vector_data () const override |
Returns the vector data on this port, or nullptr if this port is not vector-valued or not connected. More... | |
VectorInterface< T > * | GetMutableVectorData () |
Returns a pointer to the data inside this InputPort, and updates the version so that Contexts depending on this InputPort know to invalidate their caches. More... | |
Public Member Functions inherited from InputPort< T > | |
~InputPort () override | |
void | set_invalidation_callback (std::function< void()> callback) |
Registers callback to be called whenever the value of get_version changes. More... | |
void | Invalidate () override |
Receives notification that the output port on which this InputPort depends has changed, and calls the invalidation_callback_. More... | |
Public Member Functions inherited from OutputPortListenerInterface | |
virtual | ~OutputPortListenerInterface () |
Additional Inherited Members | |
Protected Member Functions inherited from InputPort< T > | |
InputPort () | |
The FreestandingInputPort encapsulates a vector of data for use as an input to a System.
T | The type of the input port. Must be a valid Eigen scalar. |
|
inlineexplicit |
Constructs a continuous FreestandingInputPort.
Takes ownership of vector_data
.
|
inline |
Constructs a FreestandingInputPort with the given sample rate sample_time_sec
, which should be zero for continuous ports.
Takes ownership of vector_data
.
|
inlineoverride |
|
inlineoverridevirtual |
Returns the sampling interval of this port in seconds, or zero if this port is continuous.
Implements InputPort< T >.
|
inlineoverridevirtual |
Returns the vector data on this port, or nullptr if this port is not vector-valued or not connected.
Implementations must ensure that get_vector_data is O(1) and initiates no substantive computation.
Implements InputPort< T >.
|
inlineoverridevirtual |
Returns a positive and monotonically increasing number that is guaranteed to change whenever GetMutableVectorData is called.
Implements InputPort< T >.
|
inline |
Returns a pointer to the data inside this InputPort, and updates the version so that Contexts depending on this InputPort know to invalidate their caches.
To ensure invalidation notifications are delivered, callers should call this method every time they wish to update the stored value. In particular, callers MUST NOT write on the returned pointer if there is any possibility this FreestandingInputPort has been accessed since the last time this method was called.