Skip to main content

DigitalComponent

DigitalComponent

Overview needed


Constructor

protected DigitalComponent

new DigitalComponent(inputPortCount, outputPortCount, size, inputPositioner, outputPositioner, initialProps)

*Description needed*

Parameters

  •  inputPortCount: ClampedValueDescription needed

  •  outputPortCount: ClampedValueDescription needed

  •  size: VectorDescription needed

  •  inputPositioner: Positioner<InputPort>Description needed

  •  outputPositioner: Positioner<OutputPort>Description needed

  •  initialProps: RecordDescription needed


Properties

No publicly accessible properties on DigitalComponent

protected designer: DigitalCircuitDesigner

Description needed

protected inputs: PortSet<InputPort>

Description needed

protected outputs: PortSet<OutputPort>

Description needed


Methods

public activate

activate(signal, i) => void

Activates this component with the given signal through the output port at index i.

Parameters

  •  signal: false | true – The signal (on or off).

  •  i: number – The index of the output port, must be [0,outputs.length)\in [0, outputs.length).

public setDesigner

setDesigner(designer) => void

Description needed

Parameters

public setInputPortCount

setInputPortCount(val) => void

Description needed

Parameters

  •  val: numberDescription needed

public setOutputPortCount

setOutputPortCount(val) => void

Description needed

Parameters

  •  val: numberDescription needed

public getInputPort

getInputPort(i) => InputPort

Description needed

Parameters

  •  i: numberDescription needed

Returns

  •   InputPortDescription needed

public getInputPortPos

getInputPortPos(i) => Vector

Description needed

Parameters

  •  i: numberDescription needed

Returns

  •   VectorDescription needed

public getInputPorts

getInputPorts() => InputPort[]

Description needed

Returns

  •   InputPort[]Description needed

public getInputPortCount

getInputPortCount() => ClampedValue

Description needed

Returns

  •   ClampedValueDescription needed

public getInputs

getInputs() => DigitalWire[]

Description needed

Returns

public numInputs

numInputs() => number

Description needed

Returns

  •   numberDescription needed

public getOutputPort

getOutputPort(i) => OutputPort

Description needed

Parameters

  •  i: numberDescription needed

Returns

  •   OutputPortDescription needed

public getOutputPortPos

getOutputPortPos(i) => Vector

Description needed

Parameters

  •  i: numberDescription needed

Returns

  •   VectorDescription needed

public getOutputPorts

getOutputPorts() => OutputPort[]

Description needed

Returns

  •   OutputPort[]Description needed

public getOutputPortCount

getOutputPortCount() => ClampedValue

Description needed

Returns

  •   ClampedValueDescription needed

public getOutputs

getOutputs() => DigitalWire[]

Description needed

Returns

public numOutputs

numOutputs() => number

Description needed

Returns

  •   numberDescription needed

public getPorts

getPorts() => Port[]

Description needed

Returns

  •   Port[]Description needed

public getConnections

getConnections() => DigitalWire[]

Description needed

Returns

public getDesigner

getDesigner() => DigitalCircuitDesigner

Description needed

Returns


Static Methods

No static methods for DigitalComponent