Drake
SystemOutput< T > Class Template Reference

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 OutputPortget_port (int port_num) const
 Returns a const reference to the indicated port, which must be in range and not empty. More...
 
OutputPortget_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...
 

Detailed Description

template<typename T>
class drake::systems::SystemOutput< T >

A container for all the output ports of a System.

These are a mix of vector-valued and abstract-valued ports.

Template Parameters
TThe type of the output data. Must be a valid Eigen scalar.

Constructor & Destructor Documentation

SystemOutput ( int  num_ports)
inlineexplicit

Construct a SystemOutput with room for num_ports OutputPort objects, initially empty.

Member Function Documentation

OutputPort* get_mutable_port ( int  port_num)
inline

Returns a mutable pointer to the indicated port.

VectorOutputPort<T>* get_mutable_vector_port ( int  port_num)
inline

Returns a mutable pointer to the indicated VectorOutputPort.

Exceptions
std::logic_errorThe specified port is not vector valued.

Here is the call graph for this function:

Here is the caller graph for this function:

int get_num_ports ( ) const
inline

Returns the number of OutputPort objects which may be contained here.

Some or all of the ports may be empty.

Here is the caller graph for this function:

const OutputPort& get_port ( int  port_num) const
inline

Returns a const reference to the indicated port, which must be in range and not empty.

const VectorOutputPort<T>& get_vector_port ( int  port_num) const
inline

Returns a const reference to the indicated VectorOutputPort.

Exceptions
std::logic_errorThe specified port is not vector valued.

Here is the call graph for this function:

bool is_empty_port ( int  port_num) const
inline

Returns true if the indicated port slot is unoccupied.

The port_num must be in range.

Exceptions
std::out_of_rangeport_num is out of range.
bool is_vector_port ( int  port_num) const
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.

Exceptions
std::out_of_rangeport_num is out of range.
void set_port ( int  port_num,
std::unique_ptr< OutputPort port 
)
inline

Sets or replaces the indicated OutputPort with the given port and takes over ownership.

The existing port, if any, is deleted.

Exceptions
std::out_of_rangeport_num is out of range.

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