11.1.10.2. ElementParameter

This modules implements the machinery to define element’s parameters as descriptors.

class PySpice.Spice.ElementParameter.BoolKeyParameter(spice_name, default=None)[source]

Bases: PySpice.Spice.ElementParameter.KeyValueParameter

This class implements a boolean key parameter.

class PySpice.Spice.ElementParameter.ElementNamePositionalParameter(position, default=None, key_parameter=False)[source]

Bases: PySpice.Spice.ElementParameter.PositionalElementParameter

This class implements an element name positional parameter.

validate(value)[source]

Validate the parameter’s value.

class PySpice.Spice.ElementParameter.ExpressionKeyParameter(spice_name, default=None)[source]

Bases: PySpice.Spice.ElementParameter.KeyValueParameter

This class implements an expression key parameter.

validate(value)[source]

Validate the parameter’s value.

class PySpice.Spice.ElementParameter.ExpressionPositionalParameter(position, default=None, key_parameter=False)[source]

Bases: PySpice.Spice.ElementParameter.PositionalElementParameter

This class implements an expression positional parameter.

validate(value)[source]

Validate the parameter’s value.

class PySpice.Spice.ElementParameter.FlagParameter(spice_name, default=False)[source]

Bases: PySpice.Spice.ElementParameter.ParameterDescriptor

This class implements a flag parameter.

Public Attributes:

spice_name

Name of the parameter

to_str(instance)[source]

Convert the parameter’s value to SPICE syntax.

class PySpice.Spice.ElementParameter.FloatKeyParameter(spice_name, unit=None, **kwargs)[source]

Bases: PySpice.Spice.ElementParameter.KeyValueParameter

This class implements a float key parameter.

validate(value)[source]

Validate the parameter’s value.

class PySpice.Spice.ElementParameter.FloatPairKeyParameter(spice_name, default=None)[source]

Bases: PySpice.Spice.ElementParameter.KeyValueParameter

This class implements a float pair key parameter.

validate(pair)[source]

Validate the parameter’s value.

class PySpice.Spice.ElementParameter.FloatPositionalParameter(position, unit=None, **kwargs)[source]

Bases: PySpice.Spice.ElementParameter.PositionalElementParameter

This class implements a float positional parameter.

validate(value)[source]

Validate the parameter’s value.

class PySpice.Spice.ElementParameter.FloatTripletKeyParameter(spice_name, default=None)[source]

Bases: PySpice.Spice.ElementParameter.FloatPairKeyParameter

This class implements a triplet key parameter.

validate(uplet)[source]

Validate the parameter’s value.

class PySpice.Spice.ElementParameter.InitialStatePositionalParameter(position, default=None, key_parameter=False)[source]

Bases: PySpice.Spice.ElementParameter.PositionalElementParameter

This class implements an initial state (on, off) positional parameter.

to_str(instance)[source]

Convert the parameter’s value to SPICE syntax.

validate(value)[source]

Validate the parameter’s value.

class PySpice.Spice.ElementParameter.IntKeyParameter(spice_name, default=None)[source]

Bases: PySpice.Spice.ElementParameter.KeyValueParameter

This class implements an integer key parameter.

validate(value)[source]

Validate the parameter’s value.

class PySpice.Spice.ElementParameter.KeyValueParameter(spice_name, default=None)[source]

Bases: PySpice.Spice.ElementParameter.ParameterDescriptor

This class implements a key value pair parameter.

Public Attributes:

spice_name

Name of the parameter

to_str(instance)[source]

Convert the parameter’s value to SPICE syntax.

class PySpice.Spice.ElementParameter.ModelPositionalParameter(position, default=None, key_parameter=False)[source]

Bases: PySpice.Spice.ElementParameter.PositionalElementParameter

This class implements a model positional parameter.

validate(value)[source]

Validate the parameter’s value.

class PySpice.Spice.ElementParameter.ParameterDescriptor(default=None)[source]

Bases: object

This base class implements a descriptor for element parameters.

Public Attributes:

attribute_name

Name of the attribute in the element’s class

default_value

The default value

to_str(instance)[source]

Convert the parameter’s value to SPICE syntax.

validate(value)[source]

Validate the parameter’s value.

class PySpice.Spice.ElementParameter.PositionalElementParameter(position, default=None, key_parameter=False)[source]

Bases: PySpice.Spice.ElementParameter.ParameterDescriptor

This class implements a descriptor for positional element parameters.

Public Attributes:

key_parameter

Flag to specify if the parameter is passed as key parameter in Python

position

Position of the parameter in the element definition

to_str(instance)[source]

Convert the parameter’s value to SPICE syntax.