Drake
|
An InputPort3 represents an external data input to a System. More...
#include <drake/systems/framework/system3_input.h>
Public Member Functions | |
InputPort3 () | |
Create an InputPort3 that accepts any OutputPort3 as a connection. More... | |
void | ConnectTo (const OutputPort3 *output_port) |
Connect this InputPort3 to a compatible OutputPort3. More... | |
void | CheckOutputPort (const OutputPort3 *proposed) const |
Given an OutputPort3 proposed as a connection for this InputPort3, throw an error message if the OutputPort3 is not acceptable. More... | |
const OutputPort3 * | get_connection () const |
If connected, return a pointer to the output port otherwise nullptr . More... | |
Protected Member Functions | |
virtual void | DoCheckOutputPort (const OutputPort3 &proposed) const |
A concrete InputPort3 can override this method to restrict the kinds of OutputPort3 objects that are acceptable. More... | |
Friends | |
class | AbstractSystem3 |
An InputPort3 represents an external data input to a System.
This or another System may provide an OutputPort3 which provides values that are passed into an InputPort3.
In a system diagram, output ports of some contained subsystems will be connected to input ports of others. When the connection is made, the connected OutputPort3 is recorded here. Later that will be used to construct dependency information in the Context3 so that a change of value of an output port will properly invalidate computations that are dependent on a connected input port. Note that an InputPort3 is connected to at most one OutputPort3, but an OutputPort3 may be the source for many inputs.
An InputPort3 contains a specification of what properties an OutputPort3 must have in order to be an acceptable mate for that InputPort3. By default any OutputPort is acceptable, and the value of the InputPort3 will be the AbstractValue of the OutputPort3. The derived class VectorInputPort3<T>
will only accept a VectorOutputPort3<T>
of a specified length or of any length.
In addition to type, and InputPort may set restrictions on the sample rates that are acceptable. For example, it may specify that only continuous outputs are allowed, or only discrete.
|
inline |
Create an InputPort3 that accepts any OutputPort3 as a connection.
|
inline |
Given an OutputPort3 proposed as a connection for this InputPort3, throw an error message if the OutputPort3 is not acceptable.
A null OutputPort3 is allowed and is interpreted as "disconnect".
|
inline |
Connect this InputPort3 to a compatible OutputPort3.
If the OutputPort3 is null, this disconnects the InputPort3 from whatever it may have been connected to before. The output port must be owned by a system at the same level or higher (closer to root) in the system diagram as the system that owns this InputPort3. The higher case occurs when the InputPort3 has been inherited by a parent or ancestor of the system that owns it.
std::logic_error | The OutputPort3 was not an acceptable connection for this InputPort3. |
|
inlineprotectedvirtual |
A concrete InputPort3 can override this method to restrict the kinds of OutputPort3 objects that are acceptable.
If you find the proposed connection unacceptable, throw an std::logic_error with a message explaining the problem.
|
inline |
If connected, return a pointer to the output port otherwise nullptr
.
|
friend |