58 output_port_ = output_port;
84 input_port_num_ = input_port_num;
90 int input_port_num_{-1};
100 template <
typename T>
110 : required_length_(required_length) {
117 using namespace std::literals::string_literals;
120 if (vector_output ==
nullptr) {
121 throw std::logic_error(
122 "VectorInputPort3::ConnectTo(): Proposed connection was not a "s +
125 const int output_size = vector_output->get_model_vector().size();
126 if (required_length_ >= 0 && output_size != required_length_) {
127 throw std::out_of_range(
128 "VectorInputPort3::ConnectTo(): "s +
129 "Proposed connection was a VectorOutputPort3 of size " +
131 std::to_string(required_length_) +
" for this VectorInputPort3.");
136 int required_length_{-1};
An OutputPort3 represents a data output from a System.
Definition: system3_output.h:35
Definition: constants.h:3
Extends OutputPort3 for cases where the OutputPort3 is known to be vector-valued, with scalar element...
Definition: system3_output.h:110
#define DRAKE_ABORT_UNLESS(condition)
Evaluates condition and iff the value is false will ::abort() the program with a message showing at l...
Definition: drake_assert.h:39
std::string to_string(const Eigen::MatrixBase< Derived > &a)
Definition: testUtil.h:29
An abstract superclass for dynamical systems, encapsulating functionality that is independent of the ...
Definition: system3.h:68
static const std::string & Get()
Attempts to return a nicely demangled and canonicalized type name that is the same on all platforms...
Definition: nice_type_name.h:48
TestContinuousSystem system_
Definition: continuous_system_test.cc:50