Drake
InputPort< T > Class Template Referenceabstract

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>

Inheritance diagram for InputPort< T >:
Collaboration diagram for InputPort< T >:

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 ()
 

Detailed Description

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

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.

Template Parameters
TThe type of the input port. Must be a valid Eigen scalar.

Constructor & Destructor Documentation

~InputPort ( )
inlineoverride
InputPort ( )
inlineprotected

Member Function Documentation

virtual double get_sample_time_sec ( ) const
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 >.

Here is the caller graph for this function:

virtual const VectorInterface<T>* get_vector_data ( ) const
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 >.

Here is the caller graph for this function:

virtual int64_t get_version ( ) const
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 >.

Here is the caller graph for this function:

void Invalidate ( )
inlineoverridevirtual

Receives notification that the output port on which this InputPort depends has changed, and calls the invalidation_callback_.

Implements OutputPortListenerInterface.

void set_invalidation_callback ( std::function< void()>  callback)
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.


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