Class Pulse
This class implements a pulse waveform.
Implements
Inherited Members
Namespace: SpiceSharp.Components
Assembly: SpiceSharp.dll
Syntax
public class Pulse : ParameterSet<IWaveformDescription>, IWaveformDescription, ICloneable<IWaveformDescription>, IImportParameterSet<double>, IExportPropertySet<double>, IImportParameterSet<double[]>, IImportParameterSet<GivenParameter<double>>, IExportPropertySet<GivenParameter<double>>, IParameterSet
Constructors
Pulse()
Initializes a new instance of the Pulse class.
Declaration
public Pulse()
Pulse(double, double, double, double, double, double, double)
Initializes a new instance of the Pulse class.
Declaration
public Pulse(double initialValue, double pulsedValue, double delay, double riseTime, double fallTime, double pulseWidth, double period)
Parameters
Type | Name | Description |
---|---|---|
double | initialValue | The initial value. |
double | pulsedValue | The peak value. |
double | delay | The initial delay time in seconds. |
double | riseTime | The rise time in seconds. |
double | fallTime | The fall time in seconds. |
double | pulseWidth | The pulse width in seconds. |
double | period | The period in seconds. |
Properties
Delay
Gets the delay of the waveform in seconds.
Declaration
[ParameterName("td")]
[ParameterInfo("The initial delay time in seconds", Units = "s")]
public double Delay { get; set; }
Property Value
Type | Description |
---|---|
double | The delay of the waveform. |
FallTime
Gets or sets the fall time in seconds.
Declaration
[ParameterName("tf")]
[ParameterInfo("The fall time", Units = "s")]
[GreaterThanOrEquals(0)]
public GivenParameter<double> FallTime { get; set; }
Property Value
Type | Description |
---|---|
GivenParameter<double> | The fall time. |
InitialValue
Gets or sets the initial/low value.
Declaration
[ParameterName("v1")]
[ParameterInfo("The initial value")]
public double InitialValue { get; set; }
Property Value
Type | Description |
---|---|
double | The initial/low value. |
Period
Gets or sets the period in seconds.
Declaration
[ParameterName("per")]
[ParameterInfo("The period", Units = "s")]
[GreaterThan(0)]
public double Period { get; set; }
Property Value
Type | Description |
---|---|
double | The period. |
PulseWidth
Gets or sets the width of the pulse in seconds.
Declaration
[ParameterName("pw")]
[ParameterInfo("The pulse width", Units = "s")]
[GreaterThan(0)]
public double PulseWidth { get; set; }
Property Value
Type | Description |
---|---|
double | The pulse width. |
PulsedValue
Gets or sets the pulsed/high value.
Declaration
[ParameterName("v2")]
[ParameterInfo("The peak value")]
public double PulsedValue { get; set; }
Property Value
Type | Description |
---|---|
double | The pulsed/high value. |
RiseTime
Gets or sets the rise time in seconds.
Declaration
[ParameterName("tr")]
[ParameterInfo("The rise time", Units = "s")]
[GreaterThanOrEquals(0)]
public GivenParameter<double> RiseTime { get; set; }
Property Value
Type | Description |
---|---|
GivenParameter<double> | The rise time. |
Methods
Create(IBindingContext)
Creates a waveform instance for the specified simulation and entity.
Declaration
public IWaveform Create(IBindingContext context)
Parameters
Type | Name | Description |
---|---|---|
IBindingContext | context | The binding context. |
Returns
Type | Description |
---|---|
IWaveform | The waveform instance. |
SetPulse(double[])
Sets all the pulse parameters.
Declaration
[ParameterName("pulse")]
[ParameterInfo("Specify the waveform as a vector")]
public void SetPulse(double[] pulse)
Parameters
Type | Name | Description |
---|---|---|
double[] | pulse | The pulse parameters. |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown if |
ToString()
Returns a string that represents the current pulse waveform.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents the current pulse waveform. |