2013-04-03 12:47:24 +02:00
|
|
|
|
using ChanSort.Api;
|
|
|
|
|
|
|
|
|
|
|
|
namespace ChanSort.Loader.ScmFile
|
|
|
|
|
|
{
|
|
|
|
|
|
class SatChannel : ScmChannelBase
|
|
|
|
|
|
{
|
|
|
|
|
|
private const string _TransponderIndex = "offTransponderIndex";
|
|
|
|
|
|
|
2013-04-03 23:26:09 +02:00
|
|
|
|
public SatChannel(int slot, SignalSource presetList, DataMapping data, DataRoot dataRoot, int favoriteNotSetValue) :
|
2013-04-03 15:41:04 +02:00
|
|
|
|
base(data, favoriteNotSetValue)
|
2013-04-03 12:47:24 +02:00
|
|
|
|
{
|
2013-04-03 23:26:09 +02:00
|
|
|
|
this.InitCommonData(slot, SignalSource.DvbS | presetList, data);
|
2013-04-03 12:47:24 +02:00
|
|
|
|
if (!this.InUse)
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
this.InitDvbData(data);
|
|
|
|
|
|
|
|
|
|
|
|
int transponderIndex = data.GetWord(_TransponderIndex);
|
|
|
|
|
|
Transponder transponder = dataRoot.Transponder.TryGet(transponderIndex);
|
|
|
|
|
|
if (transponder == null)
|
|
|
|
|
|
{
|
|
|
|
|
|
dataRoot.Warnings.AppendLine("Invalid transponder index: " + transponderIndex);
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Satellite sat = transponder.Satellite;
|
|
|
|
|
|
this.Satellite = sat.Name;
|
|
|
|
|
|
this.SatPosition = sat.OrbitalPosition;
|
|
|
|
|
|
this.Polarity = transponder.Polarity;
|
|
|
|
|
|
this.SymbolRate = transponder.SymbolRate;
|
|
|
|
|
|
this.FreqInMhz = transponder.FrequencyInMhz;
|
|
|
|
|
|
this.ChannelOrTransponder = "";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|