mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-01-16 04:12:03 +01:00
- cleanup (renamed directories to match project structure)
- tested and fixed Samsung favorites and locks for C,D,AstraHD
This commit is contained in:
65
ChanSort.Loader.TllFile/DvbsDataLayout.cs
Normal file
65
ChanSort.Loader.TllFile/DvbsDataLayout.cs
Normal file
@@ -0,0 +1,65 @@
|
||||
namespace ChanSort.Loader.TllFile
|
||||
{
|
||||
public class DvbsDataLayout
|
||||
{
|
||||
public readonly int satCount;
|
||||
public readonly int satLength;
|
||||
public readonly int sizeOfTransponderBlockHeader;
|
||||
public readonly int transponderCount;
|
||||
public readonly int transponderLength;
|
||||
public readonly int sizeOfChannelLinkedListEntry = 8;
|
||||
public readonly int dvbsMaxChannelCount;
|
||||
public readonly int dvbsChannelLength;
|
||||
public readonly int lnbCount;
|
||||
public readonly int lnbLength;
|
||||
public readonly int[] dvbsSubblockLength;
|
||||
|
||||
public int LnbBlockHeaderSize = 12;
|
||||
|
||||
public DvbsDataLayout(Api.IniFile.Section iniSection)
|
||||
{
|
||||
this.satCount = iniSection.GetInt("satCount");
|
||||
this.satLength = iniSection.GetInt("satLength");
|
||||
this.transponderCount = iniSection.GetInt("transponderCount");
|
||||
this.transponderLength = iniSection.GetInt("transponderLength");
|
||||
this.sizeOfTransponderBlockHeader = 14 + transponderCount/8 + transponderCount*6 + 2;
|
||||
this.dvbsMaxChannelCount = iniSection.GetInt("dvbsChannelCount");
|
||||
this.dvbsChannelLength = iniSection.GetInt("dvbsChannelLength");
|
||||
this.lnbCount = iniSection.GetInt("lnbCount");
|
||||
this.lnbLength = iniSection.GetInt("lnbLength");
|
||||
|
||||
this.dvbsSubblockLength = new[]
|
||||
{
|
||||
12, // header
|
||||
14 + 2 + this.satCount + this.satCount*this.satLength, // satellites
|
||||
sizeOfTransponderBlockHeader - 4 + transponderCount * transponderLength, // transponder
|
||||
12 + dvbsMaxChannelCount/8 + dvbsMaxChannelCount*sizeOfChannelLinkedListEntry + dvbsMaxChannelCount * dvbsChannelLength, // channels
|
||||
LnbBlockHeaderSize - 4 + lnbCount * lnbLength // sat/LNB-Config
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// relative to start of DVBS-Block (including the intial 4 length bytes)
|
||||
/// </summary>
|
||||
public int ChannelListHeaderOffset
|
||||
{
|
||||
get { return 4 + this.dvbsSubblockLength[0] + this.dvbsSubblockLength[1] + this.dvbsSubblockLength[2]; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// relative to start of DVBS-Block (including the intial 4 length bytes)
|
||||
/// </summary>
|
||||
public int SequenceTableOffset
|
||||
{
|
||||
get { return ChannelListHeaderOffset + 12 + dvbsMaxChannelCount/8; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// relative to start of DVBS-Block (including the intial 4 length bytes)
|
||||
/// </summary>
|
||||
public int ChannelListOffset
|
||||
{
|
||||
get { return SequenceTableOffset + dvbsMaxChannelCount*sizeOfChannelLinkedListEntry; }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user