Object that holds information of a single circuit. Is used in CircuitSet.

Hierarchy (View Summary)

Constructors

Properties

circuitFile: string
frequency: string
index: int
mode: { custom: number; editor: number; learn: number; qr: number }
parent: CircuitMap[]
selectorGroup: {
    capacitor: string;
    inductor: string;
    kirchhoff: string;
    magnetic: string;
    mixed: string;
    quickstart: string;
    resistor: string;
    symbolic: string;
    wheatstone: string;
}
sourceDir: string
svgFile: string
trackingId: string = undefined
voltage: string

Accessors

  • get circuitId(): string

    Returns string

  • get circuitName(): string

    Returns string

  • get circuitPath(): string

    Returns string

    the path to the circuit file, changes based on the mode of the circuit map

  • get customCircuitsPath(): string

    Returns string

  • get customOverViewSvgFile(): string

    Returns string

    the path to the location of the overview svg file for the custom circuits

  • get editorCircuitsPath(): string

    Returns string

  • get editorOverViewSvgFile(): string

    Returns string

  • get overViewSvgFile(): string

    Returns string

    the path to the location of the overview svg file for the selector under learn

  • get paramMap(): ParamMap

    Returns ParamMap

  • get qrCircuitsPath(): string

    Returns string

  • get saveName(): string

    Returns string

  • get solutionPath(): string

    Returns string

  • get standardCircuitName(): string

    Returns string

  • get standardCircuitsPath(): string

    Returns string

Methods

  • Parameters

    • circuitFileName: string

      {string} name of the file

    • dir: any

      {window.definitions.allowedDirNames} the directory the circuit is saved in

    • id: {
          capacitor: string;
          inductor: string;
          kirchhoff: string;
          magnetic: string;
          mixed: string;
          quickstart: string;
          resistor: string;
          symbolic: string;
          wheatstone: string;
      }

      {window.definitions.selectorIDs} the id of the circuit

    • parent: CircuitMap[]

      {Array} the list in which this CircuitMap is saved

    • index: int

      {int} at wich index this element is in the parent

    • mode: { custom: number; editor: number; learn: number; qr: number } = window.definitions.mode.learn

      {window.definitions.mode} the mode for wich this circuit map is used (changes paths)

    Returns CircuitMap

    the circuit map for the passed arguments

  • Parameters

    • path: any

    Returns Promise<{ frequency: string; voltage: string }>

  • Parameters

    • circuitFileName: any
    • dir: any
    • id: any
    • parent: any
    • index: any
    • mode: any = window.definitions.mode.learn

    Returns Promise<ScannedCircuitMap>

  • Parameters

    • idx: any
    • trackingId: any
    • sel: any
    • net: any
    • parent: any

    Returns Promise<ScannedCircuitMap>

  • Parameters

    • idx: any
    • trackingId: any
    • sel: any
    • net: any
    • parent: any

    Returns Promise<ScannedCircuitMap>

  • uses the parent filed of the CircuitMap to determine the next element in the list this way we don't need to keep which CircuitFilesManager is handling this right now because the circuits know what list they are part of and the next element can be found by getting their index in their parent list and incrementing the index

    Parameters

    • circuitMap: any

    Returns any

  • Parameters

    • path: string

      {string} the path to the svg file to read or generate

    Returns Promise<string>

    the svg data of the overview svg file for this circuit, generates the svg data if not found

  • Parameters

    • path: any

    Returns Promise<string>

    the svg data of the overview svg file for this circuit, throws an error if file does not exist

  • Parameters

    • recursion: boolean = true
    • mode: any = undefined

    Returns any

  • Parameters

    • sel: any
    • netlist: any = undefined

    Returns any