/// <summary>Factory method for a deferred statement that should be processed later.</summary> /// <param name="par"></param> /// <param name="name"></param> /// <returns></returns> protected override ICircuitDefinitionDevice GetDevice(InputSourceBehavior par, string name) { return(new CurrentSource(par, name)); }
/// <summary>Adds a behaviored current source between specified nodes.</summary> /// <param name="builder">The builder.</param> /// <param name="n1">Positive node of the device.</param> /// <param name="n2">Negative node of the device.</param> /// <param name="param">Parameters of the desired behavior.</param> /// <param name="tag">Tag to identify the device.</param> /// <returns></returns> public static CircuitBuilder AddCurrentSource(this CircuitBuilder builder, int n1, int n2, InputSourceBehavior param, object tag = null) { builder.AddDevice(new[] { n1, n2 }, new CurrentSource(param, tag)); return(builder); }
/// <summary>Factory method for a deferred statement that should be processed later.</summary> /// <param name="par"></param> /// <param name="name"></param> /// <returns></returns> protected abstract ICircuitDefinitionDevice GetDevice(InputSourceBehavior par, string name);
public VoltageSource(InputSourceBehavior behavior, object tag = null) : base(tag) { Behavior = behavior; }
public CurrentSource(InputSourceBehavior behavior, object tag = null) : base(tag) { Behavior = behavior; }