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.
55 lines
1.5 KiB
55 lines
1.5 KiB
6 years ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
6 years ago
|
using System.Collections.ObjectModel;
|
||
6 years ago
|
using System.Linq;
|
||
|
using System.Text;
|
||
|
using System.Threading.Tasks;
|
||
|
|
||
|
namespace Signal_Generator
|
||
|
{
|
||
|
class MultiSignal : IAnalogSignal
|
||
|
{
|
||
6 years ago
|
private string paramsToString { get; }
|
||
6 years ago
|
private List<IAnalogSignal> signals { get; set; }
|
||
6 years ago
|
private Dictionary<string, double> paramsDict { get; set; }
|
||
|
|
||
|
public string typeToString => throw new NotImplementedException();
|
||
|
|
||
|
string IAnalogSignal.paramsToString => throw new NotImplementedException();
|
||
|
|
||
6 years ago
|
string IAnalogSignal.typeToString => throw new NotImplementedException();
|
||
|
|
||
|
Collection<Parameter> IAnalogSignal.paramsCollection { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||
6 years ago
|
|
||
|
public MultiSignal()
|
||
|
{
|
||
|
signals = new List<IAnalogSignal>();
|
||
|
}
|
||
|
|
||
|
public void add(IAnalogSignal signal)
|
||
|
{
|
||
|
signals.Add(signal);
|
||
|
}
|
||
|
|
||
|
public 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;
|
||
|
}
|
||
6 years ago
|
|
||
|
double IAnalogSignal.currentAmplitude(double t)
|
||
|
{
|
||
|
throw new NotImplementedException();
|
||
|
}
|
||
6 years ago
|
}
|
||
|
}
|