OutputPort
OutputPort
Overview needed
Constructor
public OutputPort
new OutputPort(parent)
Constructs the output port with no connections.
Parameters
-
parent: DigitalComponent
– The parent component of the port.
Properties
No publicly accessible properties on OutputPort
protected parent: DigitalComponent
Description needed
protected connections: DigitalWire[]
Description needed
Methods
public activate
activate(signal) => void
Active this port and propagate the signal to all active connections.
Parameters
-
signal: false | true
– The signal to send.
public connect
connect(w) => void
Connects the output wire to the port and activates the port.
Parameters
-
w: DigitalWire
– The new output wire.
public disconnect
disconnect(w) => void
Disconnects the output wire from the output port.
Parameters
-
w: DigitalWire
– The output wire to disconnect.
public getConnections
getConnections() => DigitalWire[]
Gets all of the wires connected to this port.
Returns
-
DigitalWire[]
– A shallow copy of the all the connections.
public getInitialDir
getInitialDir() => Vector
Gets initial direction of the input port as a vector. The value is 1 because it's an output port (facing right).
Returns
-
Vector
– A vector that represents the direction of the output port.
public getWires
getWires() => DigitalWire[]
Gets all the wires the port is connected to.
Returns
-
DigitalWire[]
– The wire connections.
public getParent
getParent() => DigitalComponent
Gets the parent component of the port.
Returns
-
DigitalComponent
– The parent component.
Static Methods
No static methods for OutputPort