Drake
|
The InputPort describes a single input to a System, from another System or from an external driver. More...
#include <drake/systems/framework/system_input.h>
Public Member Functions | |
~InputPort () override | |
virtual int64_t | get_version () const =0 |
Returns a positive number that increases monotonically, and changes whenever the data on this port changes, according to the source of that data. More... | |
virtual double | get_sample_time_sec () const =0 |
Returns the sampling interval of this port in seconds, or zero if this port is continuous. More... | |
virtual const VectorInterface< T > * | get_vector_data () const =0 |
Returns the vector data on this port, or nullptr if this port is not vector-valued or not connected. More... | |
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 () |
Protected Member Functions | |
InputPort () | |
The InputPort describes a single input to a System, from another System or from an external driver.
Users should not subclass InputPort: all InputPorts are either DependentInputPorts or FreestandingInputPorts.
T | The type of the input port. Must be a valid Eigen scalar. |
|
inlineoverride |
|
inlineprotected |
|
pure virtual |
Returns the sampling interval of this port in seconds, or zero if this port is continuous.
Implemented in FreestandingInputPort< T >, FreestandingInputPort< int >, DependentInputPort< T >, and DependentInputPort< int >.
|
pure virtual |
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.
Implemented in FreestandingInputPort< T >, FreestandingInputPort< int >, DependentInputPort< T >, and DependentInputPort< int >.
|
pure virtual |
Returns a positive number that increases monotonically, and changes whenever the data on this port changes, according to the source of that data.
Implemented in FreestandingInputPort< T >, FreestandingInputPort< int >, DependentInputPort< T >, and DependentInputPort< int >.
|
inlineoverridevirtual |
Receives notification that the output port on which this InputPort depends has changed, and calls the invalidation_callback_.
Implements OutputPortListenerInterface.
|
inline |
Registers callback
to be called whenever the value of get_version changes.
The callback should invalidate data that depends on the value of this port, but should not do any substantive computation.