pingspice.circuit.netlist.NodeStuff(object)
class documentation
Part of pingspice.circuit.netlist
(View In Hierarchy)
Known subclasses: pingspice.circuit.netlist.Include, pingspice.circuit.netlist.RawInclude, pingspice.circuit.netlist.Subcircuit
I provide node-related convenience methods for subclasses. The following
instance variables are for the Elements
object, not me:
Instance Variable | shunts | A dict of current sensing V elements with the pairs of nodes they connect. |
Class Variable | debug | A Bag that gets set
True for all instances to log info about each setup
call. |
Class Method | autoName | Undocumented |
Method | setupResults | Undocumented |
Method | fill | Undocumented |
Method | nodeCheck | Call with the circuit building tool f and a sequence of
nodes provided to this Include or
Subcircuit . |
Method | setup | Included or subcircuit setup. You'll usually override this in a subclass. |
Method | rawNetlist | Get lines of a raw netlist from a search hierarchy of possible sources. |
Method | shunt | Call to insert a current-measuring shunt and add an entry to my Elements
baton's dict of shunts. |
Method | raw | See Elements.raw . |
Method | iNode | See Elements.iNode . |
Method | ground | See Elements.ground . |
Method | sca | See Elements.sca . |
Method | sca6 | See Elements.sca6 . |
Class Method | _libDir | Undocumented |
Method | _strippedLines | Undocumented |
Method | _call_setup | Calls my setup
method (almost always your override of that method, actually) and processes
any return value. |
def nodeCheck(self, f, nodes, nest=False):
Call with the circuit building tool f and a sequence of
nodes provided to this Include
or
Subcircuit
.
Parameters | nest | Set True to consider nodes added to be inside a nested layer,
thus not adding nodes to any active sets from outer layers. |
Calls my setup
method (almost always your override of that method, actually) and processes
any return value.
If the return value is a dict, its contents are used to update a setupResults dict that is specific to one instance of me.
Included or subcircuit setup. You'll usually override this in a subclass.
Unless you provide a netlist via the netlist attribute (for a
block of text) or the netlistLines attribute (for a list of lines),
override this to define your own method for constructing a subcircuit or
included circuit lines, using the Elements
object provided as f.
Why use f? Because it's short and a conveniently typed letter on the keyboard.
Get lines of a raw netlist from a search hierarchy of possible sources.
Returns lines of a raw netlist from an Ngspice circuitFile specified in this method call, an Ngspice circuit File specified in my circuitFile attribute if present, my rawLines attribute if specified, or my subclass's docstring, in that order of precedence. Failing everything, returns an empty list.
Don't worry about indentation; all that is stripped out in any case because there is no such thing in SPICE format.
Call to insert a current-measuring shunt and add an entry to my Elements
baton's dict of shunts.