Skip to main content

OutputPort

OutputPort

Overview needed


Constructor

public OutputPort

new OutputPort(parent)

Constructs the output port with no connections.

Parameters


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

public disconnect

disconnect(w) => void

Disconnects the output wire from the output port.

Parameters

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

public getParent

getParent() => DigitalComponent

Gets the parent component of the port.

Returns


Static Methods

No static methods for OutputPort