Drake
Drake C++ Documentation
Loading...
Searching...
No Matches
SelectorParams::OutputPortParams Struct Reference

Detailed Description

Helper struct for outputs.

#include <drake/systems/primitives/selector.h>

Public Member Functions

template<typename Archive>
void Serialize (Archive *a)
 Passes this object to an Archive.

Public Attributes

std::optional< std::string > name
 (Optional) Specifies a name for the port.
std::vector< OutputSelectionselections
 Specifies the values for the output port elements, and by implication the port's size.

Member Function Documentation

◆ Serialize()

template<typename Archive>
void Serialize ( Archive * a)

Passes this object to an Archive.

Refer to YAML Serialization for background.

Member Data Documentation

◆ name

std::optional<std::string> name

(Optional) Specifies a name for the port.

When given, the name must be a valid port name. When unset, the port will use kDefaultName.

◆ selections

std::vector<OutputSelection> selections

Specifies the values for the output port elements, and by implication the port's size.

The port will have size selections.size(), and its i'th output value will be determined by the (input_port_index, input_offset) pair at selections[i], i.e., for the m'th output port we have:

n = selections[i].input_port_index
j = selections[i].input_offset
y_m[i] = u_n[j]
std::vector< OutputSelection > selections
Specifies the values for the output port elements, and by implication the port's size.
Definition selector.h:85

Output elements always come from some input element; it is not possible to directly set an output to a constant. (If a constant is necessary, connect a ConstantVectorSource to an input port.)


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