You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.5 KiB
54 lines
1.5 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.ObjectModel;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Signal_Generator
|
|
{
|
|
public class MultiSignal : IAnalogSignal
|
|
{
|
|
private List<IAnalogSignal> signals { get; set; }
|
|
|
|
public MultiSignal()
|
|
{
|
|
signals = new List<IAnalogSignal>();
|
|
}
|
|
|
|
internal void add(IAnalogSignal signal)
|
|
{
|
|
signals.Add(signal);
|
|
}
|
|
|
|
internal void remove(IAnalogSignal signal)
|
|
{
|
|
signals.Remove(signal);
|
|
}
|
|
|
|
public double currentAmplitude(double t)
|
|
{
|
|
double summaryAmplitude = 0;
|
|
foreach (IAnalogSignal item in signals)
|
|
{
|
|
summaryAmplitude += item.currentAmplitude(t);
|
|
}
|
|
return summaryAmplitude;
|
|
}
|
|
|
|
// Неиспользуемые поля и методы
|
|
|
|
public string typeToString => throw new NotImplementedException();
|
|
|
|
string IAnalogSignal.paramsToString => throw new NotImplementedException();
|
|
|
|
string IAnalogSignal.typeToString => throw new NotImplementedException();
|
|
|
|
Collection<Parameter> IAnalogSignal.paramsCollection { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
|
|
|
double IAnalogSignal.currentAmplitude(double t)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|
|
|