Skip to main content

InputPort

InputPort

Overview needed


Constructor

public InputPort

new InputPort(parent)

Constructs the input port with no connections.

Parameters


Properties

No publicly accessible properties on InputPort

protected parent: DigitalComponent

Description needed

protected connections: DigitalWire[]

Description needed


Methods

public activate

activate(signal) => void

Activates the port and propagates the signal to all connections.

Parameters

  •  signal: false | true – The signal to be propagated.

public connect

connect(wire) => void

Connects the input wire to the port if the wire is not already connected.

Parameters

public disconnect

disconnect() => void

Disconnects the input port from the input wire and changes the signal.

public getInput

getInput() => DigitalWire

Gets the input wire of the port.

Returns

public getInitialDir

getInitialDir() => Vector

Gets initial direction of the input port as a vector. Value is -1 because it's an input port (facing left).

Returns

  •   Vector – A vector that represents the direction of the input port.

public getParent

getParent() => DigitalComponent

Gets the parent component of the port.

Returns

public getWires

getWires() => DigitalWire[]

Gets all the wires the port is connected to.

Returns


Static Methods

No static methods for InputPort