Drake
VectorOutputPort3< T > Class Template Reference

Extends OutputPort3 for cases where the OutputPort3 is known to be vector-valued, with scalar elements of template type T. More...

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

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

Public Member Functions

 VectorOutputPort3 (std::unique_ptr< VectorInterface< T >> model_value)
 Takes over ownership of the supplied concrete VectorInterface object to serve as the model value for this VectorOutputPort3. More...
 
 VectorOutputPort3 (int length)
 If you supply just a length this port will use a BasicVector of that length as its model value. More...
 
const VectorInterface< T > & get_model_vector () const
 Returns the model value of this port as a const reference to VectorInterface<T>. More...
 
VectorInterface< T > * get_mutable_model_vector ()
 Returns the model value of this port as a mutable pointer to VectorInterface<T>. More...
 
- Public Member Functions inherited from OutputPort3
virtual ~OutputPort3 ()=default
 
 OutputPort3 ()
 Create an OutputPort3 that has no model value. More...
 
 OutputPort3 (std::unique_ptr< AbstractValue > model_value)
 Create an OutputPort3 with the indicated model value, taking over ownership of the model value. More...
 
void set_model_value (std::unique_ptr< AbstractValue > model_value)
 Set the model value for this OutputPort3. More...
 
const AbstractValueget_model_value () const
 Returns a const reference to a value of the type that this OutputPort3 will present at run time. More...
 
AbstractValueget_mutable_model_value ()
 Returns a mutable pointer to a value of the type that this OutputPort3 will present at run time. More...
 
std::pair< const AbstractSystem3 *, int > get_owner_system () const
 If this OutputPort3 is owned by a system, return that system and the output port number by which that system knows this port. More...
 

Detailed Description

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

Extends OutputPort3 for cases where the OutputPort3 is known to be vector-valued, with scalar elements of template type T.

The model value is a VectorInterface<T>.

The model value is actually stored in an AbstractValue so that it can be retrieved as the model value of the base class OutputPort3. That allows all output ports can be treated identically when appropriate. Note: the concrete type is actually Value<VectorObject<T>>; the VectorObject wraps the VectorInterface value.

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

Constructor & Destructor Documentation

VectorOutputPort3 ( std::unique_ptr< VectorInterface< T >>  model_value)
inlineexplicit

Takes over ownership of the supplied concrete VectorInterface object to serve as the model value for this VectorOutputPort3.

VectorOutputPort3 ( int  length)
inlineexplicit

If you supply just a length this port will use a BasicVector of that length as its model value.

Member Function Documentation

const VectorInterface<T>& get_model_vector ( ) const
inline

Returns the model value of this port as a const reference to VectorInterface<T>.

Here is the call graph for this function:

VectorInterface<T>* get_mutable_model_vector ( )
inline

Returns the model value of this port as a mutable pointer to VectorInterface<T>.

Here is the call graph for this function:


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