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< OutputSelection > | selections |
| Specifies the values for the output port elements, and by implication the port's size. | |
| void Serialize | ( | Archive * | a | ) |
Passes this object to an Archive.
Refer to YAML Serialization for background.
| 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.
| 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:
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.)