Drake
|
A container for all the output ports of a System. More...
#include <drake/systems/framework/system_output.h>
Public Member Functions | |
SystemOutput (int num_ports) | |
Construct a SystemOutput with room for num_ports OutputPort objects, initially empty. More... | |
void | set_port (int port_num, std::unique_ptr< OutputPort > port) |
Sets or replaces the indicated OutputPort with the given port and takes over ownership. More... | |
int | get_num_ports () const |
Returns the number of OutputPort objects which may be contained here. More... | |
bool | is_empty_port (int port_num) const |
Returns true if the indicated port slot is unoccupied. More... | |
bool | is_vector_port (int port_num) const |
Check whether the indicated port is of type VectorOutputPort<T>; otherwise it is an AbstractOutputPort whose type must be agreed upon between the producer and consumer. More... | |
const OutputPort & | get_port (int port_num) const |
Returns a const reference to the indicated port, which must be in range and not empty. More... | |
OutputPort * | get_mutable_port (int port_num) |
Returns a mutable pointer to the indicated port. More... | |
const VectorOutputPort< T > & | get_vector_port (int port_num) const |
Returns a const reference to the indicated VectorOutputPort. More... | |
VectorOutputPort< T > * | get_mutable_vector_port (int port_num) |
Returns a mutable pointer to the indicated VectorOutputPort. More... | |
A container for all the output ports of a System.
These are a mix of vector-valued and abstract-valued ports.
T | The type of the output data. Must be a valid Eigen scalar. |
|
inlineexplicit |
Construct a SystemOutput with room for num_ports
OutputPort objects, initially empty.
|
inline |
Returns a mutable pointer to the indicated port.
|
inline |
Returns a mutable pointer to the indicated VectorOutputPort.
std::logic_error | The specified port is not vector valued. |
|
inline |
Returns the number of OutputPort objects which may be contained here.
Some or all of the ports may be empty.
|
inline |
Returns a const reference to the indicated port, which must be in range and not empty.
|
inline |
Returns a const reference to the indicated VectorOutputPort.
std::logic_error | The specified port is not vector valued. |
|
inline |
Returns true
if the indicated port slot is unoccupied.
The port_num
must be in range.
std::out_of_range | port_num is out of range. |
|
inline |
Check whether the indicated port is of type VectorOutputPort<T>; otherwise it is an AbstractOutputPort whose type must be agreed upon between the producer and consumer.
This method returns false
if the given port_num
is empty.
std::out_of_range | port_num is out of range. |
|
inline |
Sets or replaces the indicated OutputPort with the given port
and takes over ownership.
The existing port, if any, is deleted.
std::out_of_range | port_num is out of range. |