(Advanced.) 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. This is intended for internal use in implementing Diagram.
T | The scalar type, which must be one of the default scalars. |
#include <drake/systems/framework/diagram_output_port.h>
Public Member Functions | |
~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 | |
DiagramOutputPort & | operator= (const DiagramOutputPort &)=delete |
DiagramOutputPort (DiagramOutputPort &&)=delete | |
DiagramOutputPort & | operator= (DiagramOutputPort &&)=delete |
Public Member Functions inherited from OutputPort< T > | |
~OutputPort () override=default | |
template<typename ValueType = VectorX<T>> | |
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< AbstractValue > | Allocate () 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 System< T > & | get_system () const |
Returns a reference to the System that owns this output port. More... | |
const std::string & | get_name () const |
Get port name. More... | |
std::string | GetFullDescription () const |
Returns a verbose human-readable description of port. More... | |
OutputPortIndex | get_index () const |
Returns the index of this output port within the owning System. More... | |
PortDataType | get_data_type () const |
Returns the port data type. More... | |
int | size () const |
Returns the fixed size expected for a vector-valued port. More... | |
DependencyTicket | ticket () const |
(Advanced.) Returns the DependencyTicket for this port within the owning System. More... | |
OutputPort (const OutputPort &)=delete | |
OutputPort & | operator= (const OutputPort &)=delete |
OutputPort (OutputPort &&)=delete | |
OutputPort & | operator= (OutputPort &&)=delete |
Public Member Functions inherited from OutputPortBase | |
~OutputPortBase () override | |
OutputPortIndex | get_index () const |
Returns the index of this output port within the owning System. More... | |
const std::string & | get_name () const |
Get port name. More... | |
std::string | GetFullDescription () const |
Returns a verbose human-readable description of port. More... | |
PortDataType | get_data_type () const |
Returns the port data type. More... | |
int | size () const |
Returns the fixed size expected for a vector-valued port. More... | |
DependencyTicket | ticket () const |
(Advanced.) Returns the DependencyTicket for this port within the owning System. More... | |
OutputPortBase (const OutputPortBase &)=delete | |
OutputPortBase & | operator= (const OutputPortBase &)=delete |
OutputPortBase (OutputPortBase &&)=delete | |
OutputPortBase & | operator= (OutputPortBase &&)=delete |
Public Member Functions inherited from PortBase | |
virtual | ~PortBase () |
const std::string & | get_name () const |
Get port name. More... | |
std::string | GetFullDescription () const |
Returns a verbose human-readable description of port. More... | |
PortDataType | get_data_type () const |
Returns the port data type. More... | |
int | size () const |
Returns the fixed size expected for a vector-valued port. More... | |
const std::optional< std::string > & | get_deprecation () const |
When this port is deprecated, returns non-null with a (possibly empty) deprecation message; when this port is not deprecated, returns null. More... | |
void | set_deprecation (std::optional< std::string > deprecation) |
Sets whether this port is deprecated (and if so, the message). More... | |
DependencyTicket | ticket () const |
(Advanced.) Returns the DependencyTicket for this port within the owning System. More... | |
PortBase (const PortBase &)=delete | |
PortBase & | operator= (const PortBase &)=delete |
PortBase (PortBase &&)=delete | |
PortBase & | operator= (PortBase &&)=delete |
Friends | |
class | internal::FrameworkFactory |
Additional Inherited Members | |
Protected Member Functions inherited from OutputPort< T > | |
OutputPort (const System< T > *system, internal::SystemMessageInterface *system_interface, internal::SystemId system_id, std::string name, OutputPortIndex index, DependencyTicket ticket, PortDataType data_type, int size) | |
Provides derived classes the ability to set the base class members at construction. More... | |
Protected Member Functions inherited from OutputPortBase | |
OutputPortBase (internal::SystemMessageInterface *owning_system, internal::SystemId owning_system_id, std::string name, OutputPortIndex index, DependencyTicket ticket, PortDataType data_type, int size) | |
Provides derived classes the ability to set the base class members at construction. More... | |
Protected Member Functions inherited from PortBase | |
PortBase (const char *kind_string, internal::SystemMessageInterface *owning_system, internal::SystemId owning_system_id, std::string name, int index, DependencyTicket ticket, PortDataType data_type, int size) | |
Provides derived classes the ability to set the base class members at construction. More... | |
int | get_int_index () const |
Returns the index of this port within the owning System (i.e., an InputPortIndex or OutputPortIndex, but as a bare integer). More... | |
const internal::SystemMessageInterface & | get_system_interface () const |
Returns a reference to the system that owns this port. More... | |
internal::SystemMessageInterface & | get_mutable_system_interface () |
Returns get_system_interface(), but without the const. More... | |
void | ValidateSystemId (internal::SystemId id) const |
(Internal use only) Checks whether the given id (nominally obtained from a Context passed to this port) was created for the system that owns this port. More... | |
void | ThrowValidateContextMismatch () const |
(Internal use only) Throws std::exception with a message that the sanity check(s) related to ValidateContext have failed. More... | |
template<typename ValueType > | |
const ValueType & | PortEvalCast (const AbstractValue &abstract) const |
Pull a value of a given type from an abstract value or issue a nice message if the type is not correct. More... | |
template<typename ValueType , typename T > | |
const ValueType & | PortEvalCast (const BasicVector< T > &basic) const |
Downcast a basic vector to a more specific subclass, or else issue a nice message if the type is not correct. More... | |
template<typename ValueType > | |
const ValueType & | ThrowBadCast (const AbstractValue &abstract) const |
Reports that the user provided a bad ValueType argument to Eval. More... | |
template<typename ValueType , typename T > | |
const ValueType & | ThrowBadCast (const BasicVector< T > &basic) const |
Reports that the user provided a bad ValueType argument to Eval. More... | |
void | ThrowBadCast (const std::string &value_typename, const std::string &eval_typename) const |
Reports that the user provided a bad ValueType argument to Eval. More... | |
Static Protected Member Functions inherited from OutputPort< T > | |
static void | ThrowIfInvalidPortValueType (const OutputPort< T > &port, const Context< T > &context, const AbstractValue &proposed_value) |
Static method allows DiagramOutputPort to call this recursively. More... | |
|
delete |
|
delete |
|
finaldefault |
const OutputPort<T>& get_source_output_port | ( | ) | const |
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.
|
delete |
|
delete |
|
friend |