pingspice.circuit.netlist.Include(NodeStuff)
class documentation
Part of pingspice.circuit.netlist
(View In Hierarchy)
Known subclasses: pingspice.analysis.capacitance.Capacitance, pingspice.analysis.capacitance.FastChargeCap, pingspice.analysis.capacitance.Initializer, pingspice.examples.boost.Circuit, pingspice.examples.current-limit.CurrentLimiter, pingspice.lib.passive.Lsi, pingspice.lib.semiconductor.PowerSemiconductorInclude, pingspice.test.analysis.test_capacitance.SillyCircuit, pingspice.test.circuit.test_netlist.SillyInclude, pingspice.test.circuit.test_nodes.SillyInclude, pingspice.test.lib.test_passive.SillyCircuit
I am Python-analogous to the Ngspice .INCLUDE statement.
Instead of incorporating the contents of a netlist file, I incorporate
Python code producing part of a netlist. Just construct an instance of a
subclass of me with your custom setup
method. That does all the circuit generation; unlike a Subcircuit
,
you never call or do anything else with the instance.
You can set attributes of the instance with constructor keywords. The
attributes will be in place before I run your override of my setup
method.
If you supply additional positional arguments (as opposed to keywords)
after f, those will be passed on to your setup
override method. That's convenient for supplying specific node names in the
constructor for each instance and referencing them generically in the setup
method.
In most cases, you will use a subclass of Subcircuit
rather than a subclass of this.
Instance Variable | nodes | A sequence with the nodes that were supplied as args to the constructor, if any. If there were no constructor args, then any nodes class attribute is left alone. If there was a class attribute and arguments, an exception is raised. |
Method | __init__ | Undocumented |
Method | setup | Included circuit definition. |
Inherited from NodeStuff:
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 | 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. |
Included circuit definition.
Override this to define your own method for constructing part of a
netlist, using the Elements
object provided as f. Why use f? Because it's short and a
conveniently typed letter on the keyboard.
As with Subcircuit.setup
,
your override method can return a dict of attribute names and values to set
in my instance.