/// <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);
 }
Example #3
0
 /// <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);
Example #4
0
		public VoltageSource(InputSourceBehavior behavior, object tag = null) : base(tag)
		{
			Behavior = behavior;
		}
Example #5
0
 public CurrentSource(InputSourceBehavior behavior, object tag = null) : base(tag)
 {
     Behavior = behavior;
 }