Drake
DependentInputPort< T > Class Template Reference

The DependentInputPort wraps a pointer to the OutputPort of a System for use as an input to another System. More...

#include <drake/systems/framework/system_input.h>

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

Public Member Functions

 DependentInputPort (VectorOutputPort< T > *output_port, double sample_time_sec)
 Creates an input port with the given sample_time_sec, connected to the given output_port, which must not be nullptr. More...
 
 ~DependentInputPort () override
 Disconnects from the output port. More...
 
int64_t get_version () const override
 Returns the value version of the connected output port. 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...
 
- 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 ()
 

Detailed Description

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

The DependentInputPort wraps a pointer to the OutputPort of a System for use as an input to another System.

Many DependentInputPorts may wrap a single OutputPort.

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

Constructor & Destructor Documentation

DependentInputPort ( VectorOutputPort< T > *  output_port,
double  sample_time_sec 
)
inline

Creates an input port with the given sample_time_sec, connected to the given output_port, which must not be nullptr.

The output port must outlive this input port.

~DependentInputPort ( )
inlineoverride

Disconnects from the output port.

Member Function Documentation

double get_sample_time_sec ( ) const
inlineoverridevirtual

Returns the sampling interval of this port in seconds, or zero if this port is continuous.

Implements InputPort< T >.

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

int64_t get_version ( ) const
inlineoverridevirtual

Returns the value version of the connected output port.

Implements InputPort< T >.


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