diff --git a/DataTableStorages/skyscraper5.Data.MySql/MySqlDataStorage.cs b/DataTableStorages/skyscraper5.Data.MySql/MySqlDataStorage.cs index b577e08..81c05ec 100644 --- a/DataTableStorages/skyscraper5.Data.MySql/MySqlDataStorage.cs +++ b/DataTableStorages/skyscraper5.Data.MySql/MySqlDataStorage.cs @@ -399,6 +399,16 @@ namespace skyscraper5.Data.MySql throw new NotImplementedException(); } + public bool TestForRmt(Rmt rmt) + { + return true; + } + + public void InsertRmt(Rmt rmt) + { + throw new NotImplementedException(); + } + public IEnumerable> SelectAllPmt() { throw new NotImplementedException(); diff --git a/DataTableStorages/skyscraper5.Data.PostgreSql/PostgresqlDataStore.cs b/DataTableStorages/skyscraper5.Data.PostgreSql/PostgresqlDataStore.cs index 8cdbded..5cfa29f 100644 --- a/DataTableStorages/skyscraper5.Data.PostgreSql/PostgresqlDataStore.cs +++ b/DataTableStorages/skyscraper5.Data.PostgreSql/PostgresqlDataStore.cs @@ -6,6 +6,7 @@ using NpgsqlTypes; using skyscraper5.Dvb.Psi.Model; using skyscraper5.Dvb.TvAnytime; using skyscraper5.Skyscraper.Headless; +using skyscraper5.src.InteractionChannel.Model; using skyscraper5.src.InteractionChannel.Model2; using skyscraper8.DvbNip; using skyscraper8.InteractionChannel.Model2; @@ -256,6 +257,16 @@ namespace skyscraper5.Data.PostgreSql { throw new NotImplementedException(); } + + public bool TestForRmt(Rmt rmt) + { + return true; + } + + public void InsertRmt(Rmt rmt) + { + throw new NotImplementedException(); + } } } diff --git a/GUIs/skyscraper8.UI.ImGui/Forms/JobDisplay.cs b/GUIs/skyscraper8.UI.ImGui/Forms/JobDisplay.cs index 4422b5d..fcda517 100644 --- a/GUIs/skyscraper8.UI.ImGui/Forms/JobDisplay.cs +++ b/GUIs/skyscraper8.UI.ImGui/Forms/JobDisplay.cs @@ -28,10 +28,13 @@ using skyscraper5.Skyscraper.Equipment; using skyscraper5.Skyscraper.IO.CrazycatStreamReader; using skyscraper5.Skyscraper.Net; using skyscraper5.Skyscraper.Scraper; +using skyscraper5.src.InteractionChannel.Model; using skyscraper5.src.Skyscraper.FrequencyListGenerator; +using skyscraper5.T2MI.Packets; using skyscraper5.Teletext.Wss; using skyscraper8.DvbNip; using skyscraper8.DvbNip.UiIntegration; +using skyscraper8.DvbSis; using skyscraper8.GSE; using skyscraper8.GSE.GSE; using skyscraper8.Ietf.FLUTE; @@ -39,6 +42,7 @@ using skyscraper8.Ses; using skyscraper8.Skyscraper.Drawing; using skyscraper8.Skyscraper.FrequencyListGenerator; using skyscraper8.Skyscraper.Scraper; +using skyscraper8.T2MI.Packets; using testdrid.SdlWrapper; using Platform = skyscraper5.Dvb.DataBroadcasting.IntModel.Platform; @@ -2330,12 +2334,68 @@ namespace SDL2Demo.Forms public void OnDvbNipServiceList(NipActualCarrierInformation currentCarrierInformation, string serviceListId1, ServiceListType serviceListId2) { - throw new NotImplementedException(); + } public void NotifyTransportStreamId(int tsid, int nid) { - throw new NotImplementedException(); + + } + + public void OnDvbSisCat(int sourcePid, SisCatContainer catContainer) + { + + } + + public void OnDvbSisEit(int sourcePid, SisEitContainer eitContainer) + { + + } + + public void OnDvbSisFti(int relatedPid, _0xF0_FramingTimingInformation fti) + { + + } + + public void OnDvbSisTimestamp(int pid, _0x20_DvbT2Timestamp t2Timestamp) + { + + } + + public void OnDvbSisPat(int sourcePid, SisPatContainer patContainer) + { + + } + + public void OnDvbSisSdt(int sourcePid, SisSdtContainer sdtContainer) + { + + } + + public void OnDvbSisDsaci(ushort currentDsaGroupId, int versionNumber, byte sectionNumber, byte lastSectionNumber, + Stream dsaci) + { + + } + + public void OnDvbSisPmt(int sourcePid, SisPmtContainer pmtContainer) + { + + } + + public void OnDvbSisNit(int sourcePid, SisNitContainer nitContainer) + { + + } + + public void OnDvbSisTdt(int sourcePid, DateTime? utcTime) + { + + } + + public void OnRcs2Rmt(Rmt rmt) + { + } } } diff --git a/GUIs/skyscraper8.UI.ImGui/Jobs/InheritedBlindscanConfigWindow.cs b/GUIs/skyscraper8.UI.ImGui/Jobs/InheritedBlindscanConfigWindow.cs index f127de1..2609062 100644 --- a/GUIs/skyscraper8.UI.ImGui/Jobs/InheritedBlindscanConfigWindow.cs +++ b/GUIs/skyscraper8.UI.ImGui/Jobs/InheritedBlindscanConfigWindow.cs @@ -131,7 +131,7 @@ namespace SDL2Demo.Jobs bjc.TunerMetadata = tuners[settingsWindowBLScanTunerSelection]; bjc.Ui = new InheritedBlindscanUiJunction(); - bjc.Ui.Tasks = _taskQueue; + //bjc.Ui.Tasks = _taskQueue; return bjc; } diff --git a/GUIs/skyscraper8.UI.ImGui/Jobs/InheritedBlindscanUiJunction.cs b/GUIs/skyscraper8.UI.ImGui/Jobs/InheritedBlindscanUiJunction.cs index 0207cf9..a358cd7 100644 --- a/GUIs/skyscraper8.UI.ImGui/Jobs/InheritedBlindscanUiJunction.cs +++ b/GUIs/skyscraper8.UI.ImGui/Jobs/InheritedBlindscanUiJunction.cs @@ -36,13 +36,17 @@ using System.Xml.Serialization; using moe.yo3explorer.skyscraper8.DVBI.Model; using skyscraper5.Dvb.DataBroadcasting.IntModel; using skyscraper5.Dvb.SystemSoftwareUpdate.Model; +using skyscraper5.src.InteractionChannel.Model; +using skyscraper5.T2MI.Packets; using skyscraper8.DvbNip; using skyscraper8.DvbNip.UiIntegration; +using skyscraper8.DvbSis; using skyscraper8.GSE; using skyscraper8.GSE.GSE; using skyscraper8.Ietf.FLUTE; using skyscraper8.Ses; using skyscraper8.Skyscraper.Scraper; +using skyscraper8.T2MI.Packets; using testdrid.SdlWrapper; using static SDL2Demo.Jobs.Blindscan; using Platform = skyscraper5.Dvb.DataBroadcasting.IntModel.Platform; @@ -1823,112 +1827,168 @@ namespace SDL2Demo.Jobs public void NotifyNit(NitNetwork nitNetwork) { - throw new NotImplementedException(); + } public void EnableUiFeature(SkyscraperUiFeature bbframeAnalysis) { - throw new NotImplementedException(); + } public void OnIpMacNotification(int sourcePid, Platform platform, Target target, Operational operational) { - throw new NotImplementedException(); + } public void OnSsuNotification(UpdateNotificationGroup common, UpdateNotificationTarget target, ushort programNumber) { - throw new NotImplementedException(); + } public void OnBbframe(BBHeader bbHeader, byte[] payload) { - throw new NotImplementedException(); + } public void OnDetectionOfInnerTs(SkyscraperContext child, object identifier) { - throw new NotImplementedException(); + } public void NotifyGsePacket(ushort value, byte[] gseDataBytes, GseLabel label) { - throw new NotImplementedException(); + } public void OnDvbNipFileArrival(FluteUiHandle fuh) { - throw new NotImplementedException(); + } public void OnDvbNipMulticastGatewayConfiguration(NipActualCarrierInformation carrier, MulticastGatewayConfigurationType multicastGatewayConfiguration) { - throw new NotImplementedException(); + } public void OnDvbNipCarrierDetected(NipActualCarrierInformation currentCarrierInformation) { - throw new NotImplementedException(); + } public void OnDvbNipPrivateDataSignallingManifest(PrivateDataSignallingManifestType privateDataSignallingManifest) { - throw new NotImplementedException(); + } public void OnDvbNipServiceListEntryPoints(NipActualCarrierInformation currentCarrierInformation, ServiceListEntryPoints serviceListEntryPoints, DateTime dvbNipTime) { - throw new NotImplementedException(); + } public void OnDvbNipServiceList(NipActualCarrierInformation currentCarrierInformation, string serviceListId1, string serviceListId2) { - throw new NotImplementedException(); + } public void OnDvbNipTimeOffsetFile(NipActualCarrierInformation currentCarrierInformation, TimeOffsetFileType timeOffsetFile) { - throw new NotImplementedException(); + } public void OnDvbNipNetworkInformationFile(NipActualCarrierInformation currentCarrierInformation, NetworkInformationFileType networkInformationFile) { - throw new NotImplementedException(); + } public void DvbNipServiceInformation(NipActualCarrierInformation currentCarrierInformation, ServiceInformationFileType serviceInformationFile) { - throw new NotImplementedException(); + } public void OnDvbNipFileAnnouncement(FDTInstanceType flute) { - throw new NotImplementedException(); + } public void OnAstraSgtList(SgtList list) { - throw new NotImplementedException(); + } public void OnAstraSgtService(SgtService child) { - throw new NotImplementedException(); + } public void OnDvbNipServiceList(NipActualCarrierInformation currentCarrierInformation, string serviceListId1, ServiceListType serviceListId2) { - throw new NotImplementedException(); + } public void NotifyTransportStreamId(int tsid, int nid) { - throw new NotImplementedException(); + + } + + public void OnDvbSisCat(int sourcePid, SisCatContainer catContainer) + { + + } + + public void OnDvbSisEit(int sourcePid, SisEitContainer eitContainer) + { + + } + + public void OnDvbSisFti(int relatedPid, _0xF0_FramingTimingInformation fti) + { + + } + + public void OnDvbSisTimestamp(int pid, _0x20_DvbT2Timestamp t2Timestamp) + { + + } + + public void OnDvbSisPat(int sourcePid, SisPatContainer patContainer) + { + + } + + public void OnDvbSisSdt(int sourcePid, SisSdtContainer sdtContainer) + { + + } + + public void OnDvbSisDsaci(ushort currentDsaGroupId, int versionNumber, byte sectionNumber, byte lastSectionNumber, + Stream dsaci) + { + + } + + public void OnDvbSisPmt(int sourcePid, SisPmtContainer pmtContainer) + { + + } + + public void OnDvbSisNit(int sourcePid, SisNitContainer nitContainer) + { + + } + + public void OnDvbSisTdt(int sourcePid, DateTime? utcTime) + { + + } + + public void OnRcs2Rmt(Rmt rmt) + { + } public TaskQueue Tasks { get; set; } diff --git a/skyscraper8.Tests/ResourceTests/NtbuDoabiliyTest.cs b/skyscraper8.Tests/ResourceTests/NtbuDoabiliyTest.cs new file mode 100644 index 0000000..b7806eb --- /dev/null +++ b/skyscraper8.Tests/ResourceTests/NtbuDoabiliyTest.cs @@ -0,0 +1,36 @@ +using System.IO; +using System.Net.NetworkInformation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using skyscraper5.Skyscraper.IO; + +namespace skyscraper8.Tests.ResourceTests; + +[TestClass] +public class NtbuDoability +{ + [TestMethod] + public void DecodeUnifiInform() + { + byte[] bytes = Resources1.ubnt; + MemoryStream stream = new MemoryStream(bytes,false); + if (stream.ReadUInt32BE() != 1414414933u) + Assert.Fail(); + + if (stream.ReadUInt32BE() != 0) + Assert.Fail(); + + PhysicalAddress apMac = new PhysicalAddress(stream.ReadBytes(6)); + ushort flags = stream.ReadUInt16BE(); + + bool encrypted = (flags & 0x0001) != 0; + bool zlib = (flags & 0x0002) != 0; + bool snappy = (flags & 0x0004) != 0; + bool aesGcm = (flags & 0x0008) != 0; + + byte[] iv = stream.ReadBytes(16); + + uint dataVersion = stream.ReadUInt32BE(); + uint payloadLength = stream.ReadUInt32BE(); + byte[] payload = stream.ReadBytes(payloadLength); + } +} diff --git a/skyscraper8.Tests/Resources1.Designer.cs b/skyscraper8.Tests/Resources1.Designer.cs index 8910987..750dc61 100644 --- a/skyscraper8.Tests/Resources1.Designer.cs +++ b/skyscraper8.Tests/Resources1.Designer.cs @@ -149,5 +149,12 @@ namespace skyscraper8.Tests { return ((byte[])(obj)); } } + + internal static byte[] ubnt { + get { + object obj = ResourceManager.GetObject("ubnt", resourceCulture); + return ((byte[])(obj)); + } + } } } diff --git a/skyscraper8.Tests/Resources1.resx b/skyscraper8.Tests/Resources1.resx index 7aca4aa..2a9ee3f 100644 --- a/skyscraper8.Tests/Resources1.resx +++ b/skyscraper8.Tests/Resources1.resx @@ -163,4 +163,7 @@ Resources\Frame00000357_TSGS1_MIS000_SYNC184.bbframe;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Resources\ubnt.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + diff --git a/skyscraper8.sln b/skyscraper8.sln index fcb92b9..6910010 100644 --- a/skyscraper8.sln +++ b/skyscraper8.sln @@ -78,91 +78,69 @@ Global {8DAAE3A2-72EA-4908-8F62-911D293043E8}.Release|Any CPU.ActiveCfg = Release|Any CPU {8DAAE3A2-72EA-4908-8F62-911D293043E8}.Release|Any CPU.Build.0 = Release|Any CPU {E52A1723-7193-EC3C-7371-01A3BB58E0EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E52A1723-7193-EC3C-7371-01A3BB58E0EA}.Debug|Any CPU.Build.0 = Debug|Any CPU {E52A1723-7193-EC3C-7371-01A3BB58E0EA}.Release|Any CPU.ActiveCfg = Release|Any CPU {E52A1723-7193-EC3C-7371-01A3BB58E0EA}.Release|Any CPU.Build.0 = Release|Any CPU {1015ACF1-E812-5410-66A5-E92DE682D2C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1015ACF1-E812-5410-66A5-E92DE682D2C6}.Debug|Any CPU.Build.0 = Debug|Any CPU {1015ACF1-E812-5410-66A5-E92DE682D2C6}.Release|Any CPU.ActiveCfg = Release|Any CPU {1015ACF1-E812-5410-66A5-E92DE682D2C6}.Release|Any CPU.Build.0 = Release|Any CPU {C4262F19-0648-A1A1-3D62-748A45BC5329}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C4262F19-0648-A1A1-3D62-748A45BC5329}.Debug|Any CPU.Build.0 = Debug|Any CPU {C4262F19-0648-A1A1-3D62-748A45BC5329}.Release|Any CPU.ActiveCfg = Release|Any CPU {C4262F19-0648-A1A1-3D62-748A45BC5329}.Release|Any CPU.Build.0 = Release|Any CPU {1B8696DA-8A81-8F1F-9463-49C727959EDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1B8696DA-8A81-8F1F-9463-49C727959EDA}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B8696DA-8A81-8F1F-9463-49C727959EDA}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B8696DA-8A81-8F1F-9463-49C727959EDA}.Release|Any CPU.Build.0 = Release|Any CPU {68EB7299-FC65-654E-B972-D79514B91BAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {68EB7299-FC65-654E-B972-D79514B91BAD}.Debug|Any CPU.Build.0 = Debug|Any CPU {68EB7299-FC65-654E-B972-D79514B91BAD}.Release|Any CPU.ActiveCfg = Release|Any CPU {68EB7299-FC65-654E-B972-D79514B91BAD}.Release|Any CPU.Build.0 = Release|Any CPU {60F519BA-49C0-7C7B-E26F-E4313A9B1697}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {60F519BA-49C0-7C7B-E26F-E4313A9B1697}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F519BA-49C0-7C7B-E26F-E4313A9B1697}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F519BA-49C0-7C7B-E26F-E4313A9B1697}.Release|Any CPU.Build.0 = Release|Any CPU {71CFF3DD-4F6C-3A21-B2C3-2F3A59D4FB4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {71CFF3DD-4F6C-3A21-B2C3-2F3A59D4FB4A}.Debug|Any CPU.Build.0 = Debug|Any CPU {71CFF3DD-4F6C-3A21-B2C3-2F3A59D4FB4A}.Release|Any CPU.ActiveCfg = Release|Any CPU {71CFF3DD-4F6C-3A21-B2C3-2F3A59D4FB4A}.Release|Any CPU.Build.0 = Release|Any CPU {AD0F65A7-3257-BB3B-46F5-C16BFDF9DBCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AD0F65A7-3257-BB3B-46F5-C16BFDF9DBCC}.Debug|Any CPU.Build.0 = Debug|Any CPU {AD0F65A7-3257-BB3B-46F5-C16BFDF9DBCC}.Release|Any CPU.ActiveCfg = Release|Any CPU {AD0F65A7-3257-BB3B-46F5-C16BFDF9DBCC}.Release|Any CPU.Build.0 = Release|Any CPU {868A7453-E1B7-A619-F447-41E42420405C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {868A7453-E1B7-A619-F447-41E42420405C}.Debug|Any CPU.Build.0 = Debug|Any CPU {868A7453-E1B7-A619-F447-41E42420405C}.Release|Any CPU.ActiveCfg = Release|Any CPU {868A7453-E1B7-A619-F447-41E42420405C}.Release|Any CPU.Build.0 = Release|Any CPU {2296DA0C-AD28-DB06-1984-13B4AE5DE61D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2296DA0C-AD28-DB06-1984-13B4AE5DE61D}.Debug|Any CPU.Build.0 = Debug|Any CPU {2296DA0C-AD28-DB06-1984-13B4AE5DE61D}.Release|Any CPU.ActiveCfg = Release|Any CPU {2296DA0C-AD28-DB06-1984-13B4AE5DE61D}.Release|Any CPU.Build.0 = Release|Any CPU {96D43A77-C1DA-16EF-2084-BA939C0BEB4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {96D43A77-C1DA-16EF-2084-BA939C0BEB4D}.Debug|Any CPU.Build.0 = Debug|Any CPU {96D43A77-C1DA-16EF-2084-BA939C0BEB4D}.Release|Any CPU.ActiveCfg = Release|Any CPU {96D43A77-C1DA-16EF-2084-BA939C0BEB4D}.Release|Any CPU.Build.0 = Release|Any CPU {17C2E095-B952-8919-2C68-F2EAA7A601C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {17C2E095-B952-8919-2C68-F2EAA7A601C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {17C2E095-B952-8919-2C68-F2EAA7A601C3}.Release|Any CPU.ActiveCfg = Release|Any CPU {17C2E095-B952-8919-2C68-F2EAA7A601C3}.Release|Any CPU.Build.0 = Release|Any CPU {07214423-32B2-DDE8-8D38-511D55ADC206}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {07214423-32B2-DDE8-8D38-511D55ADC206}.Debug|Any CPU.Build.0 = Debug|Any CPU {07214423-32B2-DDE8-8D38-511D55ADC206}.Release|Any CPU.ActiveCfg = Release|Any CPU {07214423-32B2-DDE8-8D38-511D55ADC206}.Release|Any CPU.Build.0 = Release|Any CPU {0E4C7079-228A-B94C-379A-8A14B08BAB34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0E4C7079-228A-B94C-379A-8A14B08BAB34}.Debug|Any CPU.Build.0 = Debug|Any CPU {0E4C7079-228A-B94C-379A-8A14B08BAB34}.Release|Any CPU.ActiveCfg = Release|Any CPU {0E4C7079-228A-B94C-379A-8A14B08BAB34}.Release|Any CPU.Build.0 = Release|Any CPU {3B52C24E-58E2-F982-F9B7-B9E7465B82A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3B52C24E-58E2-F982-F9B7-B9E7465B82A2}.Debug|Any CPU.Build.0 = Debug|Any CPU {3B52C24E-58E2-F982-F9B7-B9E7465B82A2}.Release|Any CPU.ActiveCfg = Release|Any CPU {3B52C24E-58E2-F982-F9B7-B9E7465B82A2}.Release|Any CPU.Build.0 = Release|Any CPU {8F17668C-623C-F9B3-EAD4-2922E5414B75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8F17668C-623C-F9B3-EAD4-2922E5414B75}.Debug|Any CPU.Build.0 = Debug|Any CPU {8F17668C-623C-F9B3-EAD4-2922E5414B75}.Release|Any CPU.ActiveCfg = Release|Any CPU {8F17668C-623C-F9B3-EAD4-2922E5414B75}.Release|Any CPU.Build.0 = Release|Any CPU {46CACA1C-F9B2-2FE0-2068-716F381325E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {46CACA1C-F9B2-2FE0-2068-716F381325E9}.Debug|Any CPU.Build.0 = Debug|Any CPU {46CACA1C-F9B2-2FE0-2068-716F381325E9}.Release|Any CPU.ActiveCfg = Release|Any CPU {46CACA1C-F9B2-2FE0-2068-716F381325E9}.Release|Any CPU.Build.0 = Release|Any CPU {BDBDB7A9-D0A4-9B89-0801-2935B2066551}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BDBDB7A9-D0A4-9B89-0801-2935B2066551}.Debug|Any CPU.Build.0 = Debug|Any CPU {BDBDB7A9-D0A4-9B89-0801-2935B2066551}.Release|Any CPU.ActiveCfg = Release|Any CPU {BDBDB7A9-D0A4-9B89-0801-2935B2066551}.Release|Any CPU.Build.0 = Release|Any CPU {CF21D250-9804-4191-89F5-95821E3AF39D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CF21D250-9804-4191-89F5-95821E3AF39D}.Debug|Any CPU.Build.0 = Debug|Any CPU {CF21D250-9804-4191-89F5-95821E3AF39D}.Release|Any CPU.ActiveCfg = Release|Any CPU {CF21D250-9804-4191-89F5-95821E3AF39D}.Release|Any CPU.Build.0 = Release|Any CPU {EBB6B1CF-2597-4962-AA31-2B42B4C28C7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EBB6B1CF-2597-4962-AA31-2B42B4C28C7D}.Debug|Any CPU.Build.0 = Debug|Any CPU {EBB6B1CF-2597-4962-AA31-2B42B4C28C7D}.Release|Any CPU.ActiveCfg = Release|Any CPU {EBB6B1CF-2597-4962-AA31-2B42B4C28C7D}.Release|Any CPU.Build.0 = Release|Any CPU {839C3783-020F-77D6-C22C-D50DCC97CDD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {839C3783-020F-77D6-C22C-D50DCC97CDD6}.Debug|Any CPU.Build.0 = Debug|Any CPU {839C3783-020F-77D6-C22C-D50DCC97CDD6}.Release|Any CPU.ActiveCfg = Release|Any CPU {839C3783-020F-77D6-C22C-D50DCC97CDD6}.Release|Any CPU.Build.0 = Release|Any CPU {1A29F6E6-4B6A-DCCD-1DF1-AA8D020E17D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1A29F6E6-4B6A-DCCD-1DF1-AA8D020E17D2}.Debug|Any CPU.Build.0 = Debug|Any CPU {1A29F6E6-4B6A-DCCD-1DF1-AA8D020E17D2}.Release|Any CPU.ActiveCfg = Release|Any CPU {1A29F6E6-4B6A-DCCD-1DF1-AA8D020E17D2}.Release|Any CPU.Build.0 = Release|Any CPU {84EE9FCD-2C7F-DF84-C1BA-99D018CE9412}.Debug|Any CPU.ActiveCfg = Debug|Any CPU diff --git a/skyscraper8.sln.DotSettings.user b/skyscraper8.sln.DotSettings.user index 7f44235..5df9636 100644 --- a/skyscraper8.sln.DotSettings.user +++ b/skyscraper8.sln.DotSettings.user @@ -28,6 +28,7 @@ ForceIncluded ForceIncluded ForceIncluded + ForceIncluded ForceIncluded ForceIncluded ForceIncluded @@ -59,9 +60,11 @@ <data><HostParameters type="LocalHostParameters" /><Argument type="StandaloneArgument"><Arguments IsNull="False"></Arguments><FileName IsNull="False"></FileName><WorkingDirectory IsNull="False"></WorkingDirectory><Scope><ProcessFilters /></Scope></Argument><Info type="TimelineInfo" /><CoreOptions type="CoreOptions"><CoreTempPath IsNull="False"></CoreTempPath><RemoteEndPoint IsNull="False"></RemoteEndPoint><AdditionalEnvironmentVariables /></CoreOptions><HostOptions type="HostOptions"><HostTempPath IsNull="False"></HostTempPath></HostOptions></data> + False True True False + True True diff --git a/skyscraper8/ReutersWne/ReutersWneExtractor.cs b/skyscraper8/ReutersWne/ReutersWneExtractor.cs new file mode 100644 index 0000000..2aca3be --- /dev/null +++ b/skyscraper8/ReutersWne/ReutersWneExtractor.cs @@ -0,0 +1,61 @@ +using skyscraper5.Ietf.Rfc971; +using skyscraper5.Skyscraper.Plugins; + +namespace skyscraper8.ReutersWne; + +[SkyscraperPlugin] +public class ReutersWneExtractor : ISkyscraperMpePlugin +{ + public void ConnectToStorage(object[] connector) + { + //TODO: connect to stroage plugins + } + + public void SetContext(DateTime? currentTime, object skyscraperContext) + { + //TODO: remember current time and skyscraper context + } + + public bool CanHandlePacket(InternetHeader internetHeader, byte[] ipv4Packet) + { + if (internetHeader.Protocol != 0x11) //Reuters WNE is UDP only + return false; + if (ipv4Packet[8] != 0) //First opcode byte is always "0" + return false; + + //These bytes are according to the "WNE - RX8200 Configuration.pdf", page 11 + byte[] addressBytes = internetHeader.DestinationAddress.GetAddressBytes(); + if (addressBytes[0] != 224) + return false; + if (addressBytes[1] != 14) + return false; + if (addressBytes[2] != 14) + return false; + if (addressBytes[3] > 16) //Should be 14 or 15 + return false; + + return true; + } + + public void HandlePacket(InternetHeader internetHeader, byte[] ipv4Packet) + { + Span udpPayload = new Span(ipv4Packet,8,ipv4Packet.Length-8); + + byte byte0 = udpPayload[0]; + if (byte0 != 0x00) + return; + + byte opcodeL = udpPayload[1]; + byte unkn1 = udpPayload[2]; + byte opcodeR = udpPayload[3]; + uint session = udpPayload.ReadUInt32BigEndian(4); + + + //throw new NotImplementedException(); + } + + public bool StopProcessingAfterThis() + { + return true; + } +} diff --git a/skyscraper8/Skyscraper/Scraper/SkyscraperContext.cs b/skyscraper8/Skyscraper/Scraper/SkyscraperContext.cs index 85645f0..90b5adc 100644 --- a/skyscraper8/Skyscraper/Scraper/SkyscraperContext.cs +++ b/skyscraper8/Skyscraper/Scraper/SkyscraperContext.cs @@ -1273,6 +1273,20 @@ namespace skyscraper5.Skyscraper.Scraper public void OnSdtService(ushort transportStreamId, ushort originalNetworkId, SdtService sdtService) { + if (originalNetworkId == 1) + { + if (transportStreamId == 1) + { + if (!DvbContext.IsPidProcessorPresent(0x0dde)) + { + if (sdtService.ServiceName.Equals("REUTERS WNE")) + { + logger.InfoFormat("Found REUTERS WNE, registering PID 0x0dde"); + DvbContext.RegisterPacketProcessor(0x0dde, new PsiDecoder(0xdde,new MultiprotocolEncapsulationDecoder(this))); + } + } + } + } if (DataStorage.TestForSdtService(transportStreamId, originalNetworkId, sdtService)) { if (!IsChild) diff --git a/skyscraper8/Skyscraper/SpanByteExtensions.cs b/skyscraper8/Skyscraper/SpanByteExtensions.cs new file mode 100644 index 0000000..459ee6e --- /dev/null +++ b/skyscraper8/Skyscraper/SpanByteExtensions.cs @@ -0,0 +1,34 @@ +using System; + +public static class SpanByteExtensions +{ + public static uint ReadUInt32LittleEndian(this ReadOnlySpan span, int offset) + { + if ((uint)offset > (uint)(span.Length - 4)) + throw new ArgumentOutOfRangeException(nameof(offset)); + + return (uint)( + span[offset] | + (span[offset + 1] << 8) | + (span[offset + 2] << 16) | + (span[offset + 3] << 24)); + } + + public static uint ReadUInt32BigEndian(this ReadOnlySpan span, int offset) + { + if ((uint)offset > (uint)(span.Length - 4)) + throw new ArgumentOutOfRangeException(nameof(offset)); + + return (uint)( + (span[offset] << 24) | + (span[offset + 1] << 16) | + (span[offset + 2] << 8) | + span[offset + 3]); + } + + public static uint ReadUInt32LittleEndian(this Span span, int offset) + => ReadUInt32LittleEndian((ReadOnlySpan)span, offset); + + public static uint ReadUInt32BigEndian(this Span span, int offset) + => ReadUInt32BigEndian((ReadOnlySpan)span, offset); +} diff --git a/skyscraper8/bin/Debug/skyscraper5.ini b/skyscraper8/bin/Debug/skyscraper5.ini deleted file mode 100644 index f8efa58..0000000 --- a/skyscraper8/bin/Debug/skyscraper5.ini +++ /dev/null @@ -1,23 +0,0 @@ -[startup] -dataStorage=3 -objectStorage=1 - -[plugins] -postgresql=C:\devel\skyscraper8\DataTableStorages\skyscraper5.Data.PostgreSql\bin\Debug\net8.0\skyscraper5.Data.PostgreSql.dll -minio=C:\devel\skyscraper8\BlobStorages\skyscraper5.Data.Minio\bin\Debug\net8.0\skyscraper5.Data.Minio.dll -epgcollector=C:\devel\skyscraper8\PrivateDataSpecifiers\skyscraper8.EPGCollectorPort\bin\Debug\net8.0\skyscraper8.EPGCollectorPort.dll -dns=C:\devel\skyscraper8\MpePlugins\skyscraper5.DNS\bin\Debug\net8.0\skyscraper5.DNS.dll - -[objectStorage1] -Bucket=skyscraper5 -Secure=0 -SecretKey=12345678 -AccessKey=feyris-tan -Endpoint=172.20.20.3:9000 - -[dataStorage3] -Username=ft -Port=5432 -Password=welcometotheworld -Host=172.20.20.17 -Database=skyscraper5 \ No newline at end of file