Beispiel #1
0
 /// <summary>
 /// Creates a new instance of the <see cref="CurrentSource"/> class.
 /// </summary>
 /// <param name="name">The name of the current source</param>
 /// <param name="pos">The positive node</param>
 /// <param name="neg">The negative node</param>
 /// <param name="waveform">The Waveform-object</param>
 public CurrentSource(string name, string pos, string neg, Waveform waveform)
     : this(name)
 {
     ParameterSets.Add(new CommonBehaviors.IndependentSourceParameters(waveform));
     ParameterSets.Add(new CommonBehaviors.IndependentSourceFrequencyParameters());
     Connect(pos, neg);
 }
Beispiel #2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="name">The name of the voltage source</param>
 /// <param name="pos">The positive node</param>
 /// <param name="neg">The negative node</param>
 /// <param name="waveform">The waveform</param>
 public VoltageSource(string name, string pos, string neg, Waveform waveform)
     : base(name, VoltageSourcePinCount)
 {
     ParameterSets.Add(new CommonBehaviors.IndependentBaseParameters(waveform));
     ParameterSets.Add(new CommonBehaviors.IndependentFrequencyParameters());
     Connect(pos, neg);
 }
Beispiel #3
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="name">The name of the current source</param>
        /// <param name="pos">The positive node</param>
        /// <param name="neg">The negative node</param>
        /// <param name="waveform">The Waveform-object</param>
        public CurrentSource(Identifier name, Identifier pos, Identifier neg, Waveform waveform)
            : base(name, CurrentSourcePinCount)
        {
            // Add parameters
            ParameterSets.Add(new BaseParameters(waveform));
            ParameterSets.Add(new FrequencyParameters());

            // Add factories
            Behaviors.Add(typeof(LoadBehavior), () => new LoadBehavior(Name));
            Behaviors.Add(typeof(FrequencyBehavior), () => new FrequencyBehavior(Name));
            Behaviors.Add(typeof(AcceptBehavior), () => new AcceptBehavior(Name));

            // Connect
            Connect(pos, neg);
        }
Beispiel #4
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="name">The name of the voltage source</param>
        /// <param name="pos">The positive node</param>
        /// <param name="neg">The negative node</param>
        /// <param name="waveform">The waveform</param>
        public VoltageSource(string name, string pos, string neg, Waveform waveform)
            : base(name, VoltageSourcePinCount)
        {
            // Register parameters
            ParameterSets.Add(new BaseParameters(waveform));
            ParameterSets.Add(new FrequencyParameters());

            // Register factories
            Behaviors.Add(typeof(LoadBehavior), () => new LoadBehavior(Name));
            Behaviors.Add(typeof(FrequencyBehavior), () => new FrequencyBehavior(Name));
            Behaviors.Add(typeof(AcceptBehavior), () => new AcceptBehavior(Name));

            // Connect the device
            Connect(pos, neg);
        }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="name">The name of the current source</param>
 /// <param name="pos">The positive node</param>
 /// <param name="neg">The negative node</param>
 /// <param name="w">The waveform</param>
 public Currentsource(string name, string pos, string neg, Waveform w) : base(name, 2)
 {
     Connect(pos, neg);
     ISRCwaveform.Set(w);
 }
Beispiel #6
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="name">The name of the voltage source</param>
 /// <param name="pos">The positive node</param>
 /// <param name="neg">The negative node</param>
 /// <param name="w">The waveform</param>
 public Voltagesource(string name, string pos, string neg, Waveform w) : base(name, 2)
 {
     Connect(pos, neg);
     VSRCwaveform.Set(w);
 }