SLiCAPdesignData.py¶
Created on Fri Nov 18 13:24:17 2022
@author: anton
- csv2specs(csvFile)¶
Reads the CSV file with specifications and converts it into a list with specitems.
- Parameters
csvFile (str) – name of the CSV file in the directory ‘ini.csvPath’
- Returns
Lit with specification items
- Return type
list
- class specItem(symbol, description='', value='', units='', specType='')¶
Class for specification items. These are parameter definitions with descriptions that can be assigned to the circuit. Specification items must have:
A unique symbol (their parameter name)
A spectype defintion, such as ‘functional’, ‘environment’, ‘design’, etc.
A value
- csvLine()¶
Creates a comma separated output line for this spec item. Commas in the description are replaced with their html code ‘,’.
- Returns
csv code of this specitem
- Return type
str
- htmlLine()¶
Creates an html output line for this spec item.
- Returns
html code of this specitem
- Return type
str
- specLine()¶
Creates an output line for this spec item (used with latex and rst reports)
- Returns
list with: symbol, description, value, units
- Return type
list
- update()¶
Checks the syntax and updates the attributes of this specitem.
- Returns
None
- Return type
NoneType
- specList2dict(specList)¶
Creates a dict with spec items. the parameter name is used as key. Also checks for unique parameter names.
- Parameters
specList (List) – List with spec items
- Returns
dictionary with specification items
- Return type
dict
- specs2circuit(specList, instr)¶
Adds prameter definitions from the specList to instr.
- Parameters
specList (list) – List with spec items
instr (SLiCAPinstruction.instruction) – instruction to which the parameters definitions will be added
- Returns
None
- Return type
NoneType
- specs2csv(specList, fileName)¶
Saves the list with spec items as a CSV file.
- Parameters
specList (list) – List with spec items
- Returns
None
- Return type
NoneType
- specs2html(specs, types=[])¶
Places the contents of a dictionary with specifications on the active html page. If a list of specification types is provided, it creates tables for specified types only. By default, tables for all types will be created.
- Parameters
specs (list) – List with spec items.
types (str) – List with specification types to be placed on the html page, defaults to [].
- Returns
html code
- Return type
str