Class Diode
A diode.
Implements
Inherited Members
Namespace: SpiceSharp.Components
Assembly: SpiceSharp.dll
Syntax
[Pin(0, "D+")]
[Pin(1, "D-")]
public class Diode : Component<Parameters>, IComponent, IEntity, IParameterSetCollection, IParameterSet, ICloneable<IEntity>, IRuleSubject, IParameterized<Parameters>
Constructors
Diode(string)
Initializes a new instance of the Diode class.
Declaration
public Diode(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the device. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown if |
Diode(string, string, string, string)
Initializes a new instance of the Diode class.
Declaration
public Diode(string name, string anode, string cathode, string model)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the device. |
| string | anode | The anode. |
| string | cathode | The cathode. |
| string | model | The model. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown if |
Fields
PinCount
The pin count for diodes.
Declaration
[ParameterName("pincount")]
[ParameterInfo("Number of pins")]
public const int PinCount = 2
Field Value
| Type | Description |
|---|---|
| int |
Methods
CreateBehaviors(ISimulation)
Creates the behaviors and stores them in the specified container.
Declaration
public override void CreateBehaviors(ISimulation simulation)
Parameters
| Type | Name | Description |
|---|---|---|
| ISimulation | simulation | The simulation. |
Overrides
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown if |
| ArgumentException | Thrown if the simulation does not use an IComplexSimulationState. |
| TypeNotFoundException | Thrown if a required behavior or parameter set could not be found. |
| AmbiguousTypeException | Thrown if a behavior or parameter set could not be resolved unambiguously. |