pingspice.ngspice.runner.AlterationManager(object)
class documentation
Part of pingspice.ngspice.runner
(View In Hierarchy)
I keep track of pending alterations.
Instance Variable | a | A list containing the (dev, param, expr) of pending
alter commands. If there is no parameter, param is
None . |
Instance Variable | m | A dict of lists of 2-tuples, keyed by dev, each list containing the
(param, expr) of pending altermod commands. |
Method | __init__ | Undocumented |
Method | wait | "Returns" a Deferred that fires when all my
pending alterations are done. At that point, both my ordered dicts a
and m will be clear. |
Method | alter | Builds and returns a list of tokens for an Ngspice alter
command, adding the command to my a list. |
Method | altermod | Builds and returns a list of tokens for an Ngspice altermod
command, adding the command to my m list. |
Method | _setOrAppend | Undocumented |
alter
commands. If there is no parameter, param is
None
.
altermod
commands.
def wait(self):
"Returns" a Deferred
that fires when all my
pending alterations are done. At that point, both my ordered dicts a
and m will be clear.
The Deferred
fires with None
if the values
were all implemented, or with a Result
object in
error state if there was a problem.
Builds and returns a list of tokens for an Ngspice alter
command, adding the command to my a list.
Some example calls:
r.alter('r1', 1.0) r.alter('v1', 'dc', 11.9) r.alter('@v1[DC]', 11.9) r.alter('@v1[PULSE]', [0, 11.9, 0, 1e-6])
Note that lines 2 and 3 above are equivalent. (Parameter names are
forced to lowercase.) AV_ListHolder.alterations
uses the latter form.