Drake
InputPortValue Class Referenceabstract

InputPortValue identifies the value source for a single System input port. More...

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

Inheritance diagram for InputPortValue:
[legend]
Collaboration diagram for InputPortValue:
[legend]

## Public Member Functions

~InputPortValue () 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 bool requires_evaluation () const =0
Returns true if this InputPortValue is not in control of its own data. More...

const AbstractValueget_abstract_data () const
Returns the data on this port, which must be connected to a value source. More...

template<typename T >
const BasicVector< T > * get_vector_data () const
Returns the vector data on this port, which must be connected to a value source. More...

void set_invalidation_callback (std::function< void()> callback)
Registers callback to be called whenever the value source on which this InputPortValue depends. More...

void Invalidate () override
Receives notification that the value source on which this InputPortValue depends has changed, and calls the invalidation callback. More...

Does not allow copy, move, or assignment
InputPortValue (const InputPortValue &)=delete

InputPortValueoperator= (const InputPortValue &)=delete

InputPortValue (InputPortValue &&)=delete

InputPortValueoperator= (InputPortValue &&)=delete

Public Member Functions inherited from OutputPortListenerInterface
OutputPortListenerInterface ()

virtual ~OutputPortListenerInterface ()

virtual void Disconnect ()=0
Notifies the consumer that the output port is no longer valid and should not be read. More...

OutputPortListenerInterface (const OutputPortListenerInterface &)=delete

OutputPortListenerInterfaceoperator= (const OutputPortListenerInterface &)=delete

OutputPortListenerInterface (OutputPortListenerInterface &&)=delete

OutputPortListenerInterfaceoperator= (OutputPortListenerInterface &&)=delete

## Protected Member Functions

InputPortValue ()

virtual const OutputPortValueget_output_port_value () const =0

## Detailed Description

InputPortValue identifies the value source for a single System input port.

Objects of this type are contained in the System's Context for use when the value of that input port is needed. Users should not subclass InputPortValue; these will always be of one of two predefined derived types:

## Constructor & Destructor Documentation

 InputPortValue ( const InputPortValue & )
delete
 InputPortValue ( InputPortValue && )
delete
 ~InputPortValue ( )
override
 InputPortValue ( )
inlineprotected

Here is the call graph for this function:

## Member Function Documentation

 const AbstractValue* get_abstract_data ( ) const
inline

Returns the data on this port, which must be connected to a value source.

Here is the call graph for this function:

Here is the caller graph for this function:

 virtual const OutputPortValue* get_output_port_value ( ) const
protectedpure virtual

Implemented in FreestandingInputPortValue, and DependentInputPortValue.

Here is the caller graph for this function:

 const BasicVector* get_vector_data ( ) const
inline

Returns the vector data on this port, which must be connected to a value source.

Throws std::bad_cast if the port is not vector-valued.

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

Here is the call 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 FreestandingInputPortValue, and DependentInputPortValue.

 void Invalidate ( )
overridevirtual

Receives notification that the value source on which this InputPortValue depends has changed, and calls the invalidation callback.

Implements OutputPortListenerInterface.

Here is the caller graph for this function:

 InputPortValue& operator= ( InputPortValue && )
delete
 InputPortValue& operator= ( const InputPortValue & )
delete
 virtual bool requires_evaluation ( ) const
pure virtual

Returns true if this InputPortValue is not in control of its own data.

Implemented in FreestandingInputPortValue, and DependentInputPortValue.

Here is the caller graph for this function:

 void set_invalidation_callback ( std::function< void()> callback )
inline

Registers callback to be called whenever the value source on which this InputPortValue depends.

The callback should invalidate data that depends on the value of this port, but should not do any substantive computation.

Here is the call graph for this function:

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