Drake
VectorOutputPort< T > Class Template Reference

The OutputPort represents a data output from a System. More...

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

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

Public Member Functions

 VectorOutputPort (std::unique_ptr< VectorInterface< T >> data)
 Takes ownership of data. More...
 
const VectorInterface< T > * get_vector_data () const
 Returns the vector of data in this output port, or nullptr if this is an abstract-valued port. More...
 
VectorInterface< T > * GetMutableVectorData ()
 Returns a pointer providing mutable access to the data inside this VectorOutputPort, and updates the version so that Contexts depending on this OutputPort know to invalidate their caches. More...
 
- Public Member Functions inherited from OutputPort
virtual ~OutputPort ()=default
 
void add_dependent (OutputPortListenerInterface *dependent)
 Registers dependent to receive invalidation notifications whenever this output port's value changes. More...
 
void remove_dependent (OutputPortListenerInterface *dependent)
 Unregisters dependent from invalidation notifications. More...
 
long long get_version () const
 Returns a positive and monotonically increasing number that is guaranteed to change whenever GetMutableVectorData is called. More...
 
void NoteValueModification ()
 Notify any dependents that the value on this OutputPort has changed, and update the value version here. More...
 

Additional Inherited Members

- Protected Member Functions inherited from OutputPort
 OutputPort ()
 

Detailed Description

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

The OutputPort represents a data output from a System.

Other Systems may depend on the OutputPort.

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

Constructor & Destructor Documentation

VectorOutputPort ( std::unique_ptr< VectorInterface< T >>  data)
inlineexplicit

Takes ownership of data.

Member Function Documentation

const VectorInterface<T>* get_vector_data ( ) const
inline

Returns the vector of data in this output port, or nullptr if this is an abstract-valued port.

VectorInterface<T>* GetMutableVectorData ( )
inline

Returns a pointer providing mutable access to the data inside this VectorOutputPort, and updates the version so that Contexts depending on this OutputPort know to invalidate their caches.

Callers MUST NOT write on the returned pointer if there is any possibility this OutputPort has been accessed since the last time GetMutableVectorData() was called.


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