|
|
|
|
@ -37,6 +37,7 @@ using System.Linq;
|
|
|
|
|
using System.Net;
|
|
|
|
|
using System.Net.NetworkInformation;
|
|
|
|
|
using skyscraper8.Ietf.FLUTE;
|
|
|
|
|
using skyscraper8.Skyscraper.Scraper.Storage.Utilities;
|
|
|
|
|
using Platform = skyscraper5.Dvb.SystemSoftwareUpdate.Model.Platform;
|
|
|
|
|
|
|
|
|
|
namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
@ -178,7 +179,8 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
|
|
|
|
|
public bool StorePatEntry(int currentNetworkId, int currentTransportStreamId, int pmtPid, ushort programId)
|
|
|
|
|
{
|
|
|
|
|
InMemoryPatEntry inMemoryPatEntry = new InMemoryPatEntry(currentNetworkId, currentTransportStreamId, pmtPid, programId);
|
|
|
|
|
InMemoryPatEntry inMemoryPatEntry =
|
|
|
|
|
new InMemoryPatEntry(currentNetworkId, currentTransportStreamId, pmtPid, programId);
|
|
|
|
|
return patEntries.Add(inMemoryPatEntry);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -206,7 +208,8 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool StoreTeletextPage(int networkId, int transportStreamId, ushort programNumber, TeletextMagazine magazine, DateTime timestamp)
|
|
|
|
|
public bool StoreTeletextPage(int networkId, int transportStreamId, ushort programNumber,
|
|
|
|
|
TeletextMagazine magazine, DateTime timestamp)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
@ -222,13 +225,15 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
return sdtServices[transportStreamId][originalNetworkId][sdtService.ServiceId] != null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool TestForTeletextPage(int networkId, int transportStreamId, ushort programNumber, TeletextMagazine magazine, DateTime timestamp)
|
|
|
|
|
public bool TestForTeletextPage(int networkId, int transportStreamId, ushort programNumber,
|
|
|
|
|
TeletextMagazine magazine, DateTime timestamp)
|
|
|
|
|
{
|
|
|
|
|
//No need to keep teletext pages in memory
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void MarkTeletextPageAsKnown(int networkId, int transportStreamId, ushort programNumber, TeletextMagazine magazine, DateTime timestamp)
|
|
|
|
|
public void MarkTeletextPageAsKnown(int networkId, int transportStreamId, ushort programNumber,
|
|
|
|
|
TeletextMagazine magazine, DateTime timestamp)
|
|
|
|
|
{
|
|
|
|
|
//No need to keep teletext pages in memory
|
|
|
|
|
}
|
|
|
|
|
@ -352,7 +357,8 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
batTransportStreams[batBouquetBouquetId][child.TransportStreamId] = child;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool UpdateTimeOffsetTable(int currentNetworkId, int currentTransportStreamId, DateTime newTime, LocalTimeOffsetDescriptor ltod)
|
|
|
|
|
public bool UpdateTimeOffsetTable(int currentNetworkId, int currentTransportStreamId, DateTime newTime,
|
|
|
|
|
LocalTimeOffsetDescriptor ltod)
|
|
|
|
|
{
|
|
|
|
|
if (timeOffsets[currentNetworkId] == null)
|
|
|
|
|
timeOffsets[currentNetworkId] = new Tuple<DateTime, LocalTimeOffsetDescriptor>[ushort.MaxValue];
|
|
|
|
|
@ -363,7 +369,9 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
if ((newTime - oldTime).TotalSeconds < 10)
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
timeOffsets[currentNetworkId][currentTransportStreamId] = new Tuple<DateTime, LocalTimeOffsetDescriptor>(newTime, ltod);
|
|
|
|
|
|
|
|
|
|
timeOffsets[currentNetworkId][currentTransportStreamId] =
|
|
|
|
|
new Tuple<DateTime, LocalTimeOffsetDescriptor>(newTime, ltod);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -390,7 +398,8 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
|
|
|
|
|
public bool TestForAitApplication(ApplicationIdentifier aitApplicationApplicationIdentifier)
|
|
|
|
|
{
|
|
|
|
|
AitApplicationCoordinate aitCoordinate = new AitApplicationCoordinate(aitApplicationApplicationIdentifier.OrganisationId, aitApplicationApplicationIdentifier.ApplicationId);
|
|
|
|
|
AitApplicationCoordinate aitCoordinate = new AitApplicationCoordinate(
|
|
|
|
|
aitApplicationApplicationIdentifier.OrganisationId, aitApplicationApplicationIdentifier.ApplicationId);
|
|
|
|
|
return aitApplicationCoordinates.Contains(aitCoordinate);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -406,7 +415,8 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
|
|
|
|
|
public bool ObjectCarouselFileArrival(VfsFile vfsFile, int transportStreamId, int networkId)
|
|
|
|
|
{
|
|
|
|
|
string outPath = String.Format("{0}{1}{2}{1}{3}{4}", networkId, Path.DirectorySeparatorChar, transportStreamId, vfsFile.SourcePid, vfsFile.ToString());
|
|
|
|
|
string outPath = String.Format("{0}{1}{2}{1}{3}{4}", networkId, Path.DirectorySeparatorChar,
|
|
|
|
|
transportStreamId, vfsFile.SourcePid, vfsFile.ToString());
|
|
|
|
|
FileInfo outFileInfo = new FileInfo(outPath);
|
|
|
|
|
if (outFileInfo.Exists)
|
|
|
|
|
return false;
|
|
|
|
|
@ -417,7 +427,9 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
|
|
|
|
|
public bool TestForCaSystem(int currentNetworkId, int currentTransportStreamId, int caDescriptorCaPid)
|
|
|
|
|
{
|
|
|
|
|
InMemoryCaSystem find = caSystems.Find(x => x.CurrentNetworkId == currentNetworkId && x.CurrentTransportStreamId == currentTransportStreamId && x.CaPid == caDescriptorCaPid);
|
|
|
|
|
InMemoryCaSystem find = caSystems.Find(x =>
|
|
|
|
|
x.CurrentNetworkId == currentNetworkId && x.CurrentTransportStreamId == currentTransportStreamId &&
|
|
|
|
|
x.CaPid == caDescriptorCaPid);
|
|
|
|
|
return find != null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -432,15 +444,19 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
return updateHashes.Contains(hashCode);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void StoreUpdateNotification(int hashCode, UpdateNotificationGroup common, Compatibility compatibility, Platform platform)
|
|
|
|
|
public void StoreUpdateNotification(int hashCode, UpdateNotificationGroup common, Compatibility compatibility,
|
|
|
|
|
Platform platform)
|
|
|
|
|
{
|
|
|
|
|
updateHashes.Add(hashCode);
|
|
|
|
|
updates.Add(new Tuple<int, Compatibility, Platform>(hashCode, compatibility, platform));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void DataCarouselModuleArrival(int currentNetworkId, int currentTransportStreamId, int elementaryPid, ushort moduleModuleId, byte moduleModuleVersion, Stream result)
|
|
|
|
|
public void DataCarouselModuleArrival(int currentNetworkId, int currentTransportStreamId, int elementaryPid,
|
|
|
|
|
ushort moduleModuleId, byte moduleModuleVersion, Stream result)
|
|
|
|
|
{
|
|
|
|
|
string outPath = String.Format("{0}{1}{2}{1}{3}{1}{4}_{5}.bin", currentNetworkId, Path.DirectorySeparatorChar, currentTransportStreamId, elementaryPid, moduleModuleId, moduleModuleVersion);
|
|
|
|
|
string outPath = String.Format("{0}{1}{2}{1}{3}{1}{4}_{5}.bin", currentNetworkId,
|
|
|
|
|
Path.DirectorySeparatorChar, currentTransportStreamId, elementaryPid, moduleModuleId,
|
|
|
|
|
moduleModuleVersion);
|
|
|
|
|
FileInfo fi = new FileInfo(outPath);
|
|
|
|
|
if (fi.Exists)
|
|
|
|
|
return;
|
|
|
|
|
@ -450,7 +466,8 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
fileStream.Close();
|
|
|
|
|
fileStream.Dispose();
|
|
|
|
|
|
|
|
|
|
DsmCcModuleXmlMemory.GetInstance().MarkComplete(currentNetworkId, currentTransportStreamId, elementaryPid, moduleModuleId, moduleModuleVersion);
|
|
|
|
|
DsmCcModuleXmlMemory.GetInstance().MarkComplete(currentNetworkId, currentTransportStreamId, elementaryPid,
|
|
|
|
|
moduleModuleId, moduleModuleVersion);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -482,7 +499,8 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
rdsDataPresent[currentNetworkId][currentTransportStreamId][programNumber] = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool UpdateRdsProgrammeServiceName(int currentNetworkId, int currentTransportStreamId, int programNumber, string programmeService2)
|
|
|
|
|
public bool UpdateRdsProgrammeServiceName(int currentNetworkId, int currentTransportStreamId, int programNumber,
|
|
|
|
|
string programmeService2)
|
|
|
|
|
{
|
|
|
|
|
if (rdsProgrammeService == null)
|
|
|
|
|
rdsProgrammeService = new string[ushort.MaxValue][][];
|
|
|
|
|
@ -493,19 +511,23 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
if (rdsProgrammeService[currentNetworkId][currentTransportStreamId] == null)
|
|
|
|
|
rdsProgrammeService[currentNetworkId][currentTransportStreamId] = new string[ushort.MaxValue];
|
|
|
|
|
|
|
|
|
|
bool result = !string.Equals(programmeService2, rdsProgrammeService[currentNetworkId][currentTransportStreamId][programNumber]);
|
|
|
|
|
bool result = !string.Equals(programmeService2,
|
|
|
|
|
rdsProgrammeService[currentNetworkId][currentTransportStreamId][programNumber]);
|
|
|
|
|
rdsProgrammeService[currentNetworkId][currentTransportStreamId][programNumber] = programmeService2;
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool UpdateRdsRadioText(int currentNetworkId, int currentTransportStreamId, int programNumber, string text)
|
|
|
|
|
public bool UpdateRdsRadioText(int currentNetworkId, int currentTransportStreamId, int programNumber,
|
|
|
|
|
string text)
|
|
|
|
|
{
|
|
|
|
|
InMemoryRdsText child = new InMemoryRdsText(currentNetworkId, currentTransportStreamId, programNumber, text);
|
|
|
|
|
InMemoryRdsText child =
|
|
|
|
|
new InMemoryRdsText(currentNetworkId, currentTransportStreamId, programNumber, text);
|
|
|
|
|
bool add = rdsTexts.Add(child);
|
|
|
|
|
return add;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool UpdateRdsPty(int currentNetworkId, int currentTransportStreamId, int programNumber, PTY.ProgrammeTypeCodes pty)
|
|
|
|
|
public bool UpdateRdsPty(int currentNetworkId, int currentTransportStreamId, int programNumber,
|
|
|
|
|
PTY.ProgrammeTypeCodes pty)
|
|
|
|
|
{
|
|
|
|
|
if (ptyCodes[currentNetworkId] == null)
|
|
|
|
|
ptyCodes[currentNetworkId] = new PTY.ProgrammeTypeCodes[ushort.MaxValue][];
|
|
|
|
|
@ -522,7 +544,8 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool MarkAsRdsTrafficInformationProgramme(int currentNetworkId, int currentTransportStreamId, int programNumber)
|
|
|
|
|
public bool MarkAsRdsTrafficInformationProgramme(int currentNetworkId, int currentTransportStreamId,
|
|
|
|
|
int programNumber)
|
|
|
|
|
{
|
|
|
|
|
if (rdsTrafficInformationPreset == null)
|
|
|
|
|
rdsTrafficInformationPreset = new bool[ushort.MaxValue][][];
|
|
|
|
|
@ -538,18 +561,23 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
rdsTrafficInformationPreset[currentNetworkId][currentTransportStreamId][programNumber] = true;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool TestForScte35SpliceInsert(int currentNetworkId, int currentTransportStreamId, ushort programNumber, SpliceInsert spliceInsert)
|
|
|
|
|
public bool TestForScte35SpliceInsert(int currentNetworkId, int currentTransportStreamId, ushort programNumber,
|
|
|
|
|
SpliceInsert spliceInsert)
|
|
|
|
|
{
|
|
|
|
|
Scte35SpliceCoordinate scte35sc = new Scte35SpliceCoordinate(currentNetworkId, currentTransportStreamId, programNumber, spliceInsert.SpliceEventId);
|
|
|
|
|
Scte35SpliceCoordinate scte35sc = new Scte35SpliceCoordinate(currentNetworkId, currentTransportStreamId,
|
|
|
|
|
programNumber, spliceInsert.SpliceEventId);
|
|
|
|
|
return scte35SpliceCoordinates.Contains(scte35sc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void StoreScte35SpliceInsert(int currentNetworkId, int currentTransportStreamId, ushort programNumber, SpliceInsert spliceInsert)
|
|
|
|
|
public void StoreScte35SpliceInsert(int currentNetworkId, int currentTransportStreamId, ushort programNumber,
|
|
|
|
|
SpliceInsert spliceInsert)
|
|
|
|
|
{
|
|
|
|
|
Scte35SpliceCoordinate scte35sc = new Scte35SpliceCoordinate(currentNetworkId, currentTransportStreamId, programNumber, spliceInsert.SpliceEventId);
|
|
|
|
|
Scte35SpliceCoordinate scte35sc = new Scte35SpliceCoordinate(currentNetworkId, currentTransportStreamId,
|
|
|
|
|
programNumber, spliceInsert.SpliceEventId);
|
|
|
|
|
scte35SpliceCoordinates.Add(scte35sc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -575,41 +603,52 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool IsDsmCcModuleWanted(int currentNetworkId, int currentTransportStreamId, int elementaryPid, ushort moduleId, byte moduleVersion)
|
|
|
|
|
public bool IsDsmCcModuleWanted(int currentNetworkId, int currentTransportStreamId, int elementaryPid,
|
|
|
|
|
ushort moduleId, byte moduleVersion)
|
|
|
|
|
{
|
|
|
|
|
return DsmCcModuleXmlMemory.GetInstance().IsWanted(currentNetworkId, currentTransportStreamId,elementaryPid, moduleId, moduleVersion);
|
|
|
|
|
return DsmCcModuleXmlMemory.GetInstance().IsWanted(currentNetworkId, currentTransportStreamId,
|
|
|
|
|
elementaryPid, moduleId, moduleVersion);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void StoreDsmCcDoItNowEvent(DateTime timestamp, int currentNetworkId, int currentTransportStreamId, int programNumber, StreamEventDescriptor descriptorListStreamEventDescriptor, int pid)
|
|
|
|
|
public void StoreDsmCcDoItNowEvent(DateTime timestamp, int currentNetworkId, int currentTransportStreamId,
|
|
|
|
|
int programNumber, StreamEventDescriptor descriptorListStreamEventDescriptor, int pid)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool StoreRunningStatus(uint transportStreamId, uint originalNetworkId, uint serviceId, uint eventId, RunningStatus runningStatus, DateTime currentTime)
|
|
|
|
|
public bool StoreRunningStatus(uint transportStreamId, uint originalNetworkId, uint serviceId, uint eventId,
|
|
|
|
|
RunningStatus runningStatus, DateTime currentTime)
|
|
|
|
|
{
|
|
|
|
|
RstCoordinates rstCoordinates = new RstCoordinates(originalNetworkId, transportStreamId, serviceId, eventId, runningStatus, currentTime);
|
|
|
|
|
RstCoordinates rstCoordinates = new RstCoordinates(originalNetworkId, transportStreamId, serviceId, eventId,
|
|
|
|
|
runningStatus, currentTime);
|
|
|
|
|
return this.rstCoordinates.Add(rstCoordinates);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void SetScte35TimeSignal(int currentNetworkId, int currentTransportStreamId, DateTime currentTime, ushort programNumber, TimeSignal timeSignal)
|
|
|
|
|
public void SetScte35TimeSignal(int currentNetworkId, int currentTransportStreamId, DateTime currentTime,
|
|
|
|
|
ushort programNumber, TimeSignal timeSignal)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool TestForFramegrab(int currentNetworkId, int transportStreamId, ushort mappingProgramNumber, int mappingStreamElementaryPid)
|
|
|
|
|
public bool TestForFramegrab(int currentNetworkId, int transportStreamId, ushort mappingProgramNumber,
|
|
|
|
|
int mappingStreamElementaryPid)
|
|
|
|
|
{
|
|
|
|
|
FileInfo fi = new FileInfo(Path.Combine("screenshots", currentNetworkId.ToString(), transportStreamId.ToString(), String.Format("{0}.jpg", mappingProgramNumber)));
|
|
|
|
|
FileInfo fi = new FileInfo(Path.Combine("screenshots", currentNetworkId.ToString(),
|
|
|
|
|
transportStreamId.ToString(), String.Format("{0}.jpg", mappingProgramNumber)));
|
|
|
|
|
return fi.Exists;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void StoreFramegrab(int currentNetworkId, int transportStreamId, ushort mappingProgramNumber, ushort pid, byte[] imageData)
|
|
|
|
|
public void StoreFramegrab(int currentNetworkId, int transportStreamId, ushort mappingProgramNumber, ushort pid,
|
|
|
|
|
byte[] imageData)
|
|
|
|
|
{
|
|
|
|
|
FileInfo fi = new FileInfo(Path.Combine("screenshots", currentNetworkId.ToString(), transportStreamId.ToString(), String.Format("{0}.jpg", mappingProgramNumber)));
|
|
|
|
|
FileInfo fi = new FileInfo(Path.Combine("screenshots", currentNetworkId.ToString(),
|
|
|
|
|
transportStreamId.ToString(), String.Format("{0}.jpg", mappingProgramNumber)));
|
|
|
|
|
fi.Directory.EnsureExists();
|
|
|
|
|
File.WriteAllBytes(fi.FullName, imageData);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private HashSet<DocsisUpstreamChannelCoordinate> _docsisUpstreamChannelCoordinates;
|
|
|
|
|
|
|
|
|
|
public bool TestForDocsisUpstreamChannel(PhysicalAddress mmmSource, uint mmmFrequency, int locationId)
|
|
|
|
|
{
|
|
|
|
|
if (_docsisUpstreamChannelCoordinates == null)
|
|
|
|
|
@ -627,30 +666,37 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
if (_docsisUpstreamChannelCoordinates == null)
|
|
|
|
|
_docsisUpstreamChannelCoordinates = new HashSet<DocsisUpstreamChannelCoordinate>();
|
|
|
|
|
|
|
|
|
|
DocsisUpstreamChannelCoordinate coord = new DocsisUpstreamChannelCoordinate(mmm.Source, mmm.Frequency.Value);
|
|
|
|
|
DocsisUpstreamChannelCoordinate
|
|
|
|
|
coord = new DocsisUpstreamChannelCoordinate(mmm.Source, mmm.Frequency.Value);
|
|
|
|
|
_docsisUpstreamChannelCoordinates.Add(coord);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private HashSet<DocsisUpstreamChannelCoordinate> _docsisDownstreamChannelCoordinates;
|
|
|
|
|
public bool TestForDocsisDownstreamChannel(PhysicalAddress physicalAddress, MacDomainDescriptor.DownstreamActiveChannel downstreamActiveChannel, int locationId)
|
|
|
|
|
|
|
|
|
|
public bool TestForDocsisDownstreamChannel(PhysicalAddress physicalAddress,
|
|
|
|
|
MacDomainDescriptor.DownstreamActiveChannel downstreamActiveChannel, int locationId)
|
|
|
|
|
{
|
|
|
|
|
if (_docsisDownstreamChannelCoordinates == null)
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
DocsisUpstreamChannelCoordinate coord = new DocsisUpstreamChannelCoordinate(physicalAddress, downstreamActiveChannel.Frequency.Value);
|
|
|
|
|
DocsisUpstreamChannelCoordinate coord =
|
|
|
|
|
new DocsisUpstreamChannelCoordinate(physicalAddress, downstreamActiveChannel.Frequency.Value);
|
|
|
|
|
return _docsisDownstreamChannelCoordinates.Contains(coord);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void StoreDocsisDownstreamChannel(PhysicalAddress physicalAddress, MacDomainDescriptor.DownstreamActiveChannel downstreamActiveChannel, int locationId)
|
|
|
|
|
public void StoreDocsisDownstreamChannel(PhysicalAddress physicalAddress,
|
|
|
|
|
MacDomainDescriptor.DownstreamActiveChannel downstreamActiveChannel, int locationId)
|
|
|
|
|
{
|
|
|
|
|
if (_docsisDownstreamChannelCoordinates == null)
|
|
|
|
|
_docsisDownstreamChannelCoordinates = new HashSet<DocsisUpstreamChannelCoordinate>();
|
|
|
|
|
|
|
|
|
|
DocsisUpstreamChannelCoordinate coord = new DocsisUpstreamChannelCoordinate(physicalAddress, downstreamActiveChannel.Frequency.Value);
|
|
|
|
|
DocsisUpstreamChannelCoordinate coord =
|
|
|
|
|
new DocsisUpstreamChannelCoordinate(physicalAddress, downstreamActiveChannel.Frequency.Value);
|
|
|
|
|
_docsisDownstreamChannelCoordinates.Add(coord);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Dictionary<PhysicalAddress, IPAddress> cmtsIpAddresses;
|
|
|
|
|
|
|
|
|
|
public bool SetCmtsIp(PhysicalAddress arpHeaderSenderHardwareAddress, IPAddress arpHeaderSenderProtocolAddress)
|
|
|
|
|
{
|
|
|
|
|
if (cmtsIpAddresses == null)
|
|
|
|
|
@ -670,7 +716,9 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private DsmCcModuleBlacklist dsmCcBlacklist;
|
|
|
|
|
public bool IsDsmCcModuleBlacklisted(int currentNetworkId, int currentTransportStreamId, int elementaryPid, ushort moduleId,
|
|
|
|
|
|
|
|
|
|
public bool IsDsmCcModuleBlacklisted(int currentNetworkId, int currentTransportStreamId, int elementaryPid,
|
|
|
|
|
ushort moduleId,
|
|
|
|
|
byte moduleVersion)
|
|
|
|
|
{
|
|
|
|
|
if (dsmCcBlacklist == null)
|
|
|
|
|
@ -679,7 +727,8 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
dsmCcBlacklist = new DsmCcModuleBlacklist(fi);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return dsmCcBlacklist.IsBlacklisted(currentNetworkId, currentTransportStreamId, elementaryPid, moduleId, moduleVersion);
|
|
|
|
|
return dsmCcBlacklist.IsBlacklisted(currentNetworkId, currentTransportStreamId, elementaryPid, moduleId,
|
|
|
|
|
moduleVersion);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int? GetCurrentLocationId()
|
|
|
|
|
@ -694,6 +743,7 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Dictionary<PhysicalAddress, int> docsisParticipants;
|
|
|
|
|
|
|
|
|
|
public void StoreDocsisParticipant(PhysicalAddress pa, int currentLocation)
|
|
|
|
|
{
|
|
|
|
|
if (docsisParticipants == null)
|
|
|
|
|
@ -730,6 +780,7 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
knownTss = new KnownTsMemory("known_ts_filenames.json");
|
|
|
|
|
return knownTss.ImportFileKnown(fi);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
public DateTime T2MiGetTimestamp(int currentNetworkId, int currentTransportStreamId, int pid)
|
|
|
|
|
@ -771,6 +822,7 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private List<SatellitePosition> satellitePositions;
|
|
|
|
|
|
|
|
|
|
public List<SatellitePosition> UiSatellitesListAll()
|
|
|
|
|
{
|
|
|
|
|
if (satellitePositions == null)
|
|
|
|
|
@ -791,6 +843,7 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private List<TunerMetadata> uiTuners;
|
|
|
|
|
|
|
|
|
|
public bool UiTunerTestFor(TunerMetadata tuner)
|
|
|
|
|
{
|
|
|
|
|
if (uiTuners == null)
|
|
|
|
|
@ -862,22 +915,26 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
//Since we're working solely in memory, we won't need to remember this.
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool T2MiTestForTransmitter(int? currentNetworkId, int? currentTransportStreamId, int relatedPid, ushort txIdentifier)
|
|
|
|
|
public bool T2MiTestForTransmitter(int? currentNetworkId, int? currentTransportStreamId, int relatedPid,
|
|
|
|
|
ushort txIdentifier)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void T2MiRememberTransmitter(int? currentNetworkId, int? currentTransportStreamId, int relatedPid, ushort txIdentifier)
|
|
|
|
|
public void T2MiRememberTransmitter(int? currentNetworkId, int? currentTransportStreamId, int relatedPid,
|
|
|
|
|
ushort txIdentifier)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void T2MiSetTransmitterTimeOffset(int? currentNetworkId, int? currentTransportStreamId, int relatedPid, ushort txIdentifier, ushort timeOffset)
|
|
|
|
|
public void T2MiSetTransmitterTimeOffset(int? currentNetworkId, int? currentTransportStreamId, int relatedPid,
|
|
|
|
|
ushort txIdentifier, ushort timeOffset)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private List<LnbType> _lnbTypes;
|
|
|
|
|
|
|
|
|
|
public List<LnbType> UiLnbTypesListAll()
|
|
|
|
|
{
|
|
|
|
|
if (_lnbTypes == null)
|
|
|
|
|
@ -894,6 +951,7 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private List<DishType> _dishTypes;
|
|
|
|
|
|
|
|
|
|
public List<DishType> UiDishTypesListAll()
|
|
|
|
|
{
|
|
|
|
|
if (_dishTypes == null)
|
|
|
|
|
@ -991,13 +1049,15 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void BeamFootprintStore(int databasePointerId, DateTime databasePointerBeamsProcessTimestamp, string name,
|
|
|
|
|
public void BeamFootprintStore(int databasePointerId, DateTime databasePointerBeamsProcessTimestamp,
|
|
|
|
|
string name,
|
|
|
|
|
string getPolygonString, string id)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool TestForBeamFootprint(int databasePointerId, DateTime databasePointerBeamsProcessTimestamp, string name,string id)
|
|
|
|
|
public bool TestForBeamFootprint(int databasePointerId, DateTime databasePointerBeamsProcessTimestamp,
|
|
|
|
|
string name, string id)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
@ -1013,12 +1073,14 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<SatelliteBeamFootprint> BeamsSelectFootprints(int satelliteBeamId, DateTime satelliteBeamProcessTimestamp)
|
|
|
|
|
public List<SatelliteBeamFootprint> BeamsSelectFootprints(int satelliteBeamId,
|
|
|
|
|
DateTime satelliteBeamProcessTimestamp)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private HashSet<DbBlindscanJobContainer> jobs;
|
|
|
|
|
|
|
|
|
|
public void InsertBlindscanJob(DbBlindscanJob jobInDb)
|
|
|
|
|
{
|
|
|
|
|
if (jobs == null)
|
|
|
|
|
@ -1034,7 +1096,8 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void InsertSearchResult(DbBlindscanJob jobInDb, bool satellite, SearchResult searchResult, int polarityIndex,
|
|
|
|
|
public void InsertSearchResult(DbBlindscanJob jobInDb, bool satellite, SearchResult searchResult,
|
|
|
|
|
int polarityIndex,
|
|
|
|
|
SearchResult2 searchResult2)
|
|
|
|
|
{
|
|
|
|
|
DbBlindscanJobContainer dbBlindscanJobContainer = jobs.First(x => x.JobGuid.Equals(jobInDb.JobGuid));
|
|
|
|
|
@ -1057,7 +1120,8 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
if (jobContainer == null)
|
|
|
|
|
throw new Exception("Failed to find the job.");
|
|
|
|
|
|
|
|
|
|
DbBlindscanJobContainer.SearchResultContainer searchResultContainer = jobContainer.GetSearchResult(resultSatellite, resultSr1, resultSr2);
|
|
|
|
|
DbBlindscanJobContainer.SearchResultContainer searchResultContainer =
|
|
|
|
|
jobContainer.GetSearchResult(resultSatellite, resultSr1, resultSr2);
|
|
|
|
|
if (searchResultContainer == null)
|
|
|
|
|
throw new Exception("Failed to find the search result.");
|
|
|
|
|
searchResultContainer.AddService(humanReadableService);
|
|
|
|
|
@ -1108,7 +1172,8 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void StoreTerminalBurstTimePlan(ushort interactiveNetworkId, uint gtoupId, uint superframeCount, uint frameNumber, Tbtp.TbtpFrame.BtpEntity btp)
|
|
|
|
|
public void StoreTerminalBurstTimePlan(ushort interactiveNetworkId, uint gtoupId, uint superframeCount,
|
|
|
|
|
uint frameNumber, Tbtp.TbtpFrame.BtpEntity btp)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
@ -1218,7 +1283,8 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool NetworkLayerInfoTim(PhysicalAddress mac, _0xa0_NetworkLayerInfoDescriptor nlid, DateTime timestamped)
|
|
|
|
|
public bool NetworkLayerInfoTim(PhysicalAddress mac, _0xa0_NetworkLayerInfoDescriptor nlid,
|
|
|
|
|
DateTime timestamped)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
@ -1252,6 +1318,7 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private HashSet<DnsRecord> dnsRecords;
|
|
|
|
|
|
|
|
|
|
public void RememberDnsRecord(DnsRecord record)
|
|
|
|
|
{
|
|
|
|
|
if (dnsRecords == null)
|
|
|
|
|
@ -1261,6 +1328,7 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private SgtList[] sgtLists;
|
|
|
|
|
|
|
|
|
|
public bool TestForSgtList(SgtList list)
|
|
|
|
|
{
|
|
|
|
|
if (sgtLists == null)
|
|
|
|
|
@ -1278,6 +1346,7 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private HashSet<SgtService> sgtServices;
|
|
|
|
|
|
|
|
|
|
public bool TestForSgtService(SgtService child)
|
|
|
|
|
{
|
|
|
|
|
if (sgtServices == null)
|
|
|
|
|
@ -1334,7 +1403,9 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Dictionary<NipActualCarrierInformation, NipPds> _nipPrivateDataSpecifiers;
|
|
|
|
|
public bool DvbNipPrivateDataSpecifier(NipActualCarrierInformation currentCarrierInformation, DateTime versionUpdate, uint privateDataSpecifier, List<string> privateDataSessions)
|
|
|
|
|
|
|
|
|
|
public bool DvbNipPrivateDataSpecifier(NipActualCarrierInformation currentCarrierInformation,
|
|
|
|
|
DateTime versionUpdate, uint privateDataSpecifier, List<string> privateDataSessions)
|
|
|
|
|
{
|
|
|
|
|
if (_nipPrivateDataSpecifiers == null)
|
|
|
|
|
_nipPrivateDataSpecifiers = new Dictionary<NipActualCarrierInformation, NipPds>();
|
|
|
|
|
@ -1373,6 +1444,7 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private BroadcastNetworkType[] nipBroadcastNetworkTypes;
|
|
|
|
|
|
|
|
|
|
public bool DvbNipTestForNetwork(BroadcastNetworkType network)
|
|
|
|
|
{
|
|
|
|
|
if (nipBroadcastNetworkTypes == null)
|
|
|
|
|
@ -1409,7 +1481,8 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
|
|
|
|
|
protected bool Equals(NipServiceCoordinate other)
|
|
|
|
|
{
|
|
|
|
|
return ServiceId == other.ServiceId && LinkId == other.LinkId && CarrierId == other.CarrierId && NetworkId == other.NetworkId;
|
|
|
|
|
return ServiceId == other.ServiceId && LinkId == other.LinkId && CarrierId == other.CarrierId &&
|
|
|
|
|
NetworkId == other.NetworkId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override bool Equals(object? obj)
|
|
|
|
|
@ -1427,6 +1500,7 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Dictionary<NipServiceCoordinate, BroadcastMediaStreamType> _dvbNipServices;
|
|
|
|
|
|
|
|
|
|
public bool DvbNipTestForService(BroadcastMediaStreamType broadcastMediaStreamType)
|
|
|
|
|
{
|
|
|
|
|
if (_dvbNipServices == null)
|
|
|
|
|
@ -1445,6 +1519,52 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
_dvbNipServices.Add(coords, broadcastMediaStreamType);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Dictionary<string, MulticastSessionType> _dvbNipMulticastSessions;
|
|
|
|
|
|
|
|
|
|
public bool DvbNipTestForMulticastSession(MulticastSessionType multicastSession)
|
|
|
|
|
{
|
|
|
|
|
if (_dvbNipMulticastSessions == null)
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
return _dvbNipMulticastSessions.ContainsKey(multicastSession.serviceIdentifier);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void DvbNipInsertMulticastSession(MulticastSessionType multicastSession)
|
|
|
|
|
{
|
|
|
|
|
if (_dvbNipMulticastSessions == null)
|
|
|
|
|
_dvbNipMulticastSessions = new Dictionary<string, MulticastSessionType>();
|
|
|
|
|
|
|
|
|
|
_dvbNipMulticastSessions[multicastSession.serviceIdentifier] = multicastSession;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Dictionary<DatabaseKeyNipMulticastGatewayConfigurationTransportSession,
|
|
|
|
|
MulticastGatewayConfigurationTransportSessionType> _nipMulticastGatewayConfigurationTransportSessions;
|
|
|
|
|
|
|
|
|
|
public bool DvbNipTestForMulticastGatewayConfigurationTransportSession(NipActualCarrierInformation carrier,
|
|
|
|
|
MulticastEndpointAddressType multicastEndpointAddressType)
|
|
|
|
|
{
|
|
|
|
|
if (_nipMulticastGatewayConfigurationTransportSessions == null)
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
DatabaseKeyNipMulticastGatewayConfigurationTransportSession key =
|
|
|
|
|
new DatabaseKeyNipMulticastGatewayConfigurationTransportSession(carrier, multicastEndpointAddressType);
|
|
|
|
|
return _nipMulticastGatewayConfigurationTransportSessions.ContainsKey(key);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void DvbNipInsertMulticastGatewayConfigurationTransportSession(NipActualCarrierInformation carrier,
|
|
|
|
|
MulticastGatewayConfigurationTransportSessionType multicastGatewayConfigurationTransportSession)
|
|
|
|
|
{
|
|
|
|
|
if (_nipMulticastGatewayConfigurationTransportSessions == null)
|
|
|
|
|
_nipMulticastGatewayConfigurationTransportSessions =
|
|
|
|
|
new Dictionary<DatabaseKeyNipMulticastGatewayConfigurationTransportSession,
|
|
|
|
|
MulticastGatewayConfigurationTransportSessionType>();
|
|
|
|
|
|
|
|
|
|
DatabaseKeyNipMulticastGatewayConfigurationTransportSession key =
|
|
|
|
|
new DatabaseKeyNipMulticastGatewayConfigurationTransportSession(carrier,
|
|
|
|
|
multicastGatewayConfigurationTransportSession.EndpointAddress[0]);
|
|
|
|
|
_nipMulticastGatewayConfigurationTransportSessions.Add(key, multicastGatewayConfigurationTransportSession);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void InsertDvbiServiceListEntryPoint(long sourceHash)
|
|
|
|
|
{
|
|
|
|
|
if (_dvbiServiceListEntryPointsCoordinates == null)
|
|
|
|
|
@ -1494,6 +1614,7 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
return HashCode.Combine(Hash);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private HashSet<DvbiServiceListEntryPointsCoordinate> _dvbiServiceListEntryPointsCoordinates;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1521,10 +1642,12 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Dictionary<string, DateTime> _dvbiServiceListLastChecked;
|
|
|
|
|
|
|
|
|
|
public void UpdateDvbiServiceListLastCheckedDate(string id, DateTime currentTime)
|
|
|
|
|
{
|
|
|
|
|
if (_dvbiServiceListLastChecked == null)
|
|
|
|
|
@ -1542,6 +1665,7 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
return coord.LastUpdate;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return DateTime.MinValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -1551,6 +1675,7 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Dictionary<long, List<string>> _dvbiServiceListEntryPointToServiceListMapping;
|
|
|
|
|
|
|
|
|
|
public void AddDvbiServiceListToServiceListEntryPoint(DvbiServiceList serviceList, long sourceHash)
|
|
|
|
|
{
|
|
|
|
|
if (_dvbiServiceListEntryPointToServiceListMapping == null)
|
|
|
|
|
@ -1564,6 +1689,7 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Dictionary<string, List<string>> _dvbiServiceToServiceListMapping;
|
|
|
|
|
|
|
|
|
|
public void AddDvbiServiceToServiceList(string id, string serviceListId)
|
|
|
|
|
{
|
|
|
|
|
if (_dvbiServiceToServiceListMapping == null)
|
|
|
|
|
@ -1585,10 +1711,12 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
return service.Version;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private HashSet<DvbIService> _dvbiServices;
|
|
|
|
|
|
|
|
|
|
public bool TestForDvbiService(string id)
|
|
|
|
|
{
|
|
|
|
|
if (_dvbiServices == null)
|
|
|
|
|
@ -1609,6 +1737,5 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|