Drake
DiagramOutputPort< T > Class Template Referencefinal

Holds information about a subsystem output port that has been exported to become one of this Diagram's output ports. More...

#include <drake/systems/framework/diagram_output_port.h>

Inheritance diagram for DiagramOutputPort< T >:
[legend]
Collaboration diagram for DiagramOutputPort< T >:
[legend]

Public Member Functions

 DiagramOutputPort (const System< T > *diagram, SystemBase *system_base, OutputPortIndex index, DependencyTicket ticket, const OutputPort< T > *source_output_port, SubsystemIndex source_subsystem_index)
 (Internal use only) Constructs a DiagramOutputPort that exports an output port of one of the diagram's child subsystems. More...
 
 ~DiagramOutputPort () final=default
 
const OutputPort< T > & get_source_output_port () const
 Obtains a reference to the subsystem output port that was exported to create this diagram port. More...
 
Does not allow copy, move, or assignment
 DiagramOutputPort (const DiagramOutputPort &)=delete
 
DiagramOutputPortoperator= (const DiagramOutputPort &)=delete
 
 DiagramOutputPort (DiagramOutputPort &&)=delete
 
DiagramOutputPortoperator= (DiagramOutputPort &&)=delete
 
- Public Member Functions inherited from OutputPort< T >
 ~OutputPort () override=default
 
template<typename ValueType >
const ValueType & Eval (const Context< T > &context) const
 Returns a reference to the up-to-date value of this output port contained in the given Context. More...
 
std::unique_ptr< AbstractValueAllocate () const
 Allocates a concrete object suitable for holding the value to be exposed by this output port, and returns that as an AbstractValue. More...
 
void Calc (const Context< T > &context, AbstractValue *value) const
 Unconditionally computes the value of this output port with respect to the given context, into an already-allocated AbstractValue object whose concrete type must be exactly the same as the type returned by this port's allocator. More...
 
const AbstractValueEvalAbstract (const Context< T > &context) const
 Returns a reference to the value of this output port contained in the given Context. More...
 
const System< T > & get_system () const
 Returns a reference to the System that owns this output port. More...
 
 OutputPort (const OutputPort &)=delete
 
OutputPortoperator= (const OutputPort &)=delete
 
 OutputPort (OutputPort &&)=delete
 
OutputPortoperator= (OutputPort &&)=delete
 
- Public Member Functions inherited from OutputPortBase
virtual ~OutputPortBase ()
 
OutputPortIndex get_index () const
 Returns the index of this output port within the owning System. More...
 
DependencyTicket ticket () const
 Returns the DependencyTicket for this output port within the owning System. More...
 
PortDataType get_data_type () const
 Gets the port data type specified at port construction. More...
 
int size () const
 Returns the fixed size expected for a vector-valued output port. More...
 
const SystemBaseget_system_base () const
 Returns a reference to the System that owns this output port. More...
 
 OutputPortBase (const OutputPortBase &)=delete
 
OutputPortBaseoperator= (const OutputPortBase &)=delete
 
 OutputPortBase (OutputPortBase &&)=delete
 
OutputPortBaseoperator= (OutputPortBase &&)=delete
 

Additional Inherited Members

- Protected Member Functions inherited from OutputPort< T >
 OutputPort (const System< T > *system, SystemBase *system_base, OutputPortIndex index, DependencyTicket ticket, PortDataType data_type, int size)
 Provides derived classes the ability to set the base class members at construction. More...
 
std::string GetPortIdString () const
 This is useful for error messages and produces a human-readable identification of an offending output port. More...
 
- Protected Member Functions inherited from OutputPortBase
 OutputPortBase (SystemBase *owning_system, OutputPortIndex index, DependencyTicket ticket, PortDataType data_type, int size)
 Provides derived classes the ability to set the base class members at construction. More...
 
SystemBaseget_mutable_system_base ()
 

Detailed Description

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

Holds information about a subsystem output port that has been exported to become one of this Diagram's output ports.

The actual methods for determining the port's value are supplied by the LeafOutputPort that ultimately underlies the source port, although that may be any number of levels down.

Template Parameters
TThe vector element type, which must be a valid Eigen scalar.

Instantiated templates for the following kinds of T's are provided:

They are already available to link against in the containing library.

Constructor & Destructor Documentation

DiagramOutputPort ( const DiagramOutputPort< T > &  )
delete
DiagramOutputPort ( DiagramOutputPort< T > &&  )
delete
DiagramOutputPort ( const System< T > *  diagram,
SystemBase system_base,
OutputPortIndex  index,
DependencyTicket  ticket,
const OutputPort< T > *  source_output_port,
SubsystemIndex  source_subsystem_index 
)
inline

(Internal use only) Constructs a DiagramOutputPort that exports an output port of one of the diagram's child subsystems.

Parameters
diagramThe Diagram that will own this port.
system_baseThe same Diagram cast to its base class.
indexThe output port index to be assigned to the new port.
ticketThe DependencyTicket to be assigned to the new port.
source_output_portAn output port of one of this diagram's child subsystems that is to be forwarded to the new port.
source_subsystem_indexThe index of the child subsystem that owns source_output_port.
Precondition
The diagram System must actually be a Diagram.
diagram lifetime must exceed the port's; we retain the pointer here.
diagram and system_base must be the same object.
source_output_port must be owned by a child of diagram.
source_subsystem_index must be the index of that child in diagram.

This is intended only for use by Diagram and we depend on the caller to meet the above preconditions, not all of which can be independently verified here.

Here is the call graph for this function:

~DiagramOutputPort ( )
finaldefault

Here is the caller graph for this function:

Member Function Documentation

const OutputPort<T>& get_source_output_port ( ) const
inline

Obtains a reference to the subsystem output port that was exported to create this diagram port.

Note that the source may itself be a diagram output port.

Here is the call graph for this function:

DiagramOutputPort& operator= ( const DiagramOutputPort< T > &  )
delete
DiagramOutputPort& operator= ( DiagramOutputPort< T > &&  )
delete

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