9 #include "drake/drakeSystemFramework_export.h" 18 class AbstractSystem3;
44 explicit OutputPort3(std::unique_ptr<AbstractValue> model_value)
52 model_value_ = std::move(model_value);
67 return std::pair<const AbstractSystem3*, int>(system_, output_port_num_);
82 output_port_num_ = output_port_num;
89 int output_port_num_{-1};
91 std::unique_ptr<AbstractValue> model_value_;
95 double sample_time_sec_{0.};
109 template <
typename T>
126 const auto& vector_object =
128 return vector_object.get_vector();
136 return vector_object->get_mutable_vector();
VectorInterface is a pure abstract interface that real-valued signals between Systems must satisfy...
Definition: vector_interface.h:25
An OutputPort3 represents a data output from a System.
Definition: system3_output.h:35
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...
Definition: system3_output.h:66
Definition: constants.h:3
AbstractValue * get_mutable_model_value()
Returns a mutable pointer to a value of the type that this OutputPort3 will present at run time...
Definition: system3_output.h:61
const VectorInterface< T > & get_model_vector() const
Returns the model value of this port as a const reference to VectorInterface<T>.
Definition: system3_output.h:125
Extends OutputPort3 for cases where the OutputPort3 is known to be vector-valued, with scalar element...
Definition: system3_output.h:110
OutputPort3(std::unique_ptr< AbstractValue > model_value)
Create an OutputPort3 with the indicated model value, taking over ownership of the model value...
Definition: system3_output.h:44
OutputPort3()
Create an OutputPort3 that has no model value.
Definition: system3_output.h:40
VectorOutputPort3(int length)
If you supply just a length this port will use a BasicVector of that length as its model value...
Definition: system3_output.h:120
An abstract superclass for dynamical systems, encapsulating functionality that is independent of the ...
Definition: system3.h:68
const AbstractValue & get_model_value() const
Returns a const reference to a value of the type that this OutputPort3 will present at run time...
Definition: system3_output.h:57
VectorInterface< T > * get_mutable_model_vector()
Returns the model value of this port as a mutable pointer to VectorInterface<T>.
Definition: system3_output.h:133
BasicVector is a semantics-free wrapper around an Eigen vector that satisfies VectorInterface.
Definition: basic_vector.h:23
This concrete class provides object semantics to an abstract VectorInterface by implementing a copy c...
Definition: vector_interface.h:70
A fully type-erased container class.
Definition: value.h:22
VectorOutputPort3(std::unique_ptr< VectorInterface< T >> model_value)
Takes over ownership of the supplied concrete VectorInterface object to serve as the model value for ...
Definition: system3_output.h:114
void set_model_value(std::unique_ptr< AbstractValue > model_value)
Set the model value for this OutputPort3.
Definition: system3_output.h:51
A container class for an arbitrary type T.
Definition: value.h:15
TestContinuousSystem system_
Definition: continuous_system_test.cc:50
virtual ~OutputPort3()=default