DigitalCircuitDesigner
DigitalCircuitDesigner
Overview needed
Constructor
public DigitalCircuitDesigner
new DigitalCircuitDesigner(propagationTime)
*Description needed*Parameters
-
propagationTime: number
– Description needed
Properties
No publicly accessible properties on DigitalCircuitDesigner
private objects: DigitalComponent[]
Description needed
private wires: DigitalWire[]
Description needed
private propagationQueue: Propagation[]
Description needed
private updateRequests: number
Description needed
private propagationTime: number
Description needed
private paused: false | true
Description needed
private updateCallbacks: DigitalEvent[]
Description needed
private timeout: number
Description needed
Methods
public addCallback
addCallback(callback) => void
Description needed
Parameters
-
callback: DigitalEvent
– Description needed
public removeCallback
removeCallback(callback) => void
Description needed
Parameters
-
callback: DigitalEvent
– Description needed
private callback
callback(ev) => void
Description needed
Parameters
-
ev: PropagationEvent | ForcedEvent | ObjEvent | WireEvent | ICDataEvent
– Description needed
public forceUpdate
forceUpdate() => void
Method to call when you want to force an update Used when something changed but isn't propagated (i.e. Clock updated but wasn't connected to anything).
public propagate
propagate(receiver, signal) => void
Add a propagation request to the queue. Also checks if there are currently no requests and starts the cycle if there aren't.
Parameters
receiver: DigitalComponent | DigitalWire
– The propagating component.signal: false | true
– The signal to propagate.
public createWire
createWire(p1, p2) => DigitalWire
Description needed
Parameters
p1: OutputPort
– Description neededp2: InputPort
– Description needed
Returns
-
DigitalWire
– Description needed
createWire(p2, p1) => DigitalWire
Description needed
Parameters
p2: InputPort
– Description neededp1: OutputPort
– Description needed
Returns
-
DigitalWire
– Description needed
public addICData
addICData(data) => void
Description needed
Parameters
-
data: ICData
– Description needed
public removeICData
removeICData(data) => void
Description needed
Parameters
-
data: ICData
– Description needed
public addObjects
addObjects(objects) => void
Description needed
Parameters
-
objects: DigitalComponent[]
– Description needed
public addObject
addObject(obj) => void
Description needed
Parameters
-
obj: DigitalComponent
– Description needed
public addWire
addWire(wire) => void
Description needed
Parameters
-
wire: DigitalWire
– Description needed
public remove
remove(o) => void
Description needed
Parameters
-
o: DigitalComponent | DigitalWire
– Description needed
public removeObject
removeObject(obj) => void
Description needed
Parameters
-
obj: DigitalComponent
– Description needed
public removeWire
removeWire(wire) => void
Description needed
Parameters
-
wire: DigitalWire
– Description needed
public replace
replace(designer) => void
Description needed
Parameters
-
designer: DigitalCircuitDesigner
– Description needed
public shift
shift(obj, i) => number
Description needed
Parameters
obj: DigitalComponent | DigitalWire
– Description neededi: number
– Description needed
Returns
-
number
– Description needed
public getGroup
getGroup() => DigitalObjectSet
Description needed
Returns
-
DigitalObjectSet
– Description needed
public getObjects
getObjects() => DigitalComponent[]
Description needed
Returns
-
DigitalComponent[]
– Description needed
public getWires
getWires() => DigitalWire[]
Description needed
Returns
-
DigitalWire[]
– Description needed
Static Methods
No static methods for DigitalCircuitDesigner