Compare commits
No commits in common. "master" and "bbframes-revisited2" have entirely different histories.
master
...
bbframes-r
@ -33,8 +33,7 @@ jobs:
|
||||
uses: akkuman/gitea-release-action@v1
|
||||
with:
|
||||
name: ${{ gitea.sha }}
|
||||
md5sum: false
|
||||
sha256sum: false
|
||||
tag_name: release_tag
|
||||
md5sum: true
|
||||
sha256sum: true
|
||||
files: |-
|
||||
${{ gitea.workspace }}/skyscraper8-${{ gitea.sha }}.zip
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@ -130,7 +130,3 @@ imgui.ini
|
||||
/skyscraper8.Manual/skyscraper8.Manual.pdf
|
||||
/skyscraper8.Manual/skyscraper8.Manual.synctex.gz
|
||||
/.vs/skyscraper8/CopilotIndices/17.14.1231.31060
|
||||
/.vs/skyscraper8/CopilotIndices/17.14.1290.42047
|
||||
/Documentation/TSDuck-Samples/experiment2/*.ts
|
||||
/.vs/skyscraper8/CopilotIndices/17.14.1431.25910
|
||||
/.vs
|
||||
|
||||
@ -514,18 +514,6 @@ namespace skyscraper5.Data
|
||||
string filename = String.Format("/SSDP/{0}.xml", ssdpDevice.UniqueServiceName.SanitizeFileName());
|
||||
byte[] bytes = GetObject(filename);
|
||||
return bytes;
|
||||
}
|
||||
|
||||
public bool TestForSisDsaci(int value1, int value2, ushort groupId, int versionNumber)
|
||||
{
|
||||
string filename = String.Format("DVB-SIS/{0}/{1}/Group{2}_Version{3}.xml");
|
||||
return FileExists(filename);
|
||||
}
|
||||
|
||||
public void StoreSisDsaci(int value1, int value2, ushort currentDsaGroupId, int versionNumber, Stream dsaci)
|
||||
{
|
||||
string filename = String.Format("DVB-SIS/{0}/{1}/Group{2}_Version{3}.xml");
|
||||
WriteObject(filename, dsaci);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Minio" Version="6.0.4" />
|
||||
<PackageReference Include="Minio" Version="6.0.5" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@ -18,13 +18,9 @@ using skyscraper5.Skyscraper.IO.CrazycatStreamReader;
|
||||
using skyscraper5.Skyscraper.Scraper.Storage.Utilities;
|
||||
using skyscraper5.src.InteractionChannel.Model.Descriptors;
|
||||
using skyscraper5.src.InteractionChannel.Model;
|
||||
using skyscraper5.src.InteractionChannel.Model2;
|
||||
using skyscraper5.src.Skyscraper.FrequencyListGenerator;
|
||||
using skyscraper5.src.Skyscraper.Scraper.Dns;
|
||||
using skyscraper5.Teletext;
|
||||
using skyscraper8.InteractionChannel.Model;
|
||||
using skyscraper8.InteractionChannel.Model2;
|
||||
using skyscraper8.InteractionChannel.Model2.Descriptors;
|
||||
using skyscraper8.Skyscraper.Scraper.Storage;
|
||||
|
||||
namespace skyscraper5.Data.MySql
|
||||
@ -107,12 +103,12 @@ namespace skyscraper5.Data.MySql
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void UiSatellitesAdd(SatellitePositionEntity newPosition)
|
||||
public void UiSatellitesAdd(SatellitePosition newPosition)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void UiSatellitesDelete(SatellitePositionEntity satellitePosition)
|
||||
public void UiSatellitesDelete(SatellitePosition satellitePosition)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
@ -233,22 +229,22 @@ namespace skyscraper5.Data.MySql
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public List<LnbEntity> UiLnbTypesListAll()
|
||||
public List<LnbType> UiLnbTypesListAll()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void UiLnbTypesAdd(LnbEntity defaultLnbType)
|
||||
public void UiLnbTypesAdd(LnbType defaultLnbType)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public List<DishEntity> UiDishTypesListAll()
|
||||
public List<DishType> UiDishTypesListAll()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void UiDishTypesAdd(DishEntity defaultDishType)
|
||||
public void UiDishTypesAdd(DishType defaultDishType)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
@ -263,142 +259,6 @@ namespace skyscraper5.Data.MySql
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TestForTerminalBurstTimePlan2(ushort interactiveNetworkId, byte tbtp2GroupId, byte frameFrameNumber)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void StoreTerminalBurstTimePlan2(ushort interactiveNetworkId, byte tbtp2GroupId, Tbtp2.Frame frame)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TestForFrameComposition2(ushort networkId, Fct2.Frame fct2)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void InsertFct2Frame(ushort networkId, Fct2.Frame frame)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TestForBroadcastConfiguration(ushort networkId, byte txTypeTxType)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void InsertBroadcastConfiguration(ushort networkId, Bct.BroadcastConfiguration txType)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TestForRcs2Nit(RcsNit nit)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void InsertRcs2Nit(RcsNit nit)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool UpdateRcs2Tdt(ushort interactiveNetworkId, DateTime tdtTimestamp)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TestForTmst2(ushort interactiveNetworkId, Tmst2.TransmissionMode mode)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void InsertTmst2(ushort interactiveNetworkId, Tmst2.TransmissionMode mode)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TestForTimFramePayloadFormat(ushort networkId, _0xb7_FramePayloadFormatDescriptor.TransmissionContext transmissionContext)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void InsertTimFramePayloadFormat(ushort networkId, _0xb7_FramePayloadFormatDescriptor.TransmissionContext transmissionContext)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TestForTimCorrectionMessageExtension(PhysicalAddress macAddress)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void InsertTimCorrectionMessageExtension(PhysicalAddress macAddress,
|
||||
_0xb1_CorrectionMessageExtensionDescriptor descriptor)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TestForTimControlAssignment(PhysicalAddress macAddress)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void InsertTimControlAssignment(PhysicalAddress macAddress, _0xa4_SyncAssignDescriptor descriptor)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TestForTimSatelliteReturnLink(PhysicalAddress macAddress)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void InsertTimSatelliteReturnLink(PhysicalAddress macAddress, _0xa9_SatelliteReturnLinkDescriptor descriptor)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TestForLowerLayerService(PhysicalAddress macAddress)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void InsertTimLowerLayerService(PhysicalAddress macAddress, _0xbb_LowerLayerServiceDescriptor descriptor)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TestForHigherLayerServiceInitalization(PhysicalAddress macAddress, _0xc4_HigherLayersInitializeDescriptor.Layer2Interface layer2Interface)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void InsertHigherLayerServiceInitalization(PhysicalAddress macAddress, _0xc4_HigherLayersInitializeDescriptor.Layer2Interface layer2Interface)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TestForTimLogonResponse(PhysicalAddress macAddress)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void InsertTimLogonResponse(PhysicalAddress macAddress, _0xb9_LogonResponseDescriptor descriptor)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TestForTimForwardInteractionPath(PhysicalAddress macAddress, _0xad_ForwardInteractionPathDescriptor.ForwardInteractionPath forwardInteractionPath)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void InsertTimForwardInteractionPath(PhysicalAddress macAddress, _0xad_ForwardInteractionPathDescriptor.ForwardInteractionPath forwardInteractionPath)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public IEnumerable<Tuple<int, int, ProgramMapping>> SelectAllPmt()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
|
||||
@ -50,9 +50,9 @@ namespace skyscraper5.Data.MySql
|
||||
}
|
||||
|
||||
|
||||
public List<SatellitePositionEntity> UiSatellitesListAll()
|
||||
public List<SatellitePosition> UiSatellitesListAll()
|
||||
{
|
||||
List<SatellitePositionEntity> result = new List<SatellitePositionEntity>();
|
||||
List<SatellitePosition> result = new List<SatellitePosition>();
|
||||
using (MySqlConnection connection = new MySqlConnection(_mcsb.ToString()))
|
||||
{
|
||||
connection.Open();
|
||||
@ -62,9 +62,9 @@ namespace skyscraper5.Data.MySql
|
||||
MySqlDataReader dataReader = command.ExecuteReader();
|
||||
while (dataReader.Read())
|
||||
{
|
||||
SatellitePositionEntity satellitePosition = new SatellitePositionEntity();
|
||||
SatellitePosition satellitePosition = new SatellitePosition();
|
||||
satellitePosition.angle = dataReader.GetFloat(2);
|
||||
//satellitePosition.cardinalDirection = dataReader.GetBoolean(3) ? 0 : 1;
|
||||
satellitePosition.cardinalDirection = dataReader.GetBoolean(3) ? 0 : 1;
|
||||
satellitePosition.name = dataReader.GetString(4);
|
||||
result.Add(satellitePosition);
|
||||
}
|
||||
|
||||
@ -328,7 +328,7 @@ namespace skyscraper5.Data.PostgreSql
|
||||
string note = null;
|
||||
if (!dataReader.IsDBNull(15))
|
||||
note = dataReader.GetString(15);
|
||||
result = new DbBlindscanJob(uuid, tuner_mac, (STD_TYPE)tuner_std, diseqc_index, new DummyGpsReceiver(true,(float)gps_lat,(float)gps_lon), SatellitePositionEntity.FromChecksum(sat_position));
|
||||
result = new DbBlindscanJob(uuid, tuner_mac, (STD_TYPE)tuner_std, diseqc_index, new DummyGpsReceiver(true,(float)gps_lat,(float)gps_lon), SatellitePosition.FromChecksum(sat_position));
|
||||
result.DateAdded = date_added;
|
||||
result.HorizontalHighState = (DbBlindscanJobPolarizationStatus)horizontal_high;
|
||||
result.HorizontalLowState = (DbBlindscanJobPolarizationStatus)horizontal_low;
|
||||
@ -546,11 +546,11 @@ namespace skyscraper5.Data.PostgreSql
|
||||
dgr = new DummyGpsReceiver(true, gpsLat, gpsLon);
|
||||
}
|
||||
|
||||
SatellitePositionEntity satPositionObj = null;
|
||||
SatellitePosition satPositionObj = null;
|
||||
if (!dataReader.IsDBNull("sat_position"))
|
||||
{
|
||||
int satPosition = dataReader.GetInt32("sat_position");
|
||||
satPositionObj = SatellitePositionEntity.FromChecksum(satPosition);
|
||||
satPositionObj = SatellitePosition.FromChecksum(satPosition);
|
||||
}
|
||||
int diseqcIndex = dataReader.GetInt32("diseqc_index");
|
||||
int version = dataReader.GetInt32("version");
|
||||
|
||||
@ -2,17 +2,13 @@
|
||||
using Npgsql;
|
||||
using skyscraper5.src.InteractionChannel.Model;
|
||||
using skyscraper5.src.InteractionChannel.Model.Descriptors;
|
||||
using skyscraper5.src.InteractionChannel.Model2;
|
||||
using skyscraper5.src.Skyscraper.Scraper.Storage.Utilities;
|
||||
using skyscraper8.InteractionChannel.Model2;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Security.Cryptography;
|
||||
using skyscraper8.InteractionChannel.Model;
|
||||
using skyscraper8.InteractionChannel.Model2.Descriptors;
|
||||
|
||||
namespace skyscraper5.Data.PostgreSql
|
||||
{
|
||||
@ -951,112 +947,6 @@ namespace skyscraper5.Data.PostgreSql
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TestForRcs2Nit(RcsNit nit)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void InsertRcs2Nit(RcsNit nit)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool UpdateRcs2Tdt(ushort interactiveNetworkId, DateTime tdtTimestamp)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TestForTmst2(ushort interactiveNetworkId, Tmst2.TransmissionMode mode)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void InsertTmst2(ushort interactiveNetworkId, Tmst2.TransmissionMode mode)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TestForTimFramePayloadFormat(ushort networkId, _0xb7_FramePayloadFormatDescriptor.TransmissionContext transmissionContext)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void InsertTimFramePayloadFormat(ushort networkId, _0xb7_FramePayloadFormatDescriptor.TransmissionContext transmissionContext)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TestForTimCorrectionMessageExtension(PhysicalAddress macAddress)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void InsertTimCorrectionMessageExtension(PhysicalAddress macAddress,
|
||||
_0xb1_CorrectionMessageExtensionDescriptor descriptor)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TestForTimControlAssignment(PhysicalAddress macAddress)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void InsertTimControlAssignment(PhysicalAddress macAddress, _0xa4_SyncAssignDescriptor descriptor)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TestForTimSatelliteReturnLink(PhysicalAddress macAddress)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void InsertTimSatelliteReturnLink(PhysicalAddress macAddress, _0xa9_SatelliteReturnLinkDescriptor descriptor)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TestForLowerLayerService(PhysicalAddress macAddress)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void InsertTimLowerLayerService(PhysicalAddress macAddress, _0xbb_LowerLayerServiceDescriptor descriptor)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TestForHigherLayerServiceInitalization(PhysicalAddress macAddress, _0xc4_HigherLayersInitializeDescriptor.Layer2Interface layer2Interface)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void InsertHigherLayerServiceInitalization(PhysicalAddress macAddress, _0xc4_HigherLayersInitializeDescriptor.Layer2Interface layer2Interface)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TestForTimLogonResponse(PhysicalAddress macAddress)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void InsertTimLogonResponse(PhysicalAddress macAddress, _0xb9_LogonResponseDescriptor descriptor)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TestForTimForwardInteractionPath(PhysicalAddress macAddress, _0xad_ForwardInteractionPathDescriptor.ForwardInteractionPath forwardInteractionPath)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void InsertTimForwardInteractionPath(PhysicalAddress macAddress, _0xad_ForwardInteractionPathDescriptor.ForwardInteractionPath forwardInteractionPath)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
private bool AreArraysEqual(byte[] l, byte[] r)
|
||||
{
|
||||
if (l.Length != r.Length)
|
||||
@ -1079,7 +969,5 @@ namespace skyscraper5.Data.PostgreSql
|
||||
command.Parameters.AddWithValue("@nid", NpgsqlTypes.NpgsqlDbType.Integer, (int)coordinate.Item1);
|
||||
command.ExecuteNonQuery();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,9 +6,7 @@ using NpgsqlTypes;
|
||||
using skyscraper5.Dvb.Psi.Model;
|
||||
using skyscraper5.Dvb.TvAnytime;
|
||||
using skyscraper5.Skyscraper.Headless;
|
||||
using skyscraper5.src.InteractionChannel.Model2;
|
||||
using skyscraper8.DvbNip;
|
||||
using skyscraper8.InteractionChannel.Model2;
|
||||
using skyscraper8.Skyscraper.Scraper.Storage;
|
||||
|
||||
namespace skyscraper5.Data.PostgreSql
|
||||
@ -226,36 +224,6 @@ namespace skyscraper5.Data.PostgreSql
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public bool TestForTerminalBurstTimePlan2(ushort interactiveNetworkId, byte tbtp2GroupId, byte frameFrameNumber)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void StoreTerminalBurstTimePlan2(ushort interactiveNetworkId, byte tbtp2GroupId, Tbtp2.Frame frame)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TestForFrameComposition2(ushort networkId, Fct2.Frame fct2)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void InsertFct2Frame(ushort networkId, Fct2.Frame frame)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TestForBroadcastConfiguration(ushort networkId, byte txTypeTxType)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void InsertBroadcastConfiguration(ushort networkId, Bct.BroadcastConfiguration txType)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -19,9 +19,9 @@ namespace skyscraper5.Data.PostgreSql
|
||||
this.uiVersion = version;
|
||||
}
|
||||
|
||||
public List<LnbEntity> UiLnbTypesListAll()
|
||||
public List<LnbType> UiLnbTypesListAll()
|
||||
{
|
||||
List<LnbEntity> lnbTypes = new List<LnbEntity>();
|
||||
List<LnbType> lnbTypes = new List<LnbType>();
|
||||
using (NpgsqlConnection conn = new NpgsqlConnection(connectionStringBuilder.ToString()))
|
||||
{
|
||||
conn.Open();
|
||||
@ -38,7 +38,7 @@ namespace skyscraper5.Data.PostgreSql
|
||||
int lofSw = dataReader.GetInt32(5);
|
||||
int minFreq = dataReader.GetInt32(6);
|
||||
int maxFreq = dataReader.GetInt32(7);
|
||||
lnbTypes.Add(new LnbEntity("", name, lof1, lof2, lofSw, minFreq, maxFreq) { DateAdded = added, Id = id });
|
||||
lnbTypes.Add(new LnbType(name, lof1, lof2, lofSw, minFreq, maxFreq) { DateAdded = added, Id = id });
|
||||
}
|
||||
|
||||
dataReader.Close();
|
||||
@ -49,7 +49,7 @@ namespace skyscraper5.Data.PostgreSql
|
||||
return lnbTypes;
|
||||
}
|
||||
|
||||
public void UiLnbTypesAdd(LnbEntity defaultLnbType)
|
||||
public void UiLnbTypesAdd(LnbType defaultLnbType)
|
||||
{
|
||||
using (NpgsqlConnection conn = new NpgsqlConnection(connectionStringBuilder.ToString()))
|
||||
{
|
||||
@ -69,9 +69,9 @@ namespace skyscraper5.Data.PostgreSql
|
||||
}
|
||||
}
|
||||
|
||||
public List<DishEntity> UiDishTypesListAll()
|
||||
public List<DishType> UiDishTypesListAll()
|
||||
{
|
||||
List<DishEntity> result = new List<DishEntity>();
|
||||
List<DishType> result = new List<DishType>();
|
||||
using (NpgsqlConnection conn = new NpgsqlConnection(connectionStringBuilder.ToString()))
|
||||
{
|
||||
conn.Open();
|
||||
@ -85,14 +85,14 @@ namespace skyscraper5.Data.PostgreSql
|
||||
string name = dataReader.GetString(2);
|
||||
int diameter = dataReader.GetInt32(3);
|
||||
DishShape shape = (DishShape)dataReader.GetInt32(4);
|
||||
result.Add(new DishEntity("", name, diameter, shape) { DateAdded = added, Id = id });
|
||||
result.Add(new DishType(name, diameter, shape) { DateAdded = added, Id = id });
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public void UiDishTypesAdd(DishEntity defaultDishType)
|
||||
public void UiDishTypesAdd(DishType defaultDishType)
|
||||
{
|
||||
using (NpgsqlConnection conn = new NpgsqlConnection(connectionStringBuilder.ToString()))
|
||||
{
|
||||
@ -109,9 +109,9 @@ namespace skyscraper5.Data.PostgreSql
|
||||
}
|
||||
|
||||
|
||||
public List<SatellitePositionEntity> UiSatellitesListAll()
|
||||
public List<SatellitePosition> UiSatellitesListAll()
|
||||
{
|
||||
List<SatellitePositionEntity> positions = new List<SatellitePositionEntity>();
|
||||
List<SatellitePosition> positions = new List<SatellitePosition>();
|
||||
using (NpgsqlConnection conn = new NpgsqlConnection(connectionStringBuilder.ToString()))
|
||||
{
|
||||
conn.Open();
|
||||
@ -123,7 +123,7 @@ namespace skyscraper5.Data.PostgreSql
|
||||
float angle = (float)reader.GetDouble(0);
|
||||
int cardinal = reader.GetInt32(1);
|
||||
string name = reader.GetString(2);
|
||||
SatellitePositionEntity child = new SatellitePositionEntity(angle, name);
|
||||
SatellitePosition child = new SatellitePosition(angle, cardinal, name);
|
||||
positions.Add(child);
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ namespace skyscraper5.Data.PostgreSql
|
||||
return positions;
|
||||
}
|
||||
|
||||
public void UiSatellitesAdd(SatellitePositionEntity newPosition)
|
||||
public void UiSatellitesAdd(SatellitePosition newPosition)
|
||||
{
|
||||
using (NpgsqlConnection conn = new NpgsqlConnection(connectionStringBuilder.ToString()))
|
||||
{
|
||||
@ -145,7 +145,7 @@ namespace skyscraper5.Data.PostgreSql
|
||||
"insert into skyscraper5_satellite_positions (angle, cardinal, name, keyversion, key) " +
|
||||
"values (@angle, @cardinal, @name, @keyversion, @key)";
|
||||
cmd.Parameters.AddWithValue("@angle", NpgsqlDbType.Real, newPosition.angle);
|
||||
cmd.Parameters.AddWithValue("@cardinal", NpgsqlDbType.Integer, newPosition.GetCardinalDirectionAsInt());
|
||||
cmd.Parameters.AddWithValue("@cardinal", NpgsqlDbType.Integer, newPosition.cardinalDirection);
|
||||
cmd.Parameters.AddWithValue("@name", NpgsqlDbType.Text, newPosition.name);
|
||||
cmd.Parameters.AddWithValue("@keyversion", NpgsqlDbType.Integer, uiVersion);
|
||||
cmd.Parameters.AddWithValue("@key", NpgsqlDbType.Text, newPosition.Checksum.ToString());
|
||||
@ -155,7 +155,7 @@ namespace skyscraper5.Data.PostgreSql
|
||||
}
|
||||
}
|
||||
|
||||
public void UiSatellitesDelete(SatellitePositionEntity satellitePosition)
|
||||
public void UiSatellitesDelete(SatellitePosition satellitePosition)
|
||||
{
|
||||
using (NpgsqlConnection conn = new NpgsqlConnection(connectionStringBuilder.ToString()))
|
||||
{
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
BITRATE=6000000
|
||||
PCR_DISTANCE=6000
|
||||
PCR_PID=1001
|
||||
|
||||
tsp -v -b $BITRATE \
|
||||
-I null \
|
||||
-P regulate --packet-burst 14 \
|
||||
-P filter --every $PCR_DISTANCE --set-label 1 \
|
||||
-P craft --only-label 1 --pid $PCR_PID --no-payload --pcr 0 \
|
||||
-P continuity --pid $PCR_PID --fix \
|
||||
-P pcradjust --pid $PCR_PID \
|
||||
-P pat -c -a 1/1000 \
|
||||
-P pmt -c -i 1 --pcr-pid $PCR_PID -p 1000 -a 1002/0x0d -a 1003/0x0d -a 1004/0x0d \
|
||||
--add-stream-identifier --set-data-broadcast-id 1002/5 \
|
||||
--set-data-broadcast-id 1003/5 --set-data-broadcast-id 1004/5 \
|
||||
-P inject tdt.xml --pid 0x14 --bitrate 2000 --stuffing \
|
||||
-P timeref --system-synchronous \
|
||||
-P mpeinject -p 1002 -l 127.0.0.2 2000 --max-queue 8192 \
|
||||
-P mpeinject -p 1003 -l 127.0.0.2 3000 --max-queue 8192 \
|
||||
-P history \
|
||||
-P until -s 60 \
|
||||
-O file --max-size 100000000 experiment2-clean-60s.ts
|
||||
@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<tsduck>
|
||||
<TDT UTC_time="1984-01-01 00:13:37"/>
|
||||
</tsduck>
|
||||
@ -7,16 +7,12 @@ the following Signalling applies:
|
||||
|
||||
|Stream Type|Interpretation |
|
||||
|-----------|-----------------------------------|
|
||||
|0x80 |STiD135 GS/GSE Packets |
|
||||
|0x80 |TBS 6903-X GSE Packets |
|
||||
|0x81 |AC-3 Audio |
|
||||
|0x82 |PID only used for PCR, no payloads |
|
||||
|0x82 |PID only used for PCR |
|
||||
|0x83 |AC-3 True HD Audio |
|
||||
|0x84 |AC-3+ Audio |
|
||||
|0x85 |DTS Audio |
|
||||
|0x86 |SCTE 35 Splice Info |
|
||||
|0x87 |ATSC Enhanced-AC-3 Audio |
|
||||
|0x88 |ULE (RFC 4326) |
|
||||
|0x91 |A52b/AC-3 Audio |
|
||||
|0x85 |ULE (RFC 4326) |
|
||||
|
||||
## Descriptors:
|
||||
|
||||
|
||||
@ -127,7 +127,7 @@ namespace skyscraper5.UI.Overrides
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void OnBlindscanBeforeSetChannel(BlindscanSearchResult blindscanResult, LnbEntity lnbType)
|
||||
public void OnBlindscanBeforeSetChannel(BlindscanSearchResult blindscanResult, LnbType lnbType)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<EnableWindowsTargeting>true</EnableWindowsTargeting>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<EnableWindowsTargeting>true</EnableWindowsTargeting>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@ -28,8 +27,4 @@
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Drawing.Common" Version="10.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@ -21,9 +21,9 @@ namespace skyscraper8.UI.MonoGame
|
||||
public DataStorage DataStorage { get; set; }
|
||||
public ObjectStorage ObjectStorage { get; set; }
|
||||
public IGpsReceiver Gps { get; set; }
|
||||
public List<SatellitePositionEntity> SatellitePositions { get; set; }
|
||||
public List<LnbEntity> LnbTypes { get; set; }
|
||||
public List<DishEntity> DishTypes { get; set; }
|
||||
public List<SatellitePosition> SatellitePositions { get; set; }
|
||||
public List<LnbType> LnbTypes { get; set; }
|
||||
public List<DishType> DishTypes { get; set; }
|
||||
public ReadOnlyCollection<KeyValuePair<TunerFactoryIdAttribute, ITunerFactory>> AllTunerFactories { get; set; }
|
||||
public IStreamReader StreamReader { get; set; }
|
||||
public List<TunerMetadata> Tuners { get; set; }
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
{
|
||||
"help":"https://go.microsoft.com/fwlink/?linkid=866610"
|
||||
}
|
||||
@ -14,14 +14,13 @@ namespace SDL2Demo.Forms
|
||||
internal class ConfigureDishTypes : IRenderable
|
||||
{
|
||||
private readonly DataStorage _scraperStroage;
|
||||
private List<DishEntity> dishTypes;
|
||||
private List<DishType> dishTypes;
|
||||
private string tableUuid;
|
||||
|
||||
private string manufacturer;
|
||||
private string name;
|
||||
private int diameter;
|
||||
private DishShape shape;
|
||||
public ConfigureDishTypes(DataStorage scraperStroage, List<DishEntity> dishTypes)
|
||||
public ConfigureDishTypes(DataStorage scraperStroage, List<DishType> dishTypes)
|
||||
{
|
||||
_scraperStroage = scraperStroage;
|
||||
this.dishTypes = dishTypes;
|
||||
@ -38,14 +37,12 @@ namespace SDL2Demo.Forms
|
||||
if (justSaved)
|
||||
{
|
||||
name = "";
|
||||
manufacturer = "";
|
||||
diameter = 0;
|
||||
shape = DishShape.Offset;
|
||||
justSaved = false;
|
||||
}
|
||||
if (ImGui.TreeNode("Add Dish Type"))
|
||||
{
|
||||
ImGui.InputText("Manufacturer", ref manufacturer, 255);
|
||||
ImGui.InputText("Name", ref name, 255);
|
||||
ImGui.InputInt("Diameter", ref diameter, 5, 10);
|
||||
|
||||
@ -66,7 +63,7 @@ namespace SDL2Demo.Forms
|
||||
ImGui.BeginDisabled(!SaveButtonEnabled());
|
||||
if (ImGui.Button("Add"))
|
||||
{
|
||||
DishEntity newDish = new DishEntity(manufacturer, name, diameter, shape);
|
||||
DishType newDish = new DishType(name, diameter, shape);
|
||||
dishTypes.Add(newDish);
|
||||
_scraperStroage.UiDishTypesAdd(newDish);
|
||||
justSaved = true;
|
||||
@ -87,7 +84,7 @@ namespace SDL2Demo.Forms
|
||||
ImGui.TableSetColumnIndex(2);
|
||||
ImGui.Text("Type");
|
||||
|
||||
foreach (DishEntity dishType in dishTypes)
|
||||
foreach (DishType dishType in dishTypes)
|
||||
{
|
||||
ImGui.TableNextRow();
|
||||
ImGui.TableSetColumnIndex(0);
|
||||
@ -123,7 +120,7 @@ namespace SDL2Demo.Forms
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach (DishEntity dishType in dishTypes)
|
||||
foreach (DishType dishType in dishTypes)
|
||||
{
|
||||
if (dishType.Name.Equals(name))
|
||||
return false;
|
||||
|
||||
@ -16,21 +16,19 @@ namespace SDL2Demo.Forms
|
||||
internal class ConfigureLnbTypes : IRenderable
|
||||
{
|
||||
private readonly DataStorage _scraperStroage;
|
||||
private List<LnbEntity> lnbTypes;
|
||||
private List<LnbType> lnbTypes;
|
||||
private string tableUuid;
|
||||
private string lnbPopupUuid;
|
||||
|
||||
private string manufacturer;
|
||||
private string name;
|
||||
private int lof1, lof2, lofSw, minFreq, maxFreq;
|
||||
|
||||
public ConfigureLnbTypes(DataStorage scraperStroage, List<LnbEntity> lnbTypes)
|
||||
public ConfigureLnbTypes(DataStorage scraperStroage, List<LnbType> lnbTypes)
|
||||
{
|
||||
_scraperStroage = scraperStroage;
|
||||
this.lnbTypes = lnbTypes;
|
||||
this.tableUuid = Guid.NewGuid().ToString();
|
||||
this.name = "";
|
||||
this.manufacturer = "";
|
||||
this.lnbPopupUuid = Guid.NewGuid().ToString();
|
||||
}
|
||||
|
||||
@ -41,8 +39,6 @@ namespace SDL2Demo.Forms
|
||||
ImGui.Begin("Configure LNB Types", ref pOpen, windowFlags);
|
||||
if (ImGui.TreeNode("Add LNB Type"))
|
||||
{
|
||||
ImGui.InputText("Manufacturer", ref this.manufacturer, 64);
|
||||
ImGui.SameLine();
|
||||
ImGui.InputText("Name", ref name, 255);
|
||||
|
||||
ImGui.InputInt("LOF1", ref lof1, 50, 100);
|
||||
@ -59,7 +55,7 @@ namespace SDL2Demo.Forms
|
||||
ImGui.BeginDisabled(!SaveButtonEnabled());
|
||||
if (ImGui.Button("Add"))
|
||||
{
|
||||
LnbEntity newLnb = new LnbEntity(manufacturer, name, lof1, lof2, lofSw, minFreq, maxFreq);
|
||||
LnbType newLnb = new LnbType(name, lof1, lof2, lofSw, minFreq, maxFreq);
|
||||
lnbTypes.Add(newLnb);
|
||||
_scraperStroage.UiLnbTypesAdd(newLnb);
|
||||
}
|
||||
@ -102,7 +98,7 @@ namespace SDL2Demo.Forms
|
||||
|
||||
ImGui.TableSetColumnIndex(2);
|
||||
ImGui.Text("Frequency Range");
|
||||
foreach (LnbEntity lnbType in lnbTypes)
|
||||
foreach (LnbType lnbType in lnbTypes)
|
||||
{
|
||||
ImGui.TableNextRow();
|
||||
ImGui.TableSetColumnIndex(0);
|
||||
@ -140,7 +136,7 @@ namespace SDL2Demo.Forms
|
||||
if (lof1 == 0)
|
||||
return false;
|
||||
|
||||
foreach (LnbEntity lnbType in lnbTypes)
|
||||
foreach (LnbType lnbType in lnbTypes)
|
||||
{
|
||||
if (lnbType.MinimumFrequency == minFreq &&
|
||||
lnbType.MaximumFrequency == maxFreq &&
|
||||
|
||||
@ -10,9 +10,9 @@ namespace SDL2Demo.Forms
|
||||
internal class ConfigureTunersWindow : IRenderable
|
||||
{
|
||||
private readonly DataStorage _scraperStroage;
|
||||
private List<SatellitePositionEntity> satPositions;
|
||||
private List<LnbEntity> lnbTypes;
|
||||
private List<DishEntity> dishTypes;
|
||||
private List<SatellitePosition> satPositions;
|
||||
private List<LnbType> lnbTypes;
|
||||
private List<DishType> dishTypes;
|
||||
|
||||
public ConfigureTunersWindow(List<TunerMetadata> tuners, DataStorage scraperStroage)
|
||||
{
|
||||
|
||||
@ -2102,7 +2102,7 @@ namespace SDL2Demo.Forms
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void OnBlindscanBeforeSetChannel(BlindscanSearchResult blindscanResult,LnbEntity lnbType)
|
||||
public void OnBlindscanBeforeSetChannel(BlindscanSearchResult blindscanResult,LnbType lnbType)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@ namespace SDL2Demo.Forms
|
||||
|
||||
private string lnbPopupUuid;
|
||||
private string memoryTableUuid;
|
||||
private List<SatellitePositionEntity> allPositions;
|
||||
private List<SatellitePosition> allPositions;
|
||||
private readonly DataStorage _storage;
|
||||
|
||||
|
||||
@ -50,8 +50,8 @@ namespace SDL2Demo.Forms
|
||||
if (allPositions.Count == 0)
|
||||
return true;
|
||||
|
||||
int currentChecksum = SatellitePositionEntity.GetChecksum(degrees);
|
||||
foreach (SatellitePositionEntity satellitePosition in allPositions)
|
||||
int currentChecksum = SatellitePosition.GetChecksum(degrees, cardinalDirection);
|
||||
foreach (SatellitePosition satellitePosition in allPositions)
|
||||
{
|
||||
if (currentChecksum == satellitePosition.Checksum)
|
||||
return false;
|
||||
@ -68,6 +68,9 @@ namespace SDL2Demo.Forms
|
||||
{
|
||||
ImGui.InputText("Name", ref name, 255);
|
||||
ImGui.InputFloat("Position", ref degrees, 0.1f);
|
||||
ImGui.RadioButton("East", ref cardinalDirection, 0);
|
||||
ImGui.SameLine();
|
||||
ImGui.RadioButton("West", ref cardinalDirection, 1);
|
||||
|
||||
CheckBounds();
|
||||
|
||||
@ -75,7 +78,7 @@ namespace SDL2Demo.Forms
|
||||
ImGui.BeginDisabled(!SaveButtonEnabled());
|
||||
if (ImGui.Button("Add"))
|
||||
{
|
||||
SatellitePositionEntity newPosition = new SatellitePositionEntity(degrees, name);
|
||||
SatellitePosition newPosition = new SatellitePosition(degrees, cardinalDirection, name);
|
||||
allPositions.Add(newPosition);
|
||||
_storage.UiSatellitesAdd(newPosition);
|
||||
}
|
||||
@ -86,13 +89,13 @@ namespace SDL2Demo.Forms
|
||||
ImGui.Separator();
|
||||
|
||||
ImGui.BeginTable(memoryTableUuid, 4);
|
||||
foreach (SatellitePositionEntity satellitePosition in allPositions)
|
||||
foreach (SatellitePosition satellitePosition in allPositions)
|
||||
{
|
||||
ImGui.TableNextRow();
|
||||
ImGui.TableSetColumnIndex(0);
|
||||
ImGui.Text(satellitePosition.name);
|
||||
ImGui.TableSetColumnIndex(1);
|
||||
ImGui.Text(String.Format("{0:0.0}° {1}", satellitePosition.angle, satellitePosition.GetCardinalDirectionAsChar()));
|
||||
ImGui.Text(String.Format("{0:0.0}° {1}", satellitePosition.angle, satellitePosition.cardinalDirection == 0 ? "E" : "W"));
|
||||
ImGui.TableSetColumnIndex(2);
|
||||
ImGui.Text("");
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ namespace SDL2Demo.Jobs
|
||||
public class BlindscanTarget
|
||||
{
|
||||
public BlindscanTarget(string name, int tunerIndex, STD_TYPE tunerStandard, int diseqcType,
|
||||
SatellitePositionEntity satPosition, int satIndex, LnbEntity lnbType, PhysicalAddress tunerMetadataMacAddress)
|
||||
SatellitePosition satPosition, int satIndex, LnbType lnbType, PhysicalAddress tunerMetadataMacAddress)
|
||||
{
|
||||
this.name = name;
|
||||
this.tunerIndex = tunerIndex;
|
||||
@ -50,10 +50,10 @@ namespace SDL2Demo.Jobs
|
||||
public int tunerIndex;
|
||||
public STD_TYPE tunerStandard;
|
||||
public int diseqcType;
|
||||
public SatellitePositionEntity satPosition;
|
||||
public SatellitePosition satPosition;
|
||||
public int satIndex;
|
||||
public string buttonUuid;
|
||||
public LnbEntity lnbType;
|
||||
public LnbType lnbType;
|
||||
public readonly PhysicalAddress macAddress;
|
||||
|
||||
public bool IsTorC()
|
||||
@ -84,7 +84,7 @@ namespace SDL2Demo.Jobs
|
||||
private DbBlindscanJob jobInDb;
|
||||
private IDbBlindscanJobStorage jobStorage;
|
||||
|
||||
public Blindscan(List<TunerMetadata> tuners, List<SatellitePositionEntity> satellitePositions, List<LnbEntity> lnbTypes, DataStorage dataStorage)
|
||||
public Blindscan(List<TunerMetadata> tuners, List<SatellitePosition> satellitePositions, List<LnbType> lnbTypes, DataStorage dataStorage)
|
||||
{
|
||||
this.jobStorage = dataStorage;
|
||||
continuationDataExists = jobStorage.TestForIncompleteJob();
|
||||
@ -98,8 +98,8 @@ namespace SDL2Demo.Jobs
|
||||
int numSatsFromDiseqcType = tunerMetadata.GetNumSatsFromDiseqcType();
|
||||
for (int i = 0; i < numSatsFromDiseqcType; i++)
|
||||
{
|
||||
SatellitePositionEntity satellitePosition = satellitePositions.Find(x => x.Checksum == tunerMetadata.Satellites[i]);
|
||||
LnbEntity lnbType = lnbTypes.Find(x => x.Id == tunerMetadata.Lnbs[i]);
|
||||
SatellitePosition satellitePosition = satellitePositions.Find(x => x.Checksum == tunerMetadata.Satellites[i]);
|
||||
LnbType lnbType = lnbTypes.Find(x => x.Id == tunerMetadata.Lnbs[i]);
|
||||
if (satellitePosition == null)
|
||||
continue;
|
||||
if (lnbType == null)
|
||||
@ -835,7 +835,7 @@ namespace SDL2Demo.Jobs
|
||||
now.Year, now.Month, now.Day, now.Hour, now.Minute, blindscanResult.sr1.Freq / 1000,
|
||||
blindscanResult.sr1.Pol == 0 ? "H" : "V", blindscanResult.sr1.SR / 1000,
|
||||
(int)(SelectedBlindscanTarget.satPosition.angle * 10),
|
||||
SelectedBlindscanTarget.satPosition.GetCardinalDirectionAsChar());
|
||||
SelectedBlindscanTarget.satPosition.cardinalDirection == 0 ? "E" : "W");
|
||||
break;
|
||||
case STD_TYPE.STD_DVBC:
|
||||
JobContext.Puppets[1].AutoMoveTo(blindscanResult.Position);
|
||||
|
||||
@ -31,10 +31,10 @@ namespace SDL2Demo.Jobs
|
||||
private IDbBlindscanJobStorage jobStorage;
|
||||
private List<TunerMetadata> tunerMetadataList;
|
||||
private JobContext jobContext;
|
||||
private List<SatellitePositionEntity> satellites;
|
||||
private List<LnbEntity> lnbs;
|
||||
private List<SatellitePosition> satellites;
|
||||
private List<LnbType> lnbs;
|
||||
|
||||
public CoopBlindscan(List<TunerMetadata> tuners, List<SatellitePositionEntity> satellitePositions, List<LnbEntity> lnbTypes, IDbBlindscanJobStorage jobStorage)
|
||||
public CoopBlindscan(List<TunerMetadata> tuners, List<SatellitePosition> satellitePositions, List<LnbType> lnbTypes, IDbBlindscanJobStorage jobStorage)
|
||||
{
|
||||
this.jobStorage = jobStorage;
|
||||
this.tunerMetadataList = tuners.Where(x => x.Type == STD_TYPE.STD_DVBS || x.Type == STD_TYPE.STD_DVBS2).ToList();
|
||||
@ -166,8 +166,8 @@ namespace SDL2Demo.Jobs
|
||||
{
|
||||
settingsWindowOpen = false;
|
||||
int lnbIndex = tunerMetadataList[settingsWindowTunerAselection].Lnbs[settingsWindowDiseqc - 1];
|
||||
LnbEntity lnb = lnbs.Find(x => x.Id == lnbIndex);
|
||||
Configuration = new CoopBlindscanConfiguration(tunerMetadataList[settingsWindowTunerAselection], tunerMetadataList[settingsWindowTunerBselection], settingsWindowScanHorizontalLow, settingsWindowScanHorizontalHigh, settingsWindowScanVerticalLow, settingsWindowScanVerticalHigh, settingsWindowDiseqc, settingsWindowSatellite, SatellitePositionEntity.FromChecksum(satellites[settingsWindowSatellite].Checksum), lnb, settingsWindowCaptureFile);
|
||||
LnbType lnb = lnbs.Find(x => x.Id == lnbIndex);
|
||||
Configuration = new CoopBlindscanConfiguration(tunerMetadataList[settingsWindowTunerAselection], tunerMetadataList[settingsWindowTunerBselection], settingsWindowScanHorizontalLow, settingsWindowScanHorizontalHigh, settingsWindowScanVerticalLow, settingsWindowScanVerticalHigh, settingsWindowDiseqc, settingsWindowSatellite, SatellitePosition.FromChecksum(satellites[settingsWindowSatellite].Checksum), lnb, settingsWindowCaptureFile);
|
||||
}
|
||||
ImGui.SameLine();
|
||||
|
||||
@ -185,7 +185,7 @@ namespace SDL2Demo.Jobs
|
||||
|
||||
public class CoopBlindscanConfiguration
|
||||
{
|
||||
public CoopBlindscanConfiguration(TunerMetadata tunerA, TunerMetadata tunerB, bool doHorizontalLow, bool doHorizontalHigh, bool doVerticalLow, bool doVerticalHigh, int diseqc, int satelliteId, SatellitePositionEntity direction, LnbEntity lnbType, bool recordingEnabled)
|
||||
public CoopBlindscanConfiguration(TunerMetadata tunerA, TunerMetadata tunerB, bool doHorizontalLow, bool doHorizontalHigh, bool doVerticalLow, bool doVerticalHigh, int diseqc, int satelliteId, SatellitePosition direction, LnbType lnbType, bool recordingEnabled)
|
||||
{
|
||||
TunerA = tunerA;
|
||||
TunerB = tunerB;
|
||||
@ -208,8 +208,8 @@ namespace SDL2Demo.Jobs
|
||||
public bool DoVerticalHigh { get; }
|
||||
public int Diseqc { get; }
|
||||
public int SatelliteId { get; }
|
||||
public SatellitePositionEntity Direction { get; }
|
||||
public LnbEntity LnbType { get; }
|
||||
public SatellitePosition Direction { get; }
|
||||
public LnbType LnbType { get; }
|
||||
public bool RecordingEnabled { get; }
|
||||
}
|
||||
#endregion
|
||||
@ -689,7 +689,7 @@ namespace SDL2Demo.Jobs
|
||||
now.Year, now.Month, now.Day, now.Hour, now.Minute, blindscanResult.sr1.Freq / 1000,
|
||||
blindscanResult.sr1.Pol == 0 ? "H" : "V", blindscanResult.sr1.SR / 1000,
|
||||
(int)(Configuration.Direction.angle * 10),
|
||||
Configuration.Direction.GetCardinalDirectionAsChar());
|
||||
Configuration.Direction.cardinalDirection == 0 ? "E" : "W");
|
||||
|
||||
|
||||
RunSkyscraper(blindscanResult);
|
||||
|
||||
@ -13,9 +13,9 @@ namespace SDL2Demo.Jobs
|
||||
{
|
||||
private bool windowOpen;
|
||||
private List<TunerMetadata> tuners;
|
||||
private List<SatellitePositionEntity> satellites;
|
||||
private List<LnbEntity> lnbs;
|
||||
private List<DishEntity> dishes;
|
||||
private List<SatellitePosition> satellites;
|
||||
private List<LnbType> lnbs;
|
||||
private List<DishType> dishes;
|
||||
private readonly TaskQueue _taskQueue;
|
||||
|
||||
public int settingsWindowBLScanTunerSelection;
|
||||
@ -52,7 +52,7 @@ namespace SDL2Demo.Jobs
|
||||
settingsWindowScanVerticalLow, settingsWindowScanVerticalHigh);
|
||||
}
|
||||
public InheritedBlindscanConfigWindow(List<TunerMetadata> tunerMetadatas,
|
||||
List<SatellitePositionEntity> satellitePositions, List<LnbEntity> lnbTypes, List<DishEntity> dishTypes,
|
||||
List<SatellitePosition> satellitePositions, List<LnbType> lnbTypes, List<DishType> dishTypes,
|
||||
DataStorage dataStorage, ObjectStorage objectStorage, IGpsReceiver gps, Ini ini, IStreamReader streamReader,
|
||||
TaskQueue taskQueue)
|
||||
{
|
||||
|
||||
@ -1657,7 +1657,7 @@ namespace SDL2Demo.Jobs
|
||||
return position;
|
||||
}
|
||||
|
||||
public void OnBlindscanBeforeSetChannel(BlindscanSearchResult blindscanResult, LnbEntity lnb)
|
||||
public void OnBlindscanBeforeSetChannel(BlindscanSearchResult blindscanResult, LnbType lnb)
|
||||
{
|
||||
Point point = GetFrequencyPosition(blindscanResult.SearchResult, lnb.MinimumFrequency, lnb.MaximumFrequency);
|
||||
jobContext.Puppets[2 + blindscanResult.SearchResult.Pol].AutoMoveTo(point);
|
||||
|
||||
@ -211,9 +211,9 @@ namespace SkyscraperUI
|
||||
private ConfigureDataStorageWindow configureDataStorageWindow;
|
||||
private ConfigureObjectStorageWindow configureObjectStorageWindow;
|
||||
private SatellitesConfigurationWindow satellitesConfigurationWindow;
|
||||
private List<SatellitePositionEntity> satellitePositions;
|
||||
private List<LnbEntity> lnbTypes;
|
||||
private List<DishEntity> dishTypes;
|
||||
private List<SatellitePosition> satellitePositions;
|
||||
private List<LnbType> lnbTypes;
|
||||
private List<DishType> dishTypes;
|
||||
//private LogWindow logWindow;
|
||||
private ScrapeFromTcp scrapeFromTcpWindow;
|
||||
private JobContext jobContext;
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
{
|
||||
"profiles": {
|
||||
"skyscraper8.UI.SDL2": {
|
||||
"commandName": "Project"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -588,9 +588,11 @@ namespace skyscraper5.Skyscraper.IO.CrazycatStreamReader
|
||||
{
|
||||
this.wrapped = client;
|
||||
this.bufferedStream = new BufferedStream(wrapped.GetStream(), 96256);
|
||||
this.packetsRemainBeforeStart = 512;
|
||||
}
|
||||
internal TcpClient wrapped;
|
||||
internal BufferedStream bufferedStream;
|
||||
private int packetsRemainBeforeStart;
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
@ -613,6 +615,15 @@ namespace skyscraper5.Skyscraper.IO.CrazycatStreamReader
|
||||
|
||||
internal void DropPacket(byte[] buffer, int offset, int length)
|
||||
{
|
||||
if (packetsRemainBeforeStart > 0)
|
||||
{
|
||||
if (packetsRemainBeforeStart == 512 || packetsRemainBeforeStart == 256 || packetsRemainBeforeStart == 128 || packetsRemainBeforeStart == 64 || packetsRemainBeforeStart == 32 || packetsRemainBeforeStart == 16 || packetsRemainBeforeStart == 8 || packetsRemainBeforeStart == 4 || packetsRemainBeforeStart == 2 || packetsRemainBeforeStart == 1)
|
||||
{
|
||||
Console.WriteLine("Waiting {0} packets before starting to send to client {1}...", packetsRemainBeforeStart, wrapped.Client.RemoteEndPoint);
|
||||
}
|
||||
packetsRemainBeforeStart--;
|
||||
return;
|
||||
}
|
||||
bufferedStream?.Write(buffer, offset, length);
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,15 +80,7 @@ namespace skyscraper5.IO.StreamReader
|
||||
|
||||
public bool SetChannel(int freq, int symbrate, int pol, VITERBIRATE_TYPE fec, int lof1, int lof2, int lofsw)
|
||||
{
|
||||
try
|
||||
{
|
||||
return UnsafeStreamReaderMethods.SetChannel(freq, symbrate, pol, fec, lof1, lof2, lofsw);
|
||||
}
|
||||
catch (DivideByZeroException dvze)
|
||||
{
|
||||
Console.WriteLine("Mitigated Division-by-Zero bug in StreamReader.dll.");
|
||||
return false;
|
||||
}
|
||||
return UnsafeStreamReaderMethods.SetChannel(freq, symbrate, pol, fec, lof1, lof2, lofsw);
|
||||
}
|
||||
|
||||
public bool SetChannelEx(int freq, int symbrate, int pol, VITERBIRATE_TYPE fec, int lof1, int lof2, int lofsw, MOD_TYPE mod)
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
\usepackage{amssymb}
|
||||
\usepackage{xcolor}
|
||||
\usepackage{pifont,mdframed}
|
||||
\usepackage{verbatim}
|
||||
|
||||
|
||||
\usepackage{geometry}
|
||||
@ -75,7 +74,6 @@ On Linux and macOS, any halfway recent shell should be fine.
|
||||
.\skyscraper8.exe cscan tcp://127.0.0.1:6969
|
||||
\end{verbatim}
|
||||
|
||||
\label{sec:gswarning}
|
||||
\subsubsection{Working with GS using StreamReader}
|
||||
There are a few caveats when working with StreamReader.dll to capture GS.
|
||||
|
||||
@ -96,19 +94,7 @@ Why is that? While StreamReader.dll's Deencapsulation works correctly in theory,
|
||||
|
||||
\subsection{Using a BDA compatible tuner}
|
||||
Use TSDuck's \codeword{tsp} and use the \codeword{dvb} input plugin and the \codeword{ip} output plugin.
|
||||
Here's how to do it:
|
||||
|
||||
\begin{enumerate}
|
||||
\item Run skyscraper8 from the commandline using the following command:
|
||||
\begin{verbatim}
|
||||
.\skyscraper8.exe udpin
|
||||
\end{verbatim}
|
||||
\item Then run \codeword{tsp} like this:
|
||||
\begin{verbatim}
|
||||
tsp -v -I dvb -a 4 --delivery-system DVB-S2 --frequency 11,523,000,000 \
|
||||
--symbol-rate 22,000,000 --polarity horizontal -O ip 127.0.0.1:9003
|
||||
\end{verbatim}
|
||||
\end{enumerate}
|
||||
\\ TODO: Talk about TSDuck here.
|
||||
|
||||
\subsection{Using a video4linux compatible tuner}
|
||||
See the paragraph about BDA tuners. The same applies to video4linux compatible tuners. TSDuck's \codeword{tsp} can be used on Windows and Linux in the same way.
|
||||
@ -171,15 +157,13 @@ Extracted files will be written to the directory the command-line interpreter ha
|
||||
|
||||
If you are using Microsoft Windows, you can also Drag’n’Drop a TS file onto the skyscraper8.exe. The extracted data will be placed into the same directory the TS is in.
|
||||
|
||||
|
||||
\label{sec:cannotdo}
|
||||
\section{What skyscraper8 can not do}
|
||||
\begin{itemize}
|
||||
\item Watch TV or Listen to Radio. Extracting files and playing back audio/video are two very different things, and skyscraper8 is not designed to do the latter. If this is something you're looking for, you probably want something like ProgDVB or DVBViewer.
|
||||
\item Descramble encrypted channels. This is illegal in most, if not all, jurisdictions, and I want nothing to with that.
|
||||
\item Circumvent copy protections. TS contained on Blu-Ray disc are usually scrambled using AACS. Although not too difficult, bypassing it is also a complicated legal matter, which is why I prefer not doing it.
|
||||
\item Descramble encrypted DOCSIS\footnote{Data-Over-Cable Service Interface Specifications} Traffic. While skyscraper8 does understand DOCSIS traffic and is perfectly capable of sniffing packets from it using tuners like the TBS-6281 SE, it will drop any scrambled packets - meaning those that have the DOCSIS privacy extension enabled.
|
||||
\item Do a professional grade analysis of a TS. There are many intricacies in broadcasting systems which are out of scope for a simple file extractor developed by a mere hobbyist. \hypertarget{bettertools}{If you're looking for a professional grade analyzing tool}, I'd recommend you to check out the tools included in VMA Video Analyzer, Dektec's StreamXpert, GkWare's StreamGuru, or the \codeword{analyze} plugin of TSDuck.
|
||||
\item Do a professional grade analysis of a TS. There are many intricacies in broadcasting systems which are out of scope for a simple file extractor developed by a mere hobbyist. If you're looking for a professional grade analyzing tool, I'd recommend you to check out the tools included in VMA Video Analyzer, Dektec's StreamXpert, GkWare's StreamGuru, or the \codeword{analyze} plugin of TSDuck.
|
||||
\item Handle MPEG-DASH streams. Currently, there are two known video formats used in DVB-NIP: HLS and MPEG-DASH. While skyscraper8 is able to extract segments of both types from a TS, I do not know of an easy way to playback MPEG-DASH formatted streams. HLS on the other hand is trivial.
|
||||
\item Repair broken GS. When using a non STiD135-based tuner to tune to a GS, the framing gets broken in extremely weird ways. Also, when using StreamReader.dll to tune to a GS with a STiD135 - it is imperative to disable to StreamReader.dll's deencapsulator. It often breaks the framing as well. See \hyperref[sec:gswarning]{the notice about GS in Section 2.1}
|
||||
\end{itemize}
|
||||
@ -187,79 +171,14 @@ If you are using Microsoft Windows, you can also Drag’n’Drop a TS file onto
|
||||
\section{How skyscraper8 was made}
|
||||
skyscraper8 is developed in the C\# programming language, using Microsoft Visual Studio 2022. Therefore it requires a Microsoft .NET runtime, which is included in Microsoft Windows and freely available for most Linux distributions and Apple's macOS.
|
||||
|
||||
The .NET assembly of skyscraper8 is not obfuscated or protected in any way. This is on purpose. If you want to study how skyscraper8 works under the hood, I hereby allow you to use tools like RedGate's Reflector or JetBrains' dotPeek to inspect the skyscraper8.dll file. I plan to release the clear source code at a later date. \\
|
||||
|
||||
Although I can't and won't force you to give credit, if you find some of my source code inspiring or helpful and want to use it in your own projects, it would be great if you give credit to where you got it from. \\
|
||||
|
||||
This document was typeset in \LaTeX{}, using the TeX Live distribution, and while I wrote it myself, I did use GPT-5 for proofreading the initial version of this document. The proofreading of this document is the only part of skyscraper8 for which an LLM was used. No part of the actual skyscraper8 codebase itself was written by an LLM. \\
|
||||
|
||||
For generating artificial TS recordings to test on, TSDuck was used. \\
|
||||
|
||||
\subsection{Experiments conducted using TSDuck}
|
||||
|
||||
\subsubsection {Creating a TS that carried multiple sub-TS using MPE}
|
||||
|
||||
Since skyscraper8 public release 12, it's possible to have skyscraper8 extract one or more TS carried via Multiprotocol Encapsulation. Unfortunately the dish I have at home is not aimed at satellites carrying such a stream. So I used TSDuck to build one artificially. \\
|
||||
|
||||
The following script was used to to run \codeword{tsp}:
|
||||
|
||||
\verbatiminput{../Documentation/TSDuck-Samples/experiment2/run.sh}
|
||||
|
||||
Contents of tdt.xml:
|
||||
|
||||
\verbatiminput{../Documentation/TSDuck-Samples/experiment2/tdt.xml}
|
||||
|
||||
Before executing that script, run this beforehand, to get a stream of Stingray Spa, of course you can use any other IPTV station you'd like:
|
||||
|
||||
\begin{verbatim}
|
||||
tsp -v -I hls https://lotus.stingray.com/manifest/ose-122ads-montreal/samsungtvplus/master.m3u8 \
|
||||
-P regulate -P history -O ip 127.0.0.2:3000
|
||||
\end{verbatim}
|
||||
|
||||
For the other stream, I used Offener Kanal Berlin, like so:
|
||||
|
||||
\begin{verbatim}
|
||||
tsp -v -I hls https://alex-stream.rosebud-media.de/bounce/alexlivetv50.smil/index.m3u8 \
|
||||
-P regulate -P history -O ip 127.0.0.2:2000
|
||||
\end{verbatim}
|
||||
|
||||
Finally, run the script above to get a clean TS containing two other TS encapsulated in MPE.
|
||||
The .NET assembly of skyscraper8 is not obfuscated or protected in any way. This is on purpose. If you want to study how skyscraper8 works under the hood, I hereby allow you to use tools like RedGate's Reflector or JetBrains' dotPeek to inspect the skyscraper8.dll file. Of course you can also acquire the plain source code from my Gitea instance.\footnote{\url{https://gitea.yo3explorer.moe/ft/skyscraper8}}
|
||||
|
||||
This document was typeset in \LaTeX{}, using the TeX Live distribution, and while I wrote it myself, I did use GPT-5 for proofreading the initial version of this document. The proofreading of this document is the only part of skyscraper8 for which an LLM was used. No part of the actual skyscraper8 codebase itself was written by an LLM.
|
||||
|
||||
\subsection{Personal remarks and some useless bonus information}
|
||||
|
||||
\subsubsection{Credits}
|
||||
skyscraper8 uses some external libraries:
|
||||
\begin{itemize}
|
||||
\item One of the external libraries is Ionic.Zlib.Core.dll, which is part of the \href{https://github.com/DinoChiesa/DotNetZip-2025}{DotNetZip} tool set by Dino Chiesa.
|
||||
\item Also used is Newtonsoft.Json.dll a.k.a. \href{https://github.com/JamesNK/Newtonsoft.Json}{Json.NET} by James Newton-King.
|
||||
\item Some of the GS handling code got inspired from the \href{https://github.com/newspaperman/bbframe-tools}{bbframe-tools} written by newspaperman.
|
||||
\end{itemize}
|
||||
|
||||
\subsubsection{How and why skyscraper8 began: A young man's dream}
|
||||
Ever since I was a child, I was fascinated by TV. But not actually watching it, rather understanding how it works. I grew up in the 90s, in an area where Cable TV was not really available, and terristial reception (yeah, those TVs with bunny ears!) only worked when it felt like it. So satellite was the best way to get my childish fix of cartoons! We can say the dish on my roof has always been a companion. Far more interesting than actually watching TV was scanning through the printed TV guides. I was curious. How did they make these? And how would I make one myself? I wondered. Of course my parents wouldn't know - they're not techies. \\
|
||||
|
||||
Of course, as I got older, I eventually moved onto other things. Like programming, trading cards, and video games. But just like with the TV, I eventually got more interested in how these games work, instead of actually playing them. \\
|
||||
|
||||
I got internet access much later in my life than my peers did, and when I found out that there are forums in which people discuss the technicalities about video games, it blew my mind. I used to be a frequent reader (and occasional contributor) of the XeNTaX\footnote{Unfortunately, that forum is long gone from the internet, but can still be experienced thanks to the amazing work of the people over at the Internet Archive: \url{https://web.archive.org/web/20230925120533/https://forum.xentax.com/ }} forum, from where I learned a lot! \\
|
||||
|
||||
At the time, my circle of friends was crazy about Yu-Gi-Oh! Online 3, which was an excellent simulation of the trading card game by the same name. I was really bad at this game, not even a mediocre player. I was far more busy studying how the game worked under the hood, and eventually managed to write a program that extracts all the card graphics and the soundtrack of the game. This resulted in my guild leader having the best quality available soundtrack rips on his Youtube account. As you can probably guess, I went on and reverse engineered more and more video games. But as life goes on, you eventually graduate from school, head to university, and then get a job. Interests and people can change over time, and so did I. As I grew older I kind of lost interest in video games. Nowadays I rarely play anymore. \\
|
||||
|
||||
But what has that to do with skyscraper8? That's easy! One day my parents, who I still stay in touch with asked me to record something off live TV. Up until that point, I totally forgot about the dish on the roof of the house my room is in, but at that point it got relevant again. Upon searching for an easy way to record satellite TV on a PC I stumbbled upon Thierry Lelegard's tsduck. With tsp's plugins, it was real easy to schedule a recording. And since I still had the natural curiosity of a game reverse engineer in me, I opened up the .ts file in a hex-editor, and that's exactly the point in time when the DX virus hit me. After reading a bit of the source code of \href{https://images.videolan.org/developers/libdvbpsi.html}{libdvbpsi}, an idea manifested in my head. And that idea became "skyscraper".
|
||||
|
||||
\subsubsection{A Brief history of skyscrapers1 to 8}
|
||||
At that time had a job of administering some databases. My childhood fantasies of making my own TV guide were now within reach. I had "skyscraper" at home, a bunch of databases at work - and MySQL is free someware. That was shortly before COVID-19 ran wild in the world. During lockdown I had made it: A program that reads a list of frequencies from a database, record a series of TS files, parses all the DVB tables, and writes the results into the database. That was all the first skyscraper could do. It was written in Java, and missed a lot of things.
|
||||
|
||||
skyscraper5 came about when I changed jobs. I was a software developer at that time. And since we used Java at my day job, and I wanted some distance from my job, I switched my hobbyist projects back to .NET. - .NET 5 to be exact - that's why I called it skyscraper5. That was on the 5th of March, 2022.
|
||||
|
||||
Eventually, I upgraded to .NET 8, mainly due to dependency issues, and I renamed the project fittingly to skyscraper8. \\
|
||||
|
||||
If you read up to this point, I wish to thank you from the bottom of my heart. I guess by now you can tell that skyscraper8 is a very personal and dear matter for me. My goal was never to make the best tool for handling TS files, there are \hyperlink{bettertools}{much better options} regarding that, but to satisfy my desire to learn. And let me tell you, I learned a lot during the development of skyscraper8, both as a person and as a programmer.
|
||||
|
||||
|
||||
|
||||
\subsubsection{Music!}
|
||||
Like a lot of programmers, I do enjoy listening to music while working. Some programmers even put song references in their software. Like how MKVToolnix' version names are actually song names, or how BSD developer fk even put \href{https://www.fabiankeil.de/nutzloseinfos.html}{a list of albums on his website} listing what albums he listened to while making it. Although this is absolutely useless, I'd liketo do this as well. Therefore, here follows a list of musical albums I enjoyed listening to while developing skyscraper8 - no claim to completeness.
|
||||
Like a lot of programmers, I do enjoy listening to music while working. Some programmers even put song references in their software. Like how MKVToolnix' version names are actually song names, or how BSD developer fk even put \href{https://www.fabiankeil.de/nutzloseinfos.html}{a list of albums on his website} listing what albums he listened to while making it. Although this is absolutely useless, I'd liketo do this as well. Therefore, here follows a list of musical albums I listened to while developing skyscraper8 - no claim to completeness.
|
||||
|
||||
\begin{itemize}
|
||||
\item Bel Canto - White-Out Conditions
|
||||
@ -272,8 +191,6 @@ Like a lot of programmers, I do enjoy listening to music while working. Some pro
|
||||
\item Satsuki Shibano / Yoshio Ojima - Caresse
|
||||
\item SHIFT UP - Stellar Blade Original Soundtrack
|
||||
\item Small Affairs - Small Affairs
|
||||
\item Starmani Series - la fillette révolutionnaire UTENA
|
||||
\item SuganoMusic - EUROBEAT FESTIVAL VOL.7.5
|
||||
\item Yoshio Ojima - Hands-Some
|
||||
\item Youssou N’Dour - The Guide (Wommat)
|
||||
\item Yu-Gi-Oh! Sound Duel Quarter Century Collection
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
{
|
||||
"allure": {
|
||||
"directory": "allure-results"
|
||||
}
|
||||
}
|
||||
1
skyscraper8.Tests/AssemblySettings.cs
Normal file
1
skyscraper8.Tests/AssemblySettings.cs
Normal file
@ -0,0 +1 @@
|
||||
[assembly: CollectionBehavior(DisableTestParallelization = true)]
|
||||
102
skyscraper8.Tests/AstraBarkerTransponderTests.cs
Normal file
102
skyscraper8.Tests/AstraBarkerTransponderTests.cs
Normal file
@ -0,0 +1,102 @@
|
||||
using skyscraper5.Mpeg2;
|
||||
using skyscraper5.Skyscraper.IO;
|
||||
using skyscraper5.Skyscraper.Scraper.StreamAutodetection.Contestants;
|
||||
using skyscraper8.Ses;
|
||||
using skyscraper8.Tests.ClassDependencies.AsraBarkerTransponderTests;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace skyscraper8.Tests
|
||||
{
|
||||
public class AstraBarkerTransponderTests
|
||||
{
|
||||
private const string BARKER_TRANSPONDER_FILE_PATH = "C:\\Temp\\Astra1_12604_v_SGT-000000.ts";
|
||||
private Stream GetBarkerTransponder()
|
||||
{
|
||||
FileInfo fi = new FileInfo(BARKER_TRANSPONDER_FILE_PATH);
|
||||
if (!fi.Exists)
|
||||
{
|
||||
Debug.WriteLine(String.Format("Could not find file: {0}", BARKER_TRANSPONDER_FILE_PATH));
|
||||
return null;
|
||||
}
|
||||
return fi.OpenRead();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TestAstraSdt()
|
||||
{
|
||||
Stream stream = GetBarkerTransponder();
|
||||
if (stream == null)
|
||||
return;
|
||||
|
||||
SdtContestant contestant = new SdtContestant(0x002d);
|
||||
|
||||
TsDescriptorUnpacker descriptorUnpacker = TsDescriptorUnpacker.GetInstance();
|
||||
for (byte i = 0x80; i < 0xfe; i++)
|
||||
{
|
||||
descriptorUnpacker.SetUserDefined(i, true);
|
||||
}
|
||||
descriptorUnpacker.SetUserDefined(0xfe, true);
|
||||
|
||||
TsContext tsContext = new TsContext();
|
||||
tsContext.FilterChain = new List<skyscraper5.src.Mpeg2.PacketFilter.IPacketFilter>();
|
||||
tsContext.FilterChain.Add(new DummyFilter());
|
||||
tsContext.RegisterPacketProcessor(0x002d, contestant.PacketProcessor);
|
||||
|
||||
byte[] buffer = new byte[188];
|
||||
while (stream.GetAvailableBytes() >= 188)
|
||||
{
|
||||
stream.Read(buffer, 0, 188);
|
||||
tsContext.PushPacket(buffer);
|
||||
if (contestant.Score >= 10)
|
||||
break;
|
||||
}
|
||||
stream.Close();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TestAstraLcn()
|
||||
{
|
||||
Stream stream = GetBarkerTransponder();
|
||||
if (stream == null)
|
||||
return;
|
||||
|
||||
SgtCandidate contestant = new SgtCandidate(0x0777);
|
||||
SgtCandidate contestant2 = new SgtCandidate(0x0776);
|
||||
|
||||
TsDescriptorUnpacker descriptorUnpacker = TsDescriptorUnpacker.GetInstance();
|
||||
for (byte i = 0x80; i < 0xfe; i++)
|
||||
{
|
||||
descriptorUnpacker.SetUserDefined(i, true);
|
||||
}
|
||||
descriptorUnpacker.SetUserDefined(0xfe, true);
|
||||
|
||||
TsContext tsContext = new TsContext();
|
||||
tsContext.FilterChain = new List<skyscraper5.src.Mpeg2.PacketFilter.IPacketFilter>();
|
||||
tsContext.FilterChain.Add(new DummyFilter());
|
||||
tsContext.RegisterPacketProcessor(0x0777, contestant.PacketProcessor);
|
||||
tsContext.RegisterPacketProcessor(0x0776, contestant2.PacketProcessor);
|
||||
|
||||
byte[] buffer = new byte[188];
|
||||
while (stream.GetAvailableBytes() >= 188)
|
||||
{
|
||||
stream.Read(buffer, 0, 188);
|
||||
tsContext.PushPacket(buffer);
|
||||
bool winnerA = contestant.Score >= 10;
|
||||
bool winnerB = contestant2.Score >= 10;
|
||||
if (winnerA)
|
||||
{
|
||||
if (winnerB)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
stream.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,125 +0,0 @@
|
||||
using System.IO;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using skyscraper5.Mpeg2;
|
||||
using skyscraper5.Skyscraper.Scraper;
|
||||
using skyscraper5.Skyscraper.Scraper.Storage.InMemory;
|
||||
using skyscraper8.Skyscraper.Scraper.Storage;
|
||||
|
||||
namespace skyscraper8.Tests;
|
||||
|
||||
[TestClass]
|
||||
public class CapturedTests : Feyllure
|
||||
{
|
||||
[TestMethod]
|
||||
public void RussianT2Mi()
|
||||
{
|
||||
FileStream streamSample = GetStreamSample("express_3928L_t2mi.ts");
|
||||
ProcessSample(streamSample);
|
||||
streamSample.Close();
|
||||
//42931 uncovered
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Simmin()
|
||||
{
|
||||
FileStream streamSample = GetStreamSample("thor_11049v_simmin-radiomidun.ts");
|
||||
ProcessSample(streamSample);
|
||||
streamSample.Close();
|
||||
//36611 uncovered
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void GseDab()
|
||||
{
|
||||
FileStream streamSample = GetStreamSample("thor_10717v_gse-dab.ts");
|
||||
ProcessSample(streamSample);
|
||||
streamSample.Close();
|
||||
//36446 uncovered
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void SouthAmericanNip()
|
||||
{
|
||||
FileStream streamSample = GetStreamSample("argentinian-dvb-nip-000000.ts");
|
||||
ProcessSample(streamSample);
|
||||
streamSample.Close();
|
||||
//35222
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void GseNip()
|
||||
{
|
||||
FileStream streamSample = GetStreamSample("astra1_12441v_gse-nip.ts");
|
||||
ProcessSample(streamSample);
|
||||
streamSample.Close();
|
||||
//34545
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void GseNip2()
|
||||
{
|
||||
FileStream streamSample = GetStreamSample("astra1_11141h_gse_nip.ts");
|
||||
ProcessSample(streamSample);
|
||||
streamSample.Close();
|
||||
//34462
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void TsNipIncludingLegacyChannel()
|
||||
{
|
||||
FileStream streamSample = GetStreamSample("hotbird_12380v_nip.ts");
|
||||
ProcessSample(streamSample);
|
||||
streamSample.Close();
|
||||
//33518
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void TsNip()
|
||||
{
|
||||
FileStream streamSample = GetStreamSample("hotbird_12226v_nip.ts");
|
||||
ProcessSample(streamSample);
|
||||
streamSample.Close();
|
||||
//33518
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void GseRcs2()
|
||||
{
|
||||
FileStream streamSample = GetStreamSample("telstar12v-bfbs-000000.ts");
|
||||
ProcessSample(streamSample);
|
||||
streamSample.Close();
|
||||
//32559
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void BadrDvbSis()
|
||||
{
|
||||
FileStream streamSample = GetStreamSample("badr_12563v_dvb-sis.ts");
|
||||
ProcessSample(streamSample);
|
||||
streamSample.Close();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Eutelsat5DvbSis()
|
||||
{
|
||||
FileStream streamSample = GetStreamSample("eutelsat5_12522v_dvb-sis.ts");
|
||||
ProcessSample(streamSample);
|
||||
streamSample.Close();
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void ProcessSample(Stream sample)
|
||||
{
|
||||
TsContext ts = new TsContext();
|
||||
|
||||
InMemoryScraperStorageFactory inMemoryStorageFactory = new InMemoryScraperStorageFactory();
|
||||
DataStorage dataStorage = inMemoryStorageFactory.CreateDataStorage();
|
||||
|
||||
NullObjectStorage nullObjectStorage = new NullObjectStorage();
|
||||
|
||||
SkyscraperContext context = new SkyscraperContext(ts, dataStorage, nullObjectStorage);
|
||||
context.InitalizeFilterChain();
|
||||
context.IngestFromStream(sample);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
using skyscraper5.Mpeg2;
|
||||
using skyscraper5.src.Mpeg2.PacketFilter;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace skyscraper8.Tests.ClassDependencies.AsraBarkerTransponderTests
|
||||
{
|
||||
internal class DummyFilter : IPacketFilter
|
||||
{
|
||||
public bool PassPacket(TsPacket packet)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
using skyscraper5.Docsis;
|
||||
using skyscraper5.Docsis.MacManagement;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace skyscraper8.Tests.ClassDependencies.DocsisTests
|
||||
{
|
||||
internal class DocsisEventHandlerImpl : IDocsisEventHandler
|
||||
{
|
||||
public void OnCmtsTimestamp(PhysicalAddress source, uint timing)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void OnDownstreamChannel(PhysicalAddress physicalAddress, MacDomainDescriptor.DownstreamActiveChannel downstreamActiveChannel)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void OnLearnedIpFromMac(PhysicalAddress arpHeaderSenderHardwareAddress, IPAddress arpHeaderSenderProtocolAddress)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void OnParticipantDetected(PhysicalAddress pa)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void OnUpstreamChannel(UpstreamChannelDescriptor mmm)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,24 +1,38 @@
|
||||
using System;
|
||||
using skyscraper5;
|
||||
using skyscraper5.Docsis;
|
||||
using skyscraper5.Docsis.AnnexC;
|
||||
using skyscraper5.Docsis.MacManagement;
|
||||
using skyscraper5.Mpeg2;
|
||||
using skyscraper5.Skyscraper.Plugins;
|
||||
using skyscraper5.Skyscraper.Scraper;
|
||||
using skyscraper5.Skyscraper.Scraper.Storage;
|
||||
using skyscraper5.Skyscraper.Scraper.Storage.Filesystem;
|
||||
using skyscraper5.Skyscraper.Scraper.Storage.InMemory;
|
||||
using skyscraper8.Skyscraper.IO;
|
||||
using skyscraper8.Tests.ClassDependencies.DocsisTests;
|
||||
using skyscraper8.Tests.Properties;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Net.NetworkInformation;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit.Sdk;
|
||||
|
||||
namespace skyscraper8.Tests.ResourceTests
|
||||
namespace skyscraper8.Tests
|
||||
{
|
||||
[TestClass]
|
||||
public class DocsisTests : Feyllure
|
||||
public class DocsisTests
|
||||
{
|
||||
[TestMethod]
|
||||
[Fact]
|
||||
public void ModemCapabilitiesEncoding()
|
||||
{
|
||||
byte[] buffer = Resources1.ModemCapabilitiesEncodingTest;
|
||||
byte[] buffer = Resources.ModemCapabilitiesEncodingTest;
|
||||
ModemCapabilitiesEncoding modemCapabilitiesEncoding = new ModemCapabilitiesEncoding(buffer);
|
||||
Assert.IsTrue(modemCapabilitiesEncoding.Valid);
|
||||
Assert.True(modemCapabilitiesEncoding.Valid);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Fact]
|
||||
public void MultipartRegistrationResponse()
|
||||
{
|
||||
Random rng = new Random();
|
||||
@ -31,18 +45,18 @@ namespace skyscraper8.Tests.ResourceTests
|
||||
rng.NextBytes(targetBuffer);
|
||||
PhysicalAddress target = new PhysicalAddress(targetBuffer);
|
||||
|
||||
byte[] buffer = Resources1.MultipartRegistrationResponseTest;
|
||||
byte[] buffer = Properties.Resources.MultipartRegistrationResponseTest;
|
||||
T45_V4_MultipartRegistrationResponse test = new T45_V4_MultipartRegistrationResponse(source, target, buffer);
|
||||
Assert.IsTrue(test.Valid);
|
||||
Assert.True(test.Valid);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Fact]
|
||||
public void MacManagement_4_45()
|
||||
{
|
||||
NullDocsisEventHandler docsisEventHandler = new NullDocsisEventHandler();
|
||||
DocsisEventHandlerImpl docsisEventHandler = new DocsisEventHandlerImpl();
|
||||
DocsisEnvironment environment = new DocsisEnvironment(docsisEventHandler);
|
||||
|
||||
byte[] testPayload = Resources1.PushMacManagementMessage_Version4_Type45;
|
||||
byte[] testPayload = Resources.PushMacManagementMessage_Version4_Type45;
|
||||
|
||||
Random rng = new Random();
|
||||
byte[] sourceBuffer = new byte[6];
|
||||
@ -56,10 +70,10 @@ namespace skyscraper8.Tests.ResourceTests
|
||||
environment.PushMacManagementMessage(testPayload, 4, 45, source, target, testPayload);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Fact]
|
||||
public void InvalidUpstreamChannelDescriptorTest()
|
||||
{
|
||||
byte[] testPayload = Resources1.UpstreamChannelDescriptorTest;
|
||||
byte[] testPayload = Resources.UpstreamChannelDescriptorTest;
|
||||
|
||||
Random rng = new Random();
|
||||
byte[] sourceBuffer = new byte[6];
|
||||
@ -71,19 +85,19 @@ namespace skyscraper8.Tests.ResourceTests
|
||||
PhysicalAddress target = new PhysicalAddress(targetBuffer);
|
||||
|
||||
UpstreamChannelDescriptor ucd = new UpstreamChannelDescriptor(source, target, testPayload);
|
||||
Assert.IsFalse(ucd.Valid);
|
||||
Assert.False(ucd.Valid);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Fact]
|
||||
public void TransmitChannelConfigurationObjectTest()
|
||||
{
|
||||
byte[] testPayload = Resources1.TransmitChannelConfigurationObject;
|
||||
byte[] testPayload = Resources.TransmitChannelConfigurationObject;
|
||||
|
||||
CommonTlvEncodingObject.TransmitChannelConfigurationObject child = new CommonTlvEncodingObject.TransmitChannelConfigurationObject(testPayload);
|
||||
Assert.IsTrue(child.Valid);
|
||||
Assert.True(child.Valid);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Fact]
|
||||
public void MultipartRegistrationResponse2()
|
||||
{
|
||||
Random rng = new Random();
|
||||
@ -96,27 +110,9 @@ namespace skyscraper8.Tests.ResourceTests
|
||||
rng.NextBytes(targetBuffer);
|
||||
PhysicalAddress target = new PhysicalAddress(targetBuffer);
|
||||
|
||||
byte[] buffer = Resources1.MultipartRegistrationResponseTest2;
|
||||
byte[] buffer = Properties.Resources.MultipartRegistrationResponseTest2;
|
||||
T45_V4_MultipartRegistrationResponse test = new T45_V4_MultipartRegistrationResponse(source, target, buffer);
|
||||
Assert.IsTrue(test.Valid);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void OffsetBreakerTest()
|
||||
{
|
||||
byte[] blob = Resources1.ranging_response_test;
|
||||
Random rng = new Random();
|
||||
|
||||
byte[] sourceMacBuffer = new byte[6];
|
||||
rng.NextBytes(sourceMacBuffer);
|
||||
PhysicalAddress sourceAddress = new PhysicalAddress(sourceMacBuffer);
|
||||
|
||||
byte[] targetMacBuffer = new byte[6];
|
||||
rng.NextBytes(targetMacBuffer);
|
||||
PhysicalAddress targetAddress = new PhysicalAddress(targetMacBuffer);
|
||||
|
||||
RangingResponse rangingResponse = new RangingResponse(sourceAddress, targetAddress, blob);
|
||||
Assert.IsTrue(rangingResponse.Valid);
|
||||
Assert.True(test.Valid);
|
||||
}
|
||||
}
|
||||
}
|
||||
69
skyscraper8.Tests/DocsisTestsLong.cs
Normal file
69
skyscraper8.Tests/DocsisTestsLong.cs
Normal file
@ -0,0 +1,69 @@
|
||||
using skyscraper5.Mpeg2;
|
||||
using skyscraper5.Skyscraper.Scraper.Storage.Filesystem;
|
||||
using skyscraper5.Skyscraper.Scraper.Storage.InMemory;
|
||||
using skyscraper5.Skyscraper.Scraper.Storage;
|
||||
using skyscraper5.Skyscraper.Scraper;
|
||||
using skyscraper5;
|
||||
using skyscraper8.Skyscraper.IO;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using skyscraper8.Skyscraper.Scraper.Storage;
|
||||
|
||||
namespace skyscraper8.Tests
|
||||
{
|
||||
public class DocsisTestsLong
|
||||
{
|
||||
[Fact]
|
||||
public void TestLongBoiSingleStreams()
|
||||
{
|
||||
DirectoryInfo di = new DirectoryInfo("D:\\DocsisDemo");
|
||||
if (!di.Exists)
|
||||
{
|
||||
Debug.WriteLine("Files not available!");
|
||||
return;
|
||||
}
|
||||
|
||||
FilesystemScraperStorageFactory storageFactory = new FilesystemScraperStorageFactory();
|
||||
storageFactory.Directory = "docsis_longboi";
|
||||
|
||||
Passing passing = new Passing();
|
||||
passing.DataStorage = storageFactory.CreateDataStorage();
|
||||
passing.MassImportDirectory(di);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TestM3u8Stream()
|
||||
{
|
||||
FileInfo docsisM3u8 = new FileInfo("D:\\DocsisDemo\\docsis.m3u8");
|
||||
if (!docsisM3u8.Exists)
|
||||
{
|
||||
Debug.WriteLine("File not available!");
|
||||
return;
|
||||
}
|
||||
|
||||
FileInfo alreadyTested = new FileInfo("docsis_m3u8_test.complete");
|
||||
if (alreadyTested.Exists)
|
||||
{
|
||||
Debug.WriteLine("Hello!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
M3U8Stream m3u8 = new M3U8Stream(docsisM3u8.FullName);
|
||||
|
||||
TsContext tsContext = new TsContext();
|
||||
InMemoryScraperStorageFactory storageFactory = new InMemoryScraperStorageFactory();
|
||||
DataStorage scraperStorage = storageFactory.CreateDataStorage();
|
||||
SkyscraperContext skyscraperContext = new SkyscraperContext(tsContext, scraperStorage, null);
|
||||
skyscraperContext.InitalizeFilterChain();
|
||||
skyscraperContext.IngestFromStream(m3u8);
|
||||
|
||||
File.WriteAllText("docsis_m3u8_test.complete", "1");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,193 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using Allure.Net.Commons;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using TestResult = Allure.Net.Commons.TestResult;
|
||||
|
||||
namespace skyscraper8.Tests;
|
||||
|
||||
[TestClass]
|
||||
public class Feyllure
|
||||
{
|
||||
public TestContext TestContext { get; set; }
|
||||
|
||||
protected static readonly AllureLifecycle Allure = AllureLifecycle.Instance;
|
||||
|
||||
private bool assemblyWasInited;
|
||||
private void AssemblyInit(TestContext context)
|
||||
{
|
||||
// Ensure allure-results exists
|
||||
var resultsDir = Allure.ResultsDirectory;
|
||||
Directory.CreateDirectory(resultsDir);
|
||||
|
||||
var envFile = Path.Combine(resultsDir, "environment.properties");
|
||||
|
||||
using (var writer = new StreamWriter(envFile))
|
||||
{
|
||||
writer.WriteLine($"SkyscraperRelease={VersionInfo.GetPublicReleaseNumber()}");
|
||||
writer.WriteLine($"SkyscraperCodeVersion={VersionInfo.GetCurrentAssemblyDisplayVersion()}");
|
||||
writer.WriteLine($"OS={RuntimeInformation.OSDescription}");
|
||||
writer.WriteLine($".NET={Environment.Version}");
|
||||
writer.WriteLine($"Machine={Environment.MachineName}");
|
||||
writer.WriteLine($"User={Environment.UserName}");
|
||||
writer.WriteLine($"Framework={System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription}");
|
||||
writer.WriteLine($"BuildDate={DateTime.UtcNow:yyyy-MM-dd HH:mm:ss}");
|
||||
}
|
||||
|
||||
var executorFile = Path.Combine(resultsDir, "executor.json");
|
||||
var executorInfo = new
|
||||
{
|
||||
name = Environment.MachineName,
|
||||
buildName = "My build name",
|
||||
buildUrl = "http://127.0.0.2",
|
||||
};
|
||||
var executorJson = Newtonsoft.Json.JsonConvert.SerializeObject(executorInfo);
|
||||
File.WriteAllText(executorFile, executorJson);
|
||||
}
|
||||
|
||||
[TestInitialize]
|
||||
public void Setup()
|
||||
{
|
||||
if (!assemblyWasInited){
|
||||
AssemblyInit(TestContext);
|
||||
assemblyWasInited = true;
|
||||
}
|
||||
var testName = TestContext.TestName;
|
||||
var fqClass = TestContext.FullyQualifiedTestClassName;
|
||||
|
||||
// Extract namespace and class name
|
||||
var lastDot = fqClass.LastIndexOf('.');
|
||||
var ns = lastDot > 0 ? fqClass.Substring(0, lastDot) : "";
|
||||
var cls = lastDot > 0 ? fqClass.Substring(lastDot + 1) : fqClass;
|
||||
|
||||
TestResult testResult = new TestResult();
|
||||
testResult.uuid = Guid.NewGuid().ToString();
|
||||
testResult.name = testName;
|
||||
testResult.fullName = String.Format("{0}.{1}", TestContext.FullyQualifiedTestClassName, testName);
|
||||
testResult.labels = new List<Label>()
|
||||
{
|
||||
//Packages Tab
|
||||
new Label { name = "package", value = ns},
|
||||
new Label { name = "testClass", value = cls},
|
||||
new Label { name = "testMethod", value = testName},
|
||||
|
||||
//Suites tab
|
||||
new Label { name = "parentSuite", value = ns},
|
||||
new Label { name = "suite", value = cls},
|
||||
};
|
||||
|
||||
Allure.StartTestCase(testResult);
|
||||
|
||||
descriptionWriter = null;
|
||||
}
|
||||
|
||||
[TestCleanup]
|
||||
public void TearDown()
|
||||
{
|
||||
switch (TestContext.CurrentTestOutcome)
|
||||
{
|
||||
case UnitTestOutcome.Passed:
|
||||
Allure.UpdateTestCase(tc => tc.status = Status.passed);
|
||||
break;
|
||||
case UnitTestOutcome.Failed:
|
||||
Allure.UpdateTestCase(tc => tc.status = Status.failed);
|
||||
break;
|
||||
case UnitTestOutcome.Inconclusive:
|
||||
Allure.UpdateTestCase(tc => tc.status = Status.skipped);
|
||||
Print("\n\n" + TestContext.TestException.ToString());
|
||||
break;
|
||||
default:
|
||||
StepResult stepResult = new StepResult();
|
||||
stepResult.name = String.Format("Current Test Outcome: {0}", TestContext.CurrentTestOutcome);;
|
||||
Allure.UpdateTestCase(tc =>
|
||||
{
|
||||
tc.status = Status.skipped;
|
||||
tc.steps.Add(stepResult);
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
if (descriptionWriter != null)
|
||||
{
|
||||
Allure.UpdateTestCase(tc => { tc.description = descriptionWriter.ToString(); });
|
||||
}
|
||||
|
||||
Allure.StopTestCase();
|
||||
Allure.WriteTestCase();
|
||||
}
|
||||
|
||||
private StringWriter descriptionWriter;
|
||||
public void Print(string message, params object[] args)
|
||||
{
|
||||
if (descriptionWriter == null)
|
||||
descriptionWriter = new StringWriter();
|
||||
string formattedMessage = String.Format(message, args);
|
||||
Console.WriteLine(formattedMessage);
|
||||
descriptionWriter.WriteLine(formattedMessage);
|
||||
}
|
||||
|
||||
private DirectoryInfo testsuitePath;
|
||||
protected DirectoryInfo GetTestsuitePath()
|
||||
{
|
||||
Print("Checking whether skyscraper-testsuite exists...");
|
||||
if (Directory.Exists("skyscraper-testsuite"))
|
||||
{
|
||||
testsuitePath = new DirectoryInfo("skyscraper8-testsuite");
|
||||
return testsuitePath;
|
||||
}
|
||||
|
||||
Print("Checking TESTSUITE_PATH...");
|
||||
string directory = Environment.GetEnvironmentVariable("TESTSUITE_PATH");
|
||||
if (!string.IsNullOrEmpty(directory))
|
||||
{
|
||||
testsuitePath = new DirectoryInfo(directory);
|
||||
return testsuitePath;
|
||||
}
|
||||
|
||||
FileInfo pointerFile = new FileInfo("skyscraper8-testsuite-path.txt");
|
||||
Print("Checking {0}...",pointerFile.FullName);
|
||||
if (File.Exists(pointerFile.FullName))
|
||||
{
|
||||
string readAllText = File.ReadAllText(pointerFile.FullName);
|
||||
readAllText = readAllText.Trim();
|
||||
testsuitePath = new DirectoryInfo(readAllText);
|
||||
return testsuitePath;
|
||||
}
|
||||
|
||||
Assert.Inconclusive("Could not find the test suite path.");
|
||||
return null;
|
||||
}
|
||||
|
||||
protected FileStream GetStreamSample(string streamName)
|
||||
{
|
||||
DirectoryInfo testsuitePath = GetTestsuitePath();
|
||||
string combine = Path.Combine(testsuitePath.FullName, streamName);
|
||||
FileInfo result = new FileInfo(combine);
|
||||
if (!result.Exists)
|
||||
{
|
||||
Assert.Inconclusive(String.Format("Could not find {0}",result.FullName));
|
||||
return null;
|
||||
}
|
||||
|
||||
return result.OpenRead();
|
||||
}
|
||||
|
||||
protected void AssertTargetInvocation<T>(Action action)
|
||||
where T: Exception
|
||||
{
|
||||
Assert.Throws<T>(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
action();
|
||||
}
|
||||
catch (TargetInvocationException tie)
|
||||
{
|
||||
throw tie.InnerException;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -1,35 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using skyscraper5.Skyscraper;
|
||||
using skyscraper8.Skyscraper.Scraper.Storage.Tar;
|
||||
|
||||
namespace skyscraper8.Tests;
|
||||
|
||||
[TestClass]
|
||||
public class IntegrationTests
|
||||
{
|
||||
[TestMethod]
|
||||
public void CreateTarArchive()
|
||||
{
|
||||
string filename = String.Format("{0}.tar", DateTime.Now.ToUnixTime());
|
||||
FileInfo fi = new FileInfo(filename);
|
||||
FileStream fileStream = fi.Open(FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.Read);
|
||||
fi.Refresh();
|
||||
Assert.IsTrue(fi.Exists);
|
||||
|
||||
Random rng = new Random();
|
||||
|
||||
TarArchive tar = new TarArchive(fileStream);
|
||||
for (int i = 0; i < 42; i++)
|
||||
{
|
||||
filename = String.Format("{0}.bin", i);
|
||||
|
||||
int randomSize = rng.Next(4096);
|
||||
byte[] buffer = new byte[randomSize];
|
||||
rng.NextBytes(buffer);
|
||||
|
||||
tar.WriteEntry(filename, buffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
100
skyscraper8.Tests/Properties/Resources.Designer.cs
generated
100
skyscraper8.Tests/Properties/Resources.Designer.cs
generated
@ -59,5 +59,105 @@ namespace skyscraper8.Tests.Properties {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] ModemCapabilitiesEncodingTest {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ModemCapabilitiesEncodingTest", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] MultipartRegistrationResponseTest {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("MultipartRegistrationResponseTest", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] MultipartRegistrationResponseTest2 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("MultipartRegistrationResponseTest2", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] PushMacManagementMessage_Version4_Type45 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("PushMacManagementMessage_Version4_Type45", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] ranging_response_test {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ranging_response_test", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] test_1packet_01 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("test-1packet-01", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] test_2packets_02_03 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("test-2packets-02-03", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] test_3packets_04_05_06 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("test-3packets-04-05-06", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] TransmitChannelConfigurationObject {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("TransmitChannelConfigurationObject", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] UpstreamChannelDescriptorTest {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("UpstreamChannelDescriptorTest", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,101 +1,151 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
Version 1.3
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="ModemCapabilitiesEncodingTest" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ModemCapabilitiesEncodingTest.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="MultipartRegistrationResponseTest" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\T45_V4_MultipartRegistrationResponseTest.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="PushMacManagementMessage_Version4_Type45" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\PushMacManagementMessage_Version4_Type45.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="ranging_response_test" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ranging_response_test.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="MultipartRegistrationResponseTest2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\T45_V4_MultipartRegistrationResponseTest2.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="test-1packet-01" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\test-1packet-01.ts;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="test-2packets-02-03" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\test-2packets-02-03.ts;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="test-3packets-04-05-06" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\test-3packets-04-05-06.ts;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="TransmitChannelConfigurationObject" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\TransmitChannelConfigurationObject.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="UpstreamChannelDescriptorTest" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\UpstreamChannelDescriptorTest.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
||||
28
skyscraper8.Tests/RangingResponseTest.cs
Normal file
28
skyscraper8.Tests/RangingResponseTest.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using skyscraper5.Docsis.MacManagement;
|
||||
using System.Net.NetworkInformation;
|
||||
using skyscraper8.Tests.Properties;
|
||||
|
||||
namespace skyscraper8.Tests
|
||||
{
|
||||
public class RangingResponseTest
|
||||
{
|
||||
[Fact]
|
||||
public void OffsetBreakerTest()
|
||||
{
|
||||
|
||||
byte[] blob = Resources.ranging_response_test;
|
||||
Random rng = new Random();
|
||||
|
||||
byte[] sourceMacBuffer = new byte[6];
|
||||
rng.NextBytes(sourceMacBuffer);
|
||||
PhysicalAddress sourceAddress = new PhysicalAddress(sourceMacBuffer);
|
||||
|
||||
byte[] targetMacBuffer = new byte[6];
|
||||
rng.NextBytes(targetMacBuffer);
|
||||
PhysicalAddress targetAddress = new PhysicalAddress(targetMacBuffer);
|
||||
|
||||
RangingResponse rangingResponse = new RangingResponse(sourceAddress, targetAddress, blob);
|
||||
Assert.True(rangingResponse.Valid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,33 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using skyscraper5.Mpeg2;
|
||||
|
||||
namespace skyscraper8.Tests.ResourceTests;
|
||||
|
||||
[TestClass]
|
||||
public class GsType1SanityTest : Feyllure
|
||||
{
|
||||
[TestMethod]
|
||||
public void CheckBfbsCrc()
|
||||
{
|
||||
byte[] blob = Resources1.Frame00001343_TSGS1_MIS000_SYNC001;
|
||||
MemoryStream ms = new MemoryStream(blob, false);
|
||||
bool result = DvbCrc32.ValidateCrc(ms, 0, (int)ms.Length);
|
||||
Assert.IsTrue(result);
|
||||
|
||||
blob = Resources1.Frame00000008_TSGS1_MIS000_SYNC001;
|
||||
ms = new MemoryStream(blob, false);
|
||||
result = DvbCrc32.ValidateCrc(ms, 0, (int)ms.Length);
|
||||
Assert.IsTrue(result);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void CheckBfbsCrcSpan()
|
||||
{
|
||||
byte[] blob = Resources1.Frame00000012_TSGS1_MIS000_SYNC001;
|
||||
ReadOnlySpan<byte> span = new ReadOnlySpan<byte>(blob);
|
||||
bool result = DvbCrc32.ValidateCrc(span);
|
||||
Assert.IsTrue(result);
|
||||
}
|
||||
}
|
||||
@ -1,25 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using skyscraper8.Ietf.Rfc4566_SDP;
|
||||
|
||||
namespace skyscraper8.Tests.ResourceTests
|
||||
{
|
||||
[TestClass]
|
||||
public class SdpTest : Feyllure
|
||||
{
|
||||
[TestMethod]
|
||||
public void TestSdpParser()
|
||||
{
|
||||
MemoryStream ms = new MemoryStream(Resources1.sdpTest, false);
|
||||
Assert.IsTrue(SDP.IsSDP(ms));
|
||||
|
||||
SDP loaded = SDP.Load(ms);
|
||||
Assert.IsNotNull(loaded);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,19 +0,0 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using skyscraper8.GS;
|
||||
using skyscraper8.GS.GSE_RollingSyncByte;
|
||||
using skyscraper8.GSE;
|
||||
|
||||
namespace skyscraper8.Tests.ResourceTests;
|
||||
|
||||
[TestClass]
|
||||
public class Ses12GseTest
|
||||
{
|
||||
[TestMethod]
|
||||
public void TestShortPdu()
|
||||
{
|
||||
byte[] datasource = Resources1.Frame00000357_TSGS1_MIS000_SYNC184;
|
||||
GsContextDto dto = new GsContextDto();
|
||||
GseWithRollingSyncByteReader reader = new GseWithRollingSyncByteReader(dto);
|
||||
reader.PushFrame(new BBHeader(new byte[10], 0), datasource);
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,10 +0,0 @@
|
||||
v=0
|
||||
o=enensys Announcement-BM-SC 3962468565 IN IP4 10.10.10.20
|
||||
s=Announcement delivery session
|
||||
t=0 0
|
||||
a=mbms-mode:broadcast-mbsfn 61712
|
||||
a=source-filter: incl IN IP4 * 10.10.10.20
|
||||
a=flute-tsi:9
|
||||
m=application 50001 FLUTE/UDP 0
|
||||
c=IN IP4 224.0.2.20/10
|
||||
b=AS:200
|
||||
153
skyscraper8.Tests/Resources1.Designer.cs
generated
153
skyscraper8.Tests/Resources1.Designer.cs
generated
@ -1,153 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace skyscraper8.Tests {
|
||||
using System;
|
||||
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources1 {
|
||||
|
||||
private static System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources1() {
|
||||
}
|
||||
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.Equals(null, resourceMan)) {
|
||||
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("skyscraper8.Tests.Resources1", typeof(Resources1).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
internal static byte[] ModemCapabilitiesEncodingTest {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ModemCapabilitiesEncodingTest", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static byte[] MultipartRegistrationResponseTest {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("MultipartRegistrationResponseTest", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static byte[] PushMacManagementMessage_Version4_Type45 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("PushMacManagementMessage_Version4_Type45", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static byte[] ranging_response_test {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ranging_response_test", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static byte[] MultipartRegistrationResponseTest2 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("MultipartRegistrationResponseTest2", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static byte[] test_1packet_01 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("test-1packet-01", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static byte[] test_2packets_02_03 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("test-2packets-02-03", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static byte[] test_3packets_04_05_06 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("test-3packets-04-05-06", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static byte[] TransmitChannelConfigurationObject {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("TransmitChannelConfigurationObject", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static byte[] UpstreamChannelDescriptorTest {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("UpstreamChannelDescriptorTest", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static byte[] Frame00001343_TSGS1_MIS000_SYNC001 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Frame00001343_TSGS1_MIS000_SYNC001", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static byte[] Frame00000008_TSGS1_MIS000_SYNC001 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Frame00000008_TSGS1_MIS000_SYNC001", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static byte[] Frame00000012_TSGS1_MIS000_SYNC001 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Frame00000012_TSGS1_MIS000_SYNC001", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static byte[] sdpTest {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("sdpTest", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static byte[] Frame00000357_TSGS1_MIS000_SYNC184 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Frame00000357_TSGS1_MIS000_SYNC184", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,166 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="ModemCapabilitiesEncodingTest" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\ModemCapabilitiesEncodingTest.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="MultipartRegistrationResponseTest" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\T45_V4_MultipartRegistrationResponseTest.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="PushMacManagementMessage_Version4_Type45" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\PushMacManagementMessage_Version4_Type45.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="ranging_response_test" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\ranging_response_test.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="MultipartRegistrationResponseTest2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\T45_V4_MultipartRegistrationResponseTest2.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="test-1packet-01" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\test-1packet-01.ts;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="test-2packets-02-03" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\test-2packets-02-03.ts;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="test-3packets-04-05-06" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\test-3packets-04-05-06.ts;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="TransmitChannelConfigurationObject" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\TransmitChannelConfigurationObject.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="UpstreamChannelDescriptorTest" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\UpstreamChannelDescriptorTest.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="Frame00001343_TSGS1_MIS000_SYNC001" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\Frame00001343_TSGS1_MIS000_SYNC001.bbf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="Frame00000008_TSGS1_MIS000_SYNC001" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\Frame00000008_TSGS1_MIS000_SYNC001.bbf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="Frame00000012_TSGS1_MIS000_SYNC001" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\Frame00000012_TSGS1_MIS000_SYNC001.bbf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="sdpTest" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\sdpTest.sdp;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="Frame00000357_TSGS1_MIS000_SYNC184" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\Frame00000357_TSGS1_MIS000_SYNC184.bbframe;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,16 +0,0 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using skyscraper5.Mpeg2;
|
||||
|
||||
namespace skyscraper8.Tests.RootTests;
|
||||
|
||||
|
||||
[TestClass]
|
||||
public class Mpeg2Tests : Feyllure
|
||||
{
|
||||
[TestMethod]
|
||||
public void PsiSectionTest()
|
||||
{
|
||||
PsiSection section = new PsiSection();
|
||||
section.Append(new byte[] { 3 });
|
||||
}
|
||||
}
|
||||
28
skyscraper8.Tests/SanityTests.cs
Normal file
28
skyscraper8.Tests/SanityTests.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using skyscraper5.Skyscraper.IO;
|
||||
|
||||
namespace skyscraper8.Tests
|
||||
{
|
||||
public class SanityTests
|
||||
{
|
||||
[Fact]
|
||||
public void Test15bits()
|
||||
{
|
||||
byte[] bcd = new byte[] { 0xa9, 0x23 };
|
||||
MemoryStream ms = new MemoryStream(bcd);
|
||||
byte readUInt8 = ms.ReadUInt8();
|
||||
|
||||
bool msbSet = (readUInt8 & 0x80) != 0;
|
||||
Assert.True(msbSet);
|
||||
|
||||
int result = ms.ReadUInt8();
|
||||
result <<= 8;
|
||||
result += readUInt8;
|
||||
Assert.Equal(9001, result);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,34 +1,28 @@
|
||||
using System.IO;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using skyscraper5.Mpeg2;
|
||||
using skyscraper5.Mpeg2;
|
||||
using skyscraper5.Skyscraper.Scraper;
|
||||
using skyscraper5.Skyscraper.Scraper.Storage.InMemory;
|
||||
using skyscraper8.Skyscraper.Scraper.Storage;
|
||||
using skyscraper8.Tests.Properties;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace skyscraper8.Tests.ResourceTests
|
||||
namespace skyscraper8.Tests
|
||||
{
|
||||
[TestClass]
|
||||
public class SkyscraperTests : Feyllure
|
||||
public class TsDuckTestPatterns
|
||||
{
|
||||
[TestMethod]
|
||||
[Fact]
|
||||
public void RunTestPatterns()
|
||||
{
|
||||
byte[][] buffers = new byte[][]
|
||||
{
|
||||
Resources1.test_1packet_01,
|
||||
Resources1.test_2packets_02_03,
|
||||
Resources1.test_3packets_04_05_06
|
||||
};
|
||||
byte[][] buffers = new byte[][] { Resources.test_1packet_01, Resources.test_2packets_02_03, Resources.test_3packets_04_05_06 };
|
||||
|
||||
InMemoryScraperStorageFactory imssf = new InMemoryScraperStorageFactory();
|
||||
|
||||
foreach (byte[] buffer in buffers)
|
||||
{
|
||||
TsContext mpeg2 = new TsContext();
|
||||
DataStorage ds = new InMemoryScraperStorageFactory().CreateDataStorage();
|
||||
ObjectStorage os = new NullObjectStorage();
|
||||
|
||||
SkyscraperContext skyscraper = new SkyscraperContext(mpeg2, ds, os);
|
||||
SkyscraperContext skyscraper = new SkyscraperContext(mpeg2, null, null);
|
||||
MemoryStream ms = new MemoryStream(buffer, false);
|
||||
|
||||
skyscraper.InitalizeFilterChain();
|
||||
@ -1,36 +1,42 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Target .NET 8 -->
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
<!-- Mark this as a test project -->
|
||||
<IsPackable>false</IsPackable>
|
||||
<IsTestProject>true</IsTestProject>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- MSTest framework -->
|
||||
<PackageReference Include="Allure.Net.Commons" Version="2.14.1" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="4.0.2" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="4.0.2" />
|
||||
<PackageReference Include="coverlet.collector" Version="6.0.4">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
|
||||
<PackageReference Include="xunit" Version="2.9.3" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xunit.SkippableFact" Version="1.5.23" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\skyscraper8\skyscraper8.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Using Include="Xunit" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Properties\Resources.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="Resources1.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources1.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@ -38,10 +44,6 @@
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Resources1.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources1.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@ -51,6 +51,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "skyscraper5.DNS", "MpePlugi
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "skyscraper5.Gimmicks.IptvCollector", "Gimmicks\skyscraper5.Gimmicks.IptvCollector\skyscraper5.Gimmicks.IptvCollector.csproj", "{8F17668C-623C-F9B3-EAD4-2922E5414B75}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "skyscraper8.Tests", "skyscraper8.Tests\skyscraper8.Tests.csproj", "{84EE9FCD-2C7F-DF84-C1BA-99D018CE9412}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UIs", "UIs", "{E23457C5-3A34-48EE-8107-C91E2C174B2D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "skyscraper5.UI.WindowsForms", "GUIs\skyscraper5.UI\skyscraper5.UI.WindowsForms.csproj", "{46CACA1C-F9B2-2FE0-2068-716F381325E9}"
|
||||
@ -65,8 +67,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "skyscraper8.UI.MonoGame", "
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "skyscraper8.UI.MonoGame.Bridge", "GUIs\skyscraper8.UI.ImGui.MonoGame.Bridge\skyscraper8.UI.MonoGame.Bridge.csproj", "{1A29F6E6-4B6A-DCCD-1DF1-AA8D020E17D2}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "skyscraper8.Tests", "skyscraper8.Tests\skyscraper8.Tests.csproj", "{84EE9FCD-2C7F-DF84-C1BA-99D018CE9412}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -141,6 +141,10 @@ Global
|
||||
{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
|
||||
{84EE9FCD-2C7F-DF84-C1BA-99D018CE9412}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{84EE9FCD-2C7F-DF84-C1BA-99D018CE9412}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{84EE9FCD-2C7F-DF84-C1BA-99D018CE9412}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{84EE9FCD-2C7F-DF84-C1BA-99D018CE9412}.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
|
||||
@ -165,10 +169,6 @@ Global
|
||||
{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
|
||||
{84EE9FCD-2C7F-DF84-C1BA-99D018CE9412}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{84EE9FCD-2C7F-DF84-C1BA-99D018CE9412}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{84EE9FCD-2C7F-DF84-C1BA-99D018CE9412}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@ -1,67 +1,4 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAllureContext_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Fc09614b59cc98c343d268f55e356aaafe85d13755cd5ca217988e9c5362ff_003FAllureContext_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAllureFeatureAttribute_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F405349a6f42433abaa8b1d6d06bb6f21c66899533fa9f9648cb1cde8755143_003FAllureFeatureAttribute_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AArgumentNullException_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003Ff2_003F6872d84e_003FArgumentNullException_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AArray_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F6e_003Fd247db11_003FArray_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAssert_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F053cba69424c47858472194d509c3cdc12bb0_003F37_003F58cc70f4_003FAssert_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAssert_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fa840692e98b74557bc005b38213a22c72dad0_003Fc8_003F58c2e0c9_003FAssert_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAssert_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F62bb4746d7d14dc1cd4274a28788572a7a4641bd3a7d5736479c9697bcb4794_003FAssert_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAssert_002EInconclusive_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F8e305e26401afcd395b5be2da0e23d61432655dc5f2c2e5e6d5bd873bb0cb90_003FAssert_002EInconclusive_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAssert_002EThrowsException_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Fe6930caf46f7fcaa445fdd26a3884170a45a4766298259e7a29bae560adef_003FAssert_002EThrowsException_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ACultureInfo_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F8e_003Fe58e5b4a_003FCultureInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADictionary_00602_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F83_003Fc73c45bc_003FDictionary_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AFastResourceComparer_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F8f_003Ffb4ed86c_003FFastResourceComparer_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AFileInfo_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe1ab690537c44e02a014076312b886b7b2e200_003F5a_003Fcf76af61_003FFileInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AInterop_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003Fea_003F7d70064b_003FInterop_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AList_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F6b_003Fa410ee2c_003FList_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMemberInfo_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003Fce_003F751a2c1f_003FMemberInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMemoryStream_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F0d_003F068af3a6_003FMemoryStream_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMethodBaseInvoker_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F7a_003F86728bdc_003FMethodBaseInvoker_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANotImplementedException_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003Fa3_003F2c4f9089_003FNotImplementedException_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANullable_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F0d_003F6549c49b_003FNullable_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANullAsserts_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F3f4719f7ce375226774d6991a6afc2f6932e58b42fd58ff13c7c03771642e_003FNullAsserts_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AObject_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F55_003F6efc7017_003FObject_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AQueue_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003Fb6_003F498e7c75_003FQueue_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AReadOnlyDictionary_00602_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F0d_003F1270c638_003FReadOnlyDictionary_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AResourceManager_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F0c_003Fb548fbc6_003FResourceManager_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ARuntimeInformation_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F4c_003F5f771d10_003FRuntimeInformation_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ARuntimeResourceSet_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003Fe1_003Ff15f6bbe_003FRuntimeResourceSet_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASafeFileHandle_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003Fc6_003Fd8e0f2f2_003FSafeFileHandle_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASkip_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Fd8c543d93f1559af2ea2be8e9d55839b5bb1a3605f22daa45ea63772e3b4bc_003FSkip_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASR_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F4d_003F7edc51d9_003FSR_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AString_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F2e_003F1a14f40f_003FString_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ATestMethodInfo_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F9ea467e7c7b4671a214143293021e7ec337916b71125d896e17a0b7fc_003FTestMethodInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003Feb_003F3c476997_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe1ab690537c44e02a014076312b886b7b2e200_003F4f_003F7bfc5050_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Ffb63d7b4f026464dbf9b2db60c7f76bc2ac00_003Fbd_003F4080deac_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ATuple_00602_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F9f_003F0d16f921_003FTuple_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/Environment/AssemblyExplorer/XmlDocument/@EntryValue"><AssemblyExplorer>
|
||||
<Assembly Path="/home/schiemas/.dotnet/packs/Microsoft.NETCore.App.Ref/8.0.21/ref/net8.0/System.Windows.dll" />
|
||||
<Assembly Path="/home/schiemas/.nuget/packages/allure.net.commons/2.14.1/lib/netstandard2.0/Allure.Net.Commons.dll" />
|
||||
</AssemblyExplorer></s:String>
|
||||
<s:String x:Key="/Default/Environment/Highlighting/HighlightingSourceSnapshotLocation/@EntryValue">/home/schiemas/.cache/JetBrains/Rider2025.1/resharper-host/temp/Rider/vAny/CoverageData/_skyscraper8.1808907683/Snapshot/snapshot.utdcvr</s:String>
|
||||
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=145b05c0_002D83b0_002D4386_002Db9fb_002De55ec3152557/@EntryIndexedValue"><SessionState ContinuousTestingMode="0" Name="All tests from &lt;skyscraper8.Tests&gt;" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session">
|
||||
<And>
|
||||
<Namespace>skyscraper8.Tests</Namespace>
|
||||
<Project Location="\home\schiemas\RiderProjects\skyscraper8\skyscraper8.Tests" Presentation="&lt;skyscraper8.Tests&gt;" />
|
||||
</And>
|
||||
</SessionState></s:String>
|
||||
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=58c56b00_002Df81e_002D48fd_002Da74f_002Dc8e84271fcf4/@EntryIndexedValue"><SessionState ContinuousTestingMode="0" Name="Continuous Testing" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session">
|
||||
<Project Location="\home\schiemas\RiderProjects\skyscraper8\skyscraper8.Tests" Presentation="&lt;skyscraper8.Tests&gt;" />
|
||||
</SessionState></s:String>
|
||||
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=ce70f33b_002D9024_002D4750_002Da24e_002D78f4e8e5e879/@EntryIndexedValue"><SessionState ContinuousTestingMode="0" IsActive="True" Name="All tests from &lt;skyscraper8.Tests&gt;" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session">
|
||||
<Solution />
|
||||
</SessionState></s:String>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<s:String x:Key="/Default/Profiling/Configurations/=1/@EntryIndexedValue"><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></s:String>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=skyscraper8_002ETests_002FResources1/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/Initialized/@EntryValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/ShowOnlyErrors/@EntryValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UnloadedProject/UnloadedProjects/=46caca1c_002Df9b2_002D2fe0_002D2068_002D716f381325e9_0023skyscraper5_002EUI_002EWindowsForms/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UnloadedProject/UnloadedProjects/=ebb6b1cf_002D2597_002D4962_002Daa31_002D2b42b4c28c7d_0023skyscraper8_002EAnagramViewer/@EntryIndexedValue">True</s:Boolean>
|
||||
</wpf:ResourceDictionary>
|
||||
<s:String x:Key="/Default/Profiling/Configurations/=1/@EntryIndexedValue"><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></s:String></wpf:ResourceDictionary>
|
||||
@ -1,15 +0,0 @@
|
||||
[
|
||||
{
|
||||
"Name": "Neues Profil",
|
||||
"Projects": [
|
||||
{
|
||||
"Path": "IoPlugins\\skyscraper5.IO.StreamReader.RemoteStreamReaderServer\\skyscraper5.IO.StreamReader.RemoteStreamReaderServer.csproj",
|
||||
"Action": "Start"
|
||||
},
|
||||
{
|
||||
"Path": "GUIs\\skyscraper8.UI.ImGui\\skyscraper8.UI.SDL2.csproj",
|
||||
"Action": "Start"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@ -1,23 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace skyscraper8.Abertis
|
||||
{
|
||||
internal class AbertisSubSkyscraperKey
|
||||
{
|
||||
public int Pid { get; }
|
||||
|
||||
public AbertisSubSkyscraperKey(int pid)
|
||||
{
|
||||
Pid = pid;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return String.Format("{0:X4}", Pid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -11,7 +11,7 @@ namespace skyscraper5.Docsis.AnnexC
|
||||
public EthernetLlcPacketClassificationEncoding(byte[] buffer)
|
||||
{
|
||||
MemoryStream ms = new MemoryStream(buffer, false);
|
||||
while (ms.GetAvailableBytes() >= 3)
|
||||
while (ms.GetAvailableBytes() > 3)
|
||||
{
|
||||
byte type = ms.ReadUInt8();
|
||||
ushort length = ms.ReadUInt8();
|
||||
|
||||
@ -149,6 +149,6 @@ namespace skyscraper5.Docsis.AnnexC
|
||||
|
||||
public uint? ServiceFlowIdentifier { get; set; }
|
||||
public EthernetLlcPacketClassificationEncoding EthernetLlcPacketClassificationEncodings { get; }
|
||||
public Ipv6PacketClassificationEncoding Ipv6PacketClassification { get; }
|
||||
internal Ipv6PacketClassificationEncoding Ipv6PacketClassification { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@ using System.Net;
|
||||
|
||||
namespace skyscraper5.Docsis.AnnexC
|
||||
{
|
||||
public class Ipv6PacketClassificationEncoding
|
||||
internal class Ipv6PacketClassificationEncoding
|
||||
{
|
||||
public Ipv6PacketClassificationEncoding(byte[] buffer)
|
||||
{
|
||||
|
||||
@ -12,7 +12,7 @@ namespace skyscraper5.Docsis.AnnexC
|
||||
{
|
||||
private readonly bool? ExpandedUnicastSidSpace;
|
||||
private readonly byte? DpvCapability;
|
||||
private readonly byte? EnergyManagementPreference;
|
||||
private readonly byte EnergyManagementPreference;
|
||||
private byte? UpstreamScQamSymbolRateSupport;
|
||||
private byte? _512MspsUpstreamTransmitScQamChannelSupport;
|
||||
private byte? _256MspsUpstreamTransmitScQamChannelSupport;
|
||||
@ -207,7 +207,7 @@ namespace skyscraper5.Docsis.AnnexC
|
||||
DownstreamFrequencyRangeStarting = 108;
|
||||
else if (v[0] == 0x02)
|
||||
DownstreamFrequencyRangeStarting = 258;
|
||||
else if (v[0] == 0x03)
|
||||
else if (v[0] == 0x003)
|
||||
DownstreamFullDuplex = true;
|
||||
break;
|
||||
case 61:
|
||||
@ -235,7 +235,7 @@ namespace skyscraper5.Docsis.AnnexC
|
||||
break;
|
||||
default:
|
||||
//CM-SP-MULPIv4.0-I01-190815.pdf, page 688
|
||||
throw new NotImplementedException(String.Format("{0} {1}", nameof(ModemCapabilitiesEncoding), type));
|
||||
throw new NotFiniteNumberException(String.Format("{0} {1}", nameof(ModemCapabilitiesEncoding), type));
|
||||
}
|
||||
}
|
||||
Valid = true;
|
||||
@ -268,7 +268,7 @@ namespace skyscraper5.Docsis.AnnexC
|
||||
public byte? TransmitPreEqualizerTapsPerModulationInterval { get; }
|
||||
public byte? NumberOfTransmitEqualizerTaps { get; }
|
||||
public bool? DccSupport { get; }
|
||||
public RangingHoldOffSupport RangingHoldOffSupport { get; }
|
||||
internal RangingHoldOffSupport RangingHoldOffSupport { get; }
|
||||
public bool? L2VPN { get; }
|
||||
public ESafeHostCapability ESafeHostCapability { get; }
|
||||
public bool? DownstreamUnencryptedTrafficFiltering { get; }
|
||||
@ -446,5 +446,5 @@ namespace skyscraper5.Docsis.AnnexC
|
||||
Level5 = 5,
|
||||
NoSpecifiedPerformance = 6,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace skyscraper8.Docsis.AnnexC
|
||||
{
|
||||
public class RangingHoldOffSupport
|
||||
internal class RangingHoldOffSupport
|
||||
{
|
||||
public RangingHoldOffSupport(byte a, byte b, byte c, byte d)
|
||||
{
|
||||
|
||||
@ -27,7 +27,7 @@ namespace skyscraper5.Docsis.AnnexC
|
||||
SimplifiedReceiveChannelConfiguration = new SimplifiedReceiveChannelAssignmentEncoding(v);
|
||||
break;
|
||||
default:
|
||||
throw new NotImplementedException(String.Format("{0} {1}", nameof(ModemCapabilitiesEncoding), type));
|
||||
throw new NotFiniteNumberException(String.Format("{0} {1}", nameof(ModemCapabilitiesEncoding), type));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -59,7 +59,7 @@ namespace skyscraper5.Docsis.AnnexC
|
||||
break;
|
||||
default:
|
||||
//page 728, CM-SP-MULPIv4.0-I01-190815.pdf
|
||||
throw new NotImplementedException(String.Format("{0} {1}", nameof(SimplifiedReceiveChannelAssignmentEncoding), type));
|
||||
throw new NotFiniteNumberException(String.Format("{0} {1}", nameof(SimplifiedReceiveChannelAssignmentEncoding), type));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -339,7 +339,18 @@ namespace skyscraper5.Docsis
|
||||
break;
|
||||
case nameof(PrivacyKeyManagementResponse):
|
||||
PrivacyKeyManagementResponse privacyKeyManagementResponse = (PrivacyKeyManagementResponse)mmm;
|
||||
eventHandler.OnKeyManagementResponse(privacyKeyManagementResponse);
|
||||
switch (privacyKeyManagementResponse.Code)
|
||||
{
|
||||
case 5:
|
||||
//Contains a scrambled authentication key, so not interesting for us
|
||||
break;
|
||||
case 8:
|
||||
//Since the key is encrypted as well, this isn't interesting.
|
||||
break;
|
||||
default:
|
||||
//CM-SP-SECv4.0-I01-190815.pdf page 50
|
||||
throw new NotImplementedException(String.Format("{0}.{1} {2}", nameof(PrivacyKeyManagementResponse), nameof(privacyKeyManagementResponse.Code), privacyKeyManagementResponse.Code));
|
||||
}
|
||||
break;
|
||||
case nameof(DynamicServiceChangeResponse):
|
||||
//Nothing of interesent in here either.
|
||||
@ -351,8 +362,7 @@ namespace skyscraper5.Docsis
|
||||
//not interesting
|
||||
break;
|
||||
case nameof(DynamicServiceAdditionResponse):
|
||||
DynamicServiceAdditionResponse dynamicServiceAdditionResponse = (DynamicServiceAdditionResponse)mmm;
|
||||
eventHandler.OnDynamicServiceAddition(dynamicServiceAdditionResponse.TransactionId, dynamicServiceAdditionResponse.ConfirmationCode, dynamicServiceAdditionResponse.TlvEncodedInformation);
|
||||
//not interesting
|
||||
break;
|
||||
case nameof(DynamicServiceDeletionResponse):
|
||||
//nothing in there
|
||||
|
||||
@ -5,7 +5,6 @@ using System.Net;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using skyscraper5.Docsis.AnnexC;
|
||||
using skyscraper5.Docsis.MacManagement;
|
||||
|
||||
namespace skyscraper5.Docsis
|
||||
@ -17,7 +16,5 @@ namespace skyscraper5.Docsis
|
||||
void OnUpstreamChannel(UpstreamChannelDescriptor mmm);
|
||||
void OnDownstreamChannel(PhysicalAddress physicalAddress, MacDomainDescriptor.DownstreamActiveChannel downstreamActiveChannel);
|
||||
void OnLearnedIpFromMac(PhysicalAddress arpHeaderSenderHardwareAddress, IPAddress arpHeaderSenderProtocolAddress);
|
||||
void OnKeyManagementResponse(PrivacyKeyManagementResponse privacyKeyManagementResponse);
|
||||
void OnDynamicServiceAddition(ushort transactionId, byte confirmationCode, CommonTlvEncodingObject tlvEncodedInformation);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@ using System.IO;
|
||||
|
||||
namespace skyscraper5.Docsis.MacManagement.BaselinePrivacyKeyManagementMessages
|
||||
{
|
||||
public class AuthReply : PrivacyKeyManagementResponse.BpkmMessageObject
|
||||
internal class AuthReply : PrivacyKeyManagementResponse.BpkmMessageObject
|
||||
{
|
||||
public AuthReply(byte[] buffer) : base(buffer)
|
||||
{
|
||||
@ -39,7 +39,7 @@ namespace skyscraper5.Docsis.MacManagement.BaselinePrivacyKeyManagementMessages
|
||||
public byte[] AuthKey { get; private set; }
|
||||
public SaDescriptorObject SaDescriptor { get; private set; }
|
||||
|
||||
public class SaDescriptorObject
|
||||
internal class SaDescriptorObject
|
||||
{
|
||||
public SaDescriptorObject(byte[] buffer)
|
||||
{
|
||||
@ -70,10 +70,10 @@ namespace skyscraper5.Docsis.MacManagement.BaselinePrivacyKeyManagementMessages
|
||||
}
|
||||
}
|
||||
|
||||
public ushort SAID { get; private set; }
|
||||
public SaTypeEnum SaType { get; private set; }
|
||||
public DataEncryptionAlgorithmIdentifiers DataEncryptionAlgorithm { get; private set; }
|
||||
public DataAuthenticationIdentifiers DataAuthenticationAlgorithm { get; private set; }
|
||||
public ushort SAID { get; }
|
||||
public SaTypeEnum SaType { get; }
|
||||
public DataEncryptionAlgorithmIdentifiers DataEncryptionAlgorithm { get; }
|
||||
public DataAuthenticationIdentifiers DataAuthenticationAlgorithm { get; }
|
||||
|
||||
public enum SaTypeEnum
|
||||
{
|
||||
|
||||
@ -8,7 +8,7 @@ using skyscraper5.Skyscraper.IO;
|
||||
|
||||
namespace skyscraper5.Docsis.MacManagement.BaselinePrivacyKeyManagementMessages
|
||||
{
|
||||
public class KeyReply : PrivacyKeyManagementResponse.BpkmMessageObject
|
||||
internal class KeyReply : PrivacyKeyManagementResponse.BpkmMessageObject
|
||||
{
|
||||
public KeyReply(byte[] buffer) : base(buffer)
|
||||
{
|
||||
|
||||
@ -13,7 +13,7 @@ namespace skyscraper5.Docsis.MacManagement
|
||||
{
|
||||
[SkyscraperPlugin]
|
||||
[MacManagementMessageType(1,13)]
|
||||
public class PrivacyKeyManagementResponse : MacManagementMessage
|
||||
internal class PrivacyKeyManagementResponse : MacManagementMessage
|
||||
{
|
||||
public PrivacyKeyManagementResponse(PhysicalAddress source, PhysicalAddress destination, byte[] buffer) : base(source, destination, buffer)
|
||||
{
|
||||
@ -22,11 +22,7 @@ namespace skyscraper5.Docsis.MacManagement
|
||||
Identifier = ms.ReadUInt8();
|
||||
ushort length = ms.ReadUInt16BE();
|
||||
if (length > ms.GetAvailableBytes())
|
||||
{
|
||||
Valid = false;
|
||||
return;
|
||||
}
|
||||
|
||||
byte[] subbuffer = ms.ReadBytes(length);
|
||||
|
||||
switch (Code)
|
||||
@ -56,7 +52,7 @@ namespace skyscraper5.Docsis.MacManagement
|
||||
protected BpkmMessageObject(byte[] buffer)
|
||||
{
|
||||
MemoryStream ms = new MemoryStream(buffer, false);
|
||||
while (ms.GetAvailableBytes() >= 3)
|
||||
while (ms.GetAvailableBytes() > 3)
|
||||
{
|
||||
byte type = ms.ReadUInt8();
|
||||
ushort length = ms.ReadUInt16BE();
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.NetworkInformation;
|
||||
@ -37,7 +36,7 @@ namespace skyscraper5.Docsis.MacManagement
|
||||
Valid = false;
|
||||
return;
|
||||
}
|
||||
if (length == 0 && type != 15 && type != 16)
|
||||
if (length == 0)
|
||||
{
|
||||
Valid = false;
|
||||
return;
|
||||
@ -100,7 +99,8 @@ namespace skyscraper5.Docsis.MacManagement
|
||||
SCdmaPowerHeadroom = v[0];
|
||||
break;
|
||||
case 12:
|
||||
UpstreamChannelAdjustments = new UpstreamChannelAdjustmentsObject(v);
|
||||
byte[] upstreamChannelAdjustmentsBuffer = ms.ReadBytes(length);
|
||||
UpstreamChannelAdjustments = new UpstreamChannelAdjustmentsObject(upstreamChannelAdjustmentsBuffer);
|
||||
break;
|
||||
case 13:
|
||||
T4TimeoutMultiplier = v[0];
|
||||
@ -118,13 +118,13 @@ namespace skyscraper5.Docsis.MacManagement
|
||||
newLen = (ushort)ms.GetAvailableBytes();
|
||||
}
|
||||
v = ms.ReadBytes(newLen);
|
||||
TransmitEqualizationEncodingsForOfdmaChannels result1516 = Parse1516(v);
|
||||
if (type == 15)
|
||||
TransmitEqualizationAdjustForOfdmaChannels = Parse1516(v);
|
||||
else
|
||||
{
|
||||
Debug.Assert(type == 16);
|
||||
else if (type == 16)
|
||||
TransmitEqualizationSetForOfdmaChannels = Parse1516(v);
|
||||
}
|
||||
else
|
||||
throw new NotImplementedException(String.Format("2-byte TLV entry in Ranging Response with ID {0}", type));
|
||||
break;
|
||||
case 17:
|
||||
CommandPower = new CommandPowerObject(v);
|
||||
@ -145,6 +145,11 @@ namespace skyscraper5.Docsis.MacManagement
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (type > 18)
|
||||
{
|
||||
Valid = false;
|
||||
return;
|
||||
}
|
||||
//see CM-SP-MULPIv4.0-I01-190815.pdf page 141
|
||||
throw new NotImplementedException(String.Format("{0} Type {1}", nameof(RangingResponse), type));
|
||||
}
|
||||
@ -179,8 +184,8 @@ namespace skyscraper5.Docsis.MacManagement
|
||||
}
|
||||
|
||||
public TransmitEqualizationEncodingsForOfdmaChannels TransmitEqualizationAdjustForOfdmaChannels { get; private set; }
|
||||
public CommandPowerObject CommandPower { get; set; }
|
||||
public class CommandPowerObject : Validatable
|
||||
private CommandPowerObject CommandPower { get; set; }
|
||||
class CommandPowerObject : Validatable
|
||||
{
|
||||
public CommandPowerObject(byte[] buffer)
|
||||
{
|
||||
@ -250,7 +255,7 @@ namespace skyscraper5.Docsis.MacManagement
|
||||
public byte? UpstreamChannelIdOverride { get; private set; }
|
||||
public byte? SCdmaPowerHeadroom { get; }
|
||||
public UpstreamChannelAdjustmentsObject UpstreamChannelAdjustments { get; private set; }
|
||||
public CommandPowerObject FdxCommandedPower { get; }
|
||||
private CommandPowerObject FdxCommandedPower { get; }
|
||||
public byte? TimingAdjustFractionalPart { get; }
|
||||
public byte? SCdmaMaximumScheduledCodes { get; }
|
||||
|
||||
|
||||
@ -30,6 +30,8 @@ namespace skyscraper5.Docsis
|
||||
{
|
||||
Type type = this.GetType();
|
||||
object[] customAttributes = type.GetCustomAttributes(typeof(MacManagementMessageTypeAttribute), false);
|
||||
if (customAttributes == null)
|
||||
return null;
|
||||
if (customAttributes.Length == 0)
|
||||
return null;
|
||||
MacManagementMessageTypeAttribute attribute = (MacManagementMessageTypeAttribute)customAttributes[0];
|
||||
|
||||
@ -1,92 +0,0 @@
|
||||
using System.Collections.Frozen;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Net;
|
||||
using System.Net.NetworkInformation;
|
||||
using skyscraper5.Docsis.AnnexC;
|
||||
using skyscraper5.Docsis.MacManagement;
|
||||
|
||||
namespace skyscraper5.Docsis;
|
||||
|
||||
public class NullDocsisEventHandler : IDocsisEventHandler
|
||||
{
|
||||
private HashSet<PhysicalAddress> participants;
|
||||
private uint? timing;
|
||||
private Dictionary<PhysicalAddress, IPAddress> knownIps;
|
||||
|
||||
public void OnParticipantDetected(PhysicalAddress pa)
|
||||
{
|
||||
if (participants == null)
|
||||
participants = new HashSet<PhysicalAddress>();
|
||||
|
||||
participants.Add(pa);
|
||||
}
|
||||
|
||||
public void OnCmtsTimestamp(PhysicalAddress source, uint timing)
|
||||
{
|
||||
OnParticipantDetected(source);
|
||||
this.timing = timing;
|
||||
}
|
||||
|
||||
public void OnUpstreamChannel(UpstreamChannelDescriptor mmm)
|
||||
{
|
||||
if (_queue == null)
|
||||
_queue = new Queue<object>();
|
||||
|
||||
_queue.Enqueue(mmm);
|
||||
}
|
||||
|
||||
public void OnDownstreamChannel(PhysicalAddress physicalAddress, MacDomainDescriptor.DownstreamActiveChannel downstreamActiveChannel)
|
||||
{
|
||||
if (_queue == null)
|
||||
_queue = new Queue<object>();
|
||||
|
||||
_queue.Enqueue(downstreamActiveChannel);
|
||||
}
|
||||
|
||||
public void OnLearnedIpFromMac(PhysicalAddress arpHeaderSenderHardwareAddress, IPAddress arpHeaderSenderProtocolAddress)
|
||||
{
|
||||
if (knownIps == null)
|
||||
knownIps = new Dictionary<PhysicalAddress, IPAddress>();
|
||||
|
||||
knownIps.Add(arpHeaderSenderHardwareAddress, arpHeaderSenderProtocolAddress);
|
||||
}
|
||||
|
||||
public void OnKeyManagementResponse(PrivacyKeyManagementResponse privacyKeyManagementResponse)
|
||||
{
|
||||
if (_queue == null)
|
||||
_queue = new Queue<object>();
|
||||
|
||||
_queue.Enqueue(privacyKeyManagementResponse);
|
||||
}
|
||||
|
||||
public void OnDynamicServiceAddition(ushort transactionId, byte confirmationCode,
|
||||
CommonTlvEncodingObject tlvEncodedInformation)
|
||||
{
|
||||
if (_queue == null)
|
||||
_queue = new Queue<object>();
|
||||
|
||||
_queue.Enqueue(tlvEncodedInformation);
|
||||
}
|
||||
|
||||
private Queue<object> _queue;
|
||||
|
||||
public Queue<object> GetQueue()
|
||||
{
|
||||
return _queue;
|
||||
}
|
||||
|
||||
public HashSet<PhysicalAddress> GetParticipants()
|
||||
{
|
||||
return participants;
|
||||
}
|
||||
|
||||
public uint GetTiming()
|
||||
{
|
||||
return timing.Value;
|
||||
}
|
||||
|
||||
public ReadOnlyDictionary<PhysicalAddress, IPAddress> GetKnownIps()
|
||||
{
|
||||
return knownIps.AsReadOnly();
|
||||
}
|
||||
}
|
||||
@ -7,7 +7,7 @@ using skyscraper5.Ietf.Rfc971;
|
||||
|
||||
namespace skyscraper5.Dvb.DataBroadcasting
|
||||
{
|
||||
public interface IMultiprotocolEncapsulationEventHandler
|
||||
interface IMultiprotocolEncapsulationEventHandler
|
||||
{
|
||||
void OnIpv4PacketArrival(InternetHeader internetHeader, byte[] ipv4Packet);
|
||||
void OnIpDatagram(int sourcePid, byte[] payload);
|
||||
|
||||
@ -17,7 +17,6 @@ namespace skyscraper5.Dvb.Descriptors
|
||||
public NetworkNameDescriptor(byte[] buffer)
|
||||
{
|
||||
NetworkName = En300468AnnexATextDecoder.GetInstance().Decode(buffer);
|
||||
Valid = true;
|
||||
}
|
||||
|
||||
public string NetworkName { get; private set; }
|
||||
|
||||
@ -50,8 +50,6 @@ namespace skyscraper5.Dvb.Descriptors
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Valid = true;
|
||||
}
|
||||
|
||||
public int ModulationType { get; private set; }
|
||||
@ -102,20 +100,5 @@ namespace skyscraper5.Dvb.Descriptors
|
||||
NineOfTen = 9,
|
||||
NoConventionalCoding = 15
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append(this.OrbitalPosition);
|
||||
sb.Append("°");
|
||||
sb.Append(this.East ? 'E' : 'W');
|
||||
sb.Append("/");
|
||||
sb.Append(Frequency / 100);
|
||||
sb.Append("/");
|
||||
sb.Append(this.Polarization.ToString()[0]);
|
||||
sb.Append("/");
|
||||
sb.Append(this.SymbolRate / 10);
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -351,10 +351,5 @@ namespace skyscraper5.Dvb.Descriptors
|
||||
{
|
||||
return HashCode.Combine((int)LinkageType, ServiceId, OriginalNetworkId, TransportStreamId);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return String.Format("{0} on (0x{1:X4},0x{2:X4},0x{3:X4})", LinkageType, OriginalNetworkId, TransportStreamId, ServiceId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,6 @@ using System.Threading.Tasks;
|
||||
using moe.yo3explorer.skyscraper8.DVBI.Model;
|
||||
using skyscraper8.DvbI;
|
||||
using System.Reflection.Metadata.Ecma335;
|
||||
using skyscraper8.Ietf.Rfc4566_SDP;
|
||||
|
||||
namespace skyscraper8.DvbNip
|
||||
{
|
||||
@ -54,28 +53,16 @@ namespace skyscraper8.DvbNip
|
||||
if (discoveryUdpPacket.DestinationPort == 3937)
|
||||
{
|
||||
LctFrame discoveryLctFrame = new LctFrame(discoveryUdpPacket.Payload);
|
||||
if (discoveryLctFrame == null)
|
||||
return;
|
||||
LctHeader lctHeader = discoveryLctFrame.LctHeader;
|
||||
if (lctHeader == null)
|
||||
return;
|
||||
if (lctHeader.NipActualCarrierInformation != null)
|
||||
if (discoveryLctFrame.LctHeader.NipActualCarrierInformation != null)
|
||||
{
|
||||
CurrentCarrierInformation = discoveryLctFrame.LctHeader.NipActualCarrierInformation;
|
||||
EventHandler.OnNipCarrierDetected(CurrentCarrierInformation);
|
||||
bootstrapped = true;
|
||||
}
|
||||
else if (discoveryLctFrame.PayloadContainsNativeIpMulticastTransportObject)
|
||||
{
|
||||
CurrentCarrierInformation = new NipActualCarrierInformation(ushort.MaxValue, ushort.MaxValue, ushort.MaxValue, ushort.MaxValue, "(no NIP carrier name provided)");
|
||||
EventHandler.OnNipCarrierDetected(CurrentCarrierInformation);
|
||||
bootstrapped = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
UserDatagram udpPacket = new UserDatagram(ipv4Packet);
|
||||
LctFrame lctFrame = new LctFrame(udpPacket.Payload);
|
||||
if (lctFrame.LctHeader == null)
|
||||
@ -176,7 +163,6 @@ namespace skyscraper8.DvbNip
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private DateTime? currentTime;
|
||||
private bool HandleMetadata(FluteListener fluteListener)
|
||||
@ -184,83 +170,56 @@ namespace skyscraper8.DvbNip
|
||||
switch (fluteListener.FileAssociation.ContentLocation)
|
||||
{
|
||||
case "urn:dvb:metadata:cs:NativeIPMulticastTransportObjectTypeCS:2023:bootstrap":
|
||||
Stream stream = fluteListener.ToStream();
|
||||
if (DvbNipUtilities.IsXml(stream))
|
||||
MulticastGatewayConfigurationType multicastGatewayConfiguration2023 = DvbNipUtilities.UnpackMulticastGatewayConfiguration(fluteListener.ToStream());
|
||||
EventHandler?.OnMulticastGatewayConfiguration(CurrentCarrierInformation, multicastGatewayConfiguration2023);
|
||||
return true;
|
||||
case "urn:dvb:metadata:cs:MulticastTransportObjectTypeCS:2021:gateway-configuration":
|
||||
MulticastGatewayConfigurationType multicastGatewayConfiguration2021 = DvbNipUtilities.UnpackMulticastGatewayConfiguration(fluteListener.ToStream());
|
||||
EventHandler?.OnMulticastGatewayConfiguration(CurrentCarrierInformation, multicastGatewayConfiguration2021);
|
||||
return true;
|
||||
case "urn:dvb:metadata:nativeip:PrivateDataSignalling":
|
||||
PrivateDataSignallingManifestType privateDataSignallingManifest = DvbNipUtilities.UnpackPrivateDataSignallingManifest(fluteListener.ToStream());
|
||||
EventHandler?.OnPrivateDataSignallingManifest(CurrentCarrierInformation, privateDataSignallingManifest);
|
||||
return true;
|
||||
case "urn:dvb:metadata:nativeip:dvb-i-slep":
|
||||
if (currentTime.HasValue)
|
||||
{
|
||||
MulticastGatewayConfigurationType multicastGatewayConfiguration2023 = DvbNipUtilities.UnpackMulticastGatewayConfiguration(stream);
|
||||
EventHandler?.OnMulticastGatewayConfiguration(CurrentCarrierInformation, multicastGatewayConfiguration2023);
|
||||
Stream rawSlepStream = fluteListener.ToStream();
|
||||
byte[] rawSlepBytes = new byte[rawSlepStream.Length];
|
||||
rawSlepStream.Read(rawSlepBytes, 0, (int)rawSlepStream.Length);
|
||||
string rawSlepString = Encoding.UTF8.GetString(rawSlepBytes);
|
||||
rawSlepString = rawSlepString.Replace("<dvbi-types:", "<");
|
||||
rawSlepString = rawSlepString.Replace("</dvbi-types:", "</");
|
||||
rawSlepString = rawSlepString.Replace("<dvbisdt:", "<");
|
||||
rawSlepString = rawSlepString.Replace("</dvbisdt:", "</");
|
||||
ServiceListEntryPoints serviceListEntryPoints = DvbIUtils.UnpackServiceListEntryPoints(rawSlepString);
|
||||
EventHandler?.OnServiceListEntryPoints(CurrentCarrierInformation, serviceListEntryPoints, currentTime.Value, this);
|
||||
return true;
|
||||
}
|
||||
else if (DvbNipUtilities.IsMime(stream))
|
||||
{
|
||||
stream = DvbNipUtilities.GetFirstMimeBodyPart(stream);
|
||||
if (SDP.IsSDP(stream))
|
||||
{
|
||||
SDP loadedSdp = SDP.Load(stream);
|
||||
MulticastGatewayConfigurationType convertedSdp = loadedSdp.ToMulticastGatewayConfiguration();
|
||||
EventHandler?.OnMulticastGatewayConfiguration(CurrentCarrierInformation, convertedSdp);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
stream.DumpToFile("container2.bin");
|
||||
logger.WarnFormat("Failed to detect the Metadata format of the Native IP Multicast Transport Object.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.WarnFormat("Failed to detect the Metadata format of the Native IP Multicast Transport Object.");
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case "urn:dvb:metadata:cs:MulticastTransportObjectTypeCS:2021:gateway-configuration":
|
||||
MulticastGatewayConfigurationType multicastGatewayConfiguration2021 = DvbNipUtilities.UnpackMulticastGatewayConfiguration(fluteListener.ToStream());
|
||||
EventHandler?.OnMulticastGatewayConfiguration(CurrentCarrierInformation, multicastGatewayConfiguration2021);
|
||||
return true;
|
||||
case "urn:dvb:metadata:nativeip:PrivateDataSignalling":
|
||||
PrivateDataSignallingManifestType privateDataSignallingManifest = DvbNipUtilities.UnpackPrivateDataSignallingManifest(fluteListener.ToStream());
|
||||
EventHandler?.OnPrivateDataSignallingManifest(CurrentCarrierInformation, privateDataSignallingManifest);
|
||||
return true;
|
||||
case "urn:dvb:metadata:nativeip:dvb-i-slep":
|
||||
if (currentTime.HasValue)
|
||||
{
|
||||
Stream rawSlepStream = fluteListener.ToStream();
|
||||
byte[] rawSlepBytes = new byte[rawSlepStream.Length];
|
||||
rawSlepStream.Read(rawSlepBytes, 0, (int)rawSlepStream.Length);
|
||||
string rawSlepString = Encoding.UTF8.GetString(rawSlepBytes);
|
||||
rawSlepString = rawSlepString.Replace("<dvbi-types:", "<");
|
||||
rawSlepString = rawSlepString.Replace("</dvbi-types:", "</");
|
||||
rawSlepString = rawSlepString.Replace("<dvbisdt:", "<");
|
||||
rawSlepString = rawSlepString.Replace("</dvbisdt:", "</");
|
||||
ServiceListEntryPoints serviceListEntryPoints = DvbIUtils.UnpackServiceListEntryPoints(rawSlepString);
|
||||
EventHandler?.OnServiceListEntryPoints(CurrentCarrierInformation, serviceListEntryPoints, currentTime.Value, this);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case "urn:dvb:metadata:nativeip:TimeOffsetFile":
|
||||
TimeOffsetFileType timeOffsetFile = DvbNipUtilities.UnpackTimeOffsetFile(fluteListener.ToStream());
|
||||
EventHandler?.OnTimeOffsetFile(CurrentCarrierInformation, timeOffsetFile);
|
||||
return true;
|
||||
case "urn:dvb:metadata:nativeip:NetworkInformationFile":
|
||||
NetworkInformationFileType networkInformationFile = DvbNipUtilities.UnpackNetworkInformationFile(fluteListener.ToStream());
|
||||
EventHandler?.OnNetworkInformationFile(CurrentCarrierInformation, networkInformationFile);
|
||||
return true;
|
||||
case "urn:dvb:metadata:nativeip:ServiceInformationFile":
|
||||
ServiceInformationFileType serviceInformationFile = DvbNipUtilities.UnpackServiceInformationFile(fluteListener.ToStream());
|
||||
EventHandler?.OnServiceInformationFile(CurrentCarrierInformation, serviceInformationFile);
|
||||
return true;
|
||||
case "urn:dvb:metadata:nativeip:ServiceGuide":
|
||||
//Unfortunately, the NIPServiceGuideManifest does not contain any useful information at all, which is why we ignore it.
|
||||
//There doesn't seem to be a way to get the actual EIT XML from it.
|
||||
return true;
|
||||
default:
|
||||
throw new NotImplementedException(fluteListener.FileAssociation.ContentLocation);
|
||||
}
|
||||
case "urn:dvb:metadata:nativeip:TimeOffsetFile":
|
||||
TimeOffsetFileType timeOffsetFile = DvbNipUtilities.UnpackTimeOffsetFile(fluteListener.ToStream());
|
||||
EventHandler?.OnTimeOffsetFile(CurrentCarrierInformation, timeOffsetFile);
|
||||
return true;
|
||||
case "urn:dvb:metadata:nativeip:NetworkInformationFile":
|
||||
NetworkInformationFileType networkInformationFile = DvbNipUtilities.UnpackNetworkInformationFile(fluteListener.ToStream());
|
||||
EventHandler?.OnNetworkInformationFile(CurrentCarrierInformation, networkInformationFile);
|
||||
return true;
|
||||
case "urn:dvb:metadata:nativeip:ServiceInformationFile":
|
||||
ServiceInformationFileType serviceInformationFile = DvbNipUtilities.UnpackServiceInformationFile(fluteListener.ToStream());
|
||||
EventHandler?.OnServiceInformationFile(CurrentCarrierInformation, serviceInformationFile);
|
||||
return true;
|
||||
case "urn:dvb:metadata:nativeip:ServiceGuide":
|
||||
//Unfortunately, the NIPServiceGuideManifest does not contain any useful information at all, which is why we ignore it.
|
||||
//There doesn't seem to be a way to get the actual EIT XML from it.
|
||||
return true;
|
||||
default:
|
||||
throw new NotImplementedException(fluteListener.FileAssociation.ContentLocation);
|
||||
}
|
||||
}
|
||||
private void TryPruneCache()
|
||||
{
|
||||
|
||||
@ -1,15 +1,10 @@
|
||||
using log4net;
|
||||
using MimeKit;
|
||||
using skyscraper5.Skyscraper.IO;
|
||||
using skyscraper8.Ietf.FLUTE;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Serialization;
|
||||
using skyscraper8.Ietf.FLUTE;
|
||||
|
||||
namespace skyscraper8.DvbNip
|
||||
{
|
||||
@ -17,63 +12,8 @@ namespace skyscraper8.DvbNip
|
||||
{
|
||||
private DvbNipUtilities() { }
|
||||
|
||||
private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name);
|
||||
private static XmlSerializer multicastGatewayConfigurationXmlSerializer;
|
||||
|
||||
public static bool IsXml(Stream s)
|
||||
{
|
||||
byte byteA = s.ReadUInt8();
|
||||
byte byteB = s.ReadUInt8();
|
||||
byte byteC = s.ReadUInt8();
|
||||
byte byteD = s.ReadUInt8();
|
||||
byte byteE = s.ReadUInt8();
|
||||
byte byteF = s.ReadUInt8();
|
||||
s.Position -= 6;
|
||||
|
||||
if (byteA != '<')
|
||||
return false;
|
||||
|
||||
if (byteB != '?')
|
||||
return false;
|
||||
|
||||
if (byteC != 'x')
|
||||
return false;
|
||||
|
||||
if (byteD != 'm')
|
||||
return false;
|
||||
|
||||
if (byteE != 'l')
|
||||
return false;
|
||||
|
||||
if (byteF != ' ')
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static readonly byte[] MimeVersionMagic = new byte[]
|
||||
{
|
||||
0x4D, 0x49, 0x4D, 0x45, 0x2D, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x3A, 0x20
|
||||
};
|
||||
|
||||
public static bool IsMime(Stream s)
|
||||
{
|
||||
if (s is GZipStream)
|
||||
return false;
|
||||
|
||||
if (s.GetAvailableBytes() <= MimeVersionMagic.Length)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
byte[] buffer = new byte[MimeVersionMagic.Length];
|
||||
int bufferReadResult = s.Read(buffer, 0, buffer.Length);
|
||||
bool isMime = Enumerable.SequenceEqual(buffer, MimeVersionMagic);
|
||||
s.Position -= bufferReadResult;
|
||||
return isMime;
|
||||
}
|
||||
|
||||
|
||||
public static MulticastGatewayConfigurationType UnpackMulticastGatewayConfiguration(Stream stream)
|
||||
{
|
||||
if (multicastGatewayConfigurationXmlSerializer == null)
|
||||
@ -180,10 +120,6 @@ namespace skyscraper8.DvbNip
|
||||
{
|
||||
bufferString = bufferString.Replace("urn:dvb:metadata:nativeip:2023", "urn:dvb:metadata:nativeip:2024");
|
||||
}
|
||||
else if (bufferString.Contains("urn:dvb:metadata:nativeip:2022"))
|
||||
{
|
||||
bufferString = bufferString.Replace("urn:dvb:metadata:nativeip:2022", "urn:dvb:metadata:nativeip:2024");
|
||||
}
|
||||
|
||||
object v = networkInformationFileXmlSerializer.Deserialize(new StringReader(bufferString));
|
||||
NetworkInformationFileType result = (NetworkInformationFileType)v;
|
||||
@ -205,50 +141,10 @@ namespace skyscraper8.DvbNip
|
||||
{
|
||||
bufferString = bufferString.Replace("urn:dvb:metadata:nativeip:2023", "urn:dvb:metadata:nativeip:2024");
|
||||
}
|
||||
else if (bufferString.Contains("urn:dvb:metadata:nativeip:2022"))
|
||||
{
|
||||
bufferString = bufferString.Replace("urn:dvb:metadata:nativeip:2022", "urn:dvb:metadata:nativeip:2024");
|
||||
}
|
||||
|
||||
object v = serviceInformationFileXmlSerializer.Deserialize(new StringReader(bufferString));
|
||||
ServiceInformationFileType result = (ServiceInformationFileType)v;
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Stream GetFirstMimeBodyPart(Stream stream)
|
||||
{
|
||||
MimeMessage message = MimeMessage.Load(stream);
|
||||
foreach (MimeEntity bodyPart in message.BodyParts)
|
||||
{
|
||||
MimePart part = bodyPart as MimePart;
|
||||
if (part.ContentType.MimeType.Equals("application/mbms-envelope+xml"))
|
||||
continue;
|
||||
if (part.ContentType.MimeType.Equals("application/mbms-user-service-description+xml"))
|
||||
continue;
|
||||
if (part.ContentType.MimeType.Equals("application/mbms-schedule+xml"))
|
||||
continue;
|
||||
return part.Content.Stream;
|
||||
}
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public static FluteListener PatchMpegDashSegment(FluteListener listener)
|
||||
{
|
||||
Stream stream = listener.ToStream();
|
||||
stream.Position = stream.Length - 1;
|
||||
byte readUInt8 = stream.ReadUInt8();
|
||||
if (readUInt8 != 0)
|
||||
return listener;
|
||||
|
||||
logger.WarnFormat("MPEG-DASH segment {0} is overdumped. It will be patched to become playable.", listener.FileAssociation.ContentLocation);
|
||||
stream.Position = stream.Length - 1;
|
||||
while (stream.ReadUInt8() == 0)
|
||||
{
|
||||
stream.Position -= 2;
|
||||
}
|
||||
|
||||
listener.TrimmedLength = stream.Position;
|
||||
return listener;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,15 +21,6 @@ namespace skyscraper8.DvbNip
|
||||
NipStreamProviderName = Encoding.UTF8.GetString(ms.ReadBytes(length));
|
||||
}
|
||||
|
||||
public NipActualCarrierInformation(ushort nipNetworkId, ushort nipCarrierId, ushort nipLinkId, ushort nipServiceId, string nipStreamProviderName)
|
||||
{
|
||||
NipNetworkId = nipNetworkId;
|
||||
NipCarrierId = nipCarrierId;
|
||||
NipLinkId = nipLinkId;
|
||||
NipServiceId = nipServiceId;
|
||||
NipStreamProviderName = nipStreamProviderName;
|
||||
}
|
||||
|
||||
public ushort NipNetworkId { get; }
|
||||
public ushort NipCarrierId { get; }
|
||||
public ushort NipLinkId { get; }
|
||||
|
||||
@ -1,67 +0,0 @@
|
||||
using skyscraper5.Mpeg2;
|
||||
using skyscraper5.Skyscraper.IO;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace skyscraper8.DvbSis
|
||||
{
|
||||
internal class DsAciHandler : IPsiProcessor
|
||||
{
|
||||
private readonly SisHandler sisOutput;
|
||||
|
||||
public DsAciHandler(SisHandler sisOutput)
|
||||
{
|
||||
this.sisOutput = sisOutput;
|
||||
}
|
||||
|
||||
public void GatherPsi(PsiSection section, int sourcePid)
|
||||
{
|
||||
byte[] bytes = section.GetData();
|
||||
MemoryStream ms = new MemoryStream(bytes, false);
|
||||
|
||||
byte tableId = ms.ReadUInt8();
|
||||
|
||||
byte byteA = ms.ReadUInt8();
|
||||
bool sectionSyntaxIndicator = (byteA & 0x80) != 0;
|
||||
bool reservedFutureUse = (byteA & 0x40) != 0;
|
||||
int reservedA = (byteA & 0x30) >> 4;
|
||||
|
||||
int sectionLength = (byteA & 0x0f);
|
||||
sectionLength <<= 8;
|
||||
sectionLength += ms.ReadUInt8();
|
||||
|
||||
ushort currentDsaGroupId = ms.ReadUInt16BE();
|
||||
|
||||
byte byteB = ms.ReadUInt8();
|
||||
int reservedB = (byteB & 0xc0) >> 6;
|
||||
int versionNumber = (byteB & 0x3e) >> 1;
|
||||
bool currentNextIndicator = (byteB & 0x01) != 0;
|
||||
|
||||
byte sectionNumber = ms.ReadUInt8();
|
||||
byte lastSectionNumber = ms.ReadUInt8();
|
||||
|
||||
byte[] dsaciFileData = ms.ReadBytes(ms.GetAvailableBytes() - 4);
|
||||
|
||||
uint crc32 = ms.ReadUInt32BE();
|
||||
|
||||
PushSection(currentDsaGroupId, versionNumber, sectionNumber, lastSectionNumber, dsaciFileData);
|
||||
}
|
||||
|
||||
private void PushSection(ushort currentDsaGroupId, int versionNumber, byte sectionNumber, byte lastSectionNumber, byte[] dsaciFileData)
|
||||
{
|
||||
if (sectionNumber == 0 && lastSectionNumber == 0)
|
||||
{
|
||||
MemoryStream ms = new MemoryStream(dsaciFileData, false);
|
||||
sisOutput.OnSisDsaci(currentDsaGroupId, versionNumber, sectionNumber, lastSectionNumber, ms);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new NotImplementedException("A DSACI Configuration spanning more than one section was detected. This is not supported yet. It would be great if you could share a sample of this stream, so I can fix it. \n - Cheers, Fey");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,95 +0,0 @@
|
||||
using skyscraper5.Mpeg2;
|
||||
using skyscraper5.T2MI;
|
||||
using skyscraper5.T2MI.Packets;
|
||||
using skyscraper8.T2MI.Packets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace skyscraper8.DvbSis
|
||||
{
|
||||
internal class FtiHandler : ITsPacketProcessor, IPayloadUnitDecoder, T2MIEventHandler
|
||||
{
|
||||
public FtiHandler(int pid, SisHandler sisOutput, T2MIEventHandler t2miOutput)
|
||||
{
|
||||
this.t2miProxy = new T2MIDecoder(pid, this);
|
||||
this.t2miOutput = t2miOutput;
|
||||
this.sisOutput = sisOutput;
|
||||
}
|
||||
|
||||
private SisHandler sisOutput;
|
||||
private T2MIEventHandler t2miOutput;
|
||||
private T2MIDecoder t2miProxy;
|
||||
|
||||
public void PacketLoss()
|
||||
{
|
||||
t2miProxy.PacketLoss();
|
||||
}
|
||||
|
||||
public void PushPacket(TsPacket packet)
|
||||
{
|
||||
t2miProxy.PushPacket(packet);
|
||||
}
|
||||
|
||||
public void OnT2MiPacketLoss(int pid, byte expectedPacket, T2MIHeader header)
|
||||
{
|
||||
}
|
||||
|
||||
public void OnT2MiPacket(int pid, byte basebandFramePlpId, byte[] basebandPacket)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void OnT2MiTimestamp(int pid, _0x20_DvbT2Timestamp t2Timestamp)
|
||||
{
|
||||
sisOutput.OnSisTimestamp(pid, t2Timestamp);
|
||||
}
|
||||
|
||||
public void OnT2MiIqData(int relatedPid, _0x31_IqData iqData)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void OnT2MiIqData(int relatedPid, _0x01_IqData iqData2)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void OnT2MiError(int relatedPid, int skyscraperErrorCode)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void OnT2MiL1Current(int relatedPid, _0x10_L1Current l1Current)
|
||||
{
|
||||
t2miOutput.OnT2MiL1Current(relatedPid, l1Current);
|
||||
}
|
||||
|
||||
public void OnT2MiArbitraryCellInsertion(int relatedPid, _0x02_ArbitraryCellInsertion arbitraryCellInsertion)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void OnT2MiBalancingCells(int relatedPid, byte frameIndex, uint numActiveBiasCellsPerP2)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void OnT2MiL1Future(int relatedPid, _0x11_L1Future l1Future)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void OnT2MiIndividualAddressing(int relatedPid, _0x21_IndividualAddressing individualAddressing)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void OnFramingAndTimingInformation(int relatedPid, _0xF0_FramingTimingInformation fti)
|
||||
{
|
||||
sisOutput.OnSisFti(relatedPid, fti);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,61 +0,0 @@
|
||||
using skyscraper5.T2MI.Packets;
|
||||
using skyscraper8.T2MI.Packets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace skyscraper8.DvbSis
|
||||
{
|
||||
internal class NullSisHandler : SisHandler
|
||||
{
|
||||
public void OnSisCat(int sourcePid, ushort sourceProgram, SisCatContainer catContainer)
|
||||
{
|
||||
}
|
||||
|
||||
public void OnSisDsaci(ushort currentDsaGroupId, int versionNumber, byte sectionNumber, byte lastSectionNumber, Stream dsaci)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void OnSisEit(int sourcePid, ushort sourceProgram, SisEitContainer eitContainer)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void OnSisFti(int relatedPid, _0xF0_FramingTimingInformation fti)
|
||||
{
|
||||
}
|
||||
|
||||
public void OnSisNit(int sourcePid, ushort sourceProgram, SisNitContainer nitContainer)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void OnSisPat(int sourcePid, ushort sourceProgram, SisPatContainer patContainer)
|
||||
{
|
||||
}
|
||||
|
||||
public void OnSisPmt(int sourcePid, ushort sourceProgram, SisPmtContainer pmtContainer)
|
||||
{
|
||||
}
|
||||
|
||||
public void OnSisSdt(int sourcePid, ushort sourceProgram, SisSdtContainer sdtContainer)
|
||||
{
|
||||
}
|
||||
|
||||
public void OnSisTdt(int sourcePid, ushort sourceProgram, SisTdtContainer tdtContainer)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void OnSisTimestamp(int pid, _0x20_DvbT2Timestamp t2Timestamp)
|
||||
{
|
||||
}
|
||||
|
||||
public void OnSisTot(int sourcePid, ushort sourceProgram, SisTotContainer totContainer)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,34 +0,0 @@
|
||||
using skyscraper5.Mpeg2.Descriptors;
|
||||
using skyscraper5.Mpeg2.Psi;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace skyscraper8.DvbSis
|
||||
{
|
||||
public class SisCatContainer : ICatEventHandler
|
||||
{
|
||||
public void NotifyOfCaSystem(CaDescriptor caDescriptor, bool fromPmt = false)
|
||||
{
|
||||
if (caDescriptors == null)
|
||||
caDescriptors = new List<CaDescriptor>();
|
||||
|
||||
caDescriptors.Add(caDescriptor);
|
||||
}
|
||||
|
||||
private List<CaDescriptor> caDescriptors;
|
||||
|
||||
public IReadOnlyList<CaDescriptor> CaDescriptors
|
||||
{
|
||||
get
|
||||
{
|
||||
if (caDescriptors == null)
|
||||
return new List<CaDescriptor>().AsReadOnly();
|
||||
|
||||
return caDescriptors.AsReadOnly();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,46 +0,0 @@
|
||||
using skyscraper5.Dvb.Psi;
|
||||
using skyscraper5.Dvb.Psi.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace skyscraper8.DvbSis
|
||||
{
|
||||
public class SisEitContainer : IEitEventHandler
|
||||
{
|
||||
public void OnEitEvent(EitEvent eitEvent)
|
||||
{
|
||||
if (_eitEvents == null)
|
||||
_eitEvents = new List<EitEvent>();
|
||||
|
||||
_eitEvents.Add(eitEvent);
|
||||
}
|
||||
|
||||
public void SetNetworkId(ushort networkId, bool forceOverwrite = false)
|
||||
{
|
||||
NetworkId = networkId;
|
||||
}
|
||||
|
||||
public void SetTransportStreamId(ushort transportStreamId)
|
||||
{
|
||||
TransportStreamId = transportStreamId;
|
||||
}
|
||||
|
||||
public ushort? TransportStreamId { get; private set; }
|
||||
public ushort? NetworkId { get; private set; }
|
||||
|
||||
public IReadOnlyList<EitEvent> Events
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_eitEvents == null)
|
||||
return new List<EitEvent>();
|
||||
return _eitEvents.AsReadOnly();
|
||||
}
|
||||
}
|
||||
|
||||
private List<EitEvent> _eitEvents;
|
||||
}
|
||||
}
|
||||
@ -1,25 +0,0 @@
|
||||
using skyscraper5.T2MI.Packets;
|
||||
using skyscraper8.T2MI.Packets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace skyscraper8.DvbSis
|
||||
{
|
||||
public interface SisHandler
|
||||
{
|
||||
void OnSisCat(int sourcePid, ushort sourceProgram, SisCatContainer catContainer);
|
||||
void OnSisDsaci(ushort currentDsaGroupId, int versionNumber, byte sectionNumber, byte lastSectionNumber, Stream dsaci);
|
||||
void OnSisEit(int sourcePid, ushort sourceProgram, SisEitContainer eitContainer);
|
||||
void OnSisFti(int relatedPid, _0xF0_FramingTimingInformation fti);
|
||||
void OnSisNit(int sourcePid, ushort sourceProgram, SisNitContainer nitContainer);
|
||||
void OnSisPat(int sourcePid, ushort sourceProgram, SisPatContainer patContainer);
|
||||
void OnSisPmt(int sourcePid, ushort sourceProgram, SisPmtContainer pmtContainer);
|
||||
void OnSisSdt(int sourcePid, ushort sourceProgram, SisSdtContainer sdtContainer);
|
||||
void OnSisTdt(int sourcePid, ushort sourceProgram, SisTdtContainer tdtContainer);
|
||||
void OnSisTimestamp(int pid, _0x20_DvbT2Timestamp t2Timestamp);
|
||||
void OnSisTot(int sourcePid, ushort sourceProgram, SisTotContainer totContainer);
|
||||
}
|
||||
}
|
||||
@ -1,47 +0,0 @@
|
||||
using skyscraper5.Dvb.Psi;
|
||||
using skyscraper5.Dvb.Psi.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace skyscraper8.DvbSis
|
||||
{
|
||||
public class SisNitContainer : INitEventHandler
|
||||
{
|
||||
public void OnNitNetwork(NitNetwork nitNetwork)
|
||||
{
|
||||
Network = nitNetwork;
|
||||
}
|
||||
|
||||
public void OnNitTransportStream(ushort networkId, NitTransportStream transportStream)
|
||||
{
|
||||
if (_transportStreams == null)
|
||||
_transportStreams = new List<Tuple<ushort, NitTransportStream>>();
|
||||
|
||||
_transportStreams.Add(new Tuple<ushort, NitTransportStream> (networkId, transportStream ));
|
||||
}
|
||||
|
||||
public void SetNetworkId(ushort networkId, bool forceOverrite = false)
|
||||
{
|
||||
this.NetworkId = networkId;
|
||||
}
|
||||
|
||||
public ushort? NetworkId { get; private set; }
|
||||
public NitNetwork Network { get; private set; }
|
||||
|
||||
private List<Tuple<ushort, NitTransportStream>> _transportStreams;
|
||||
|
||||
public IReadOnlyList<Tuple<ushort,NitTransportStream>> TransportStreams
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_transportStreams == null)
|
||||
return new List<Tuple<ushort, NitTransportStream>>().AsReadOnly();
|
||||
|
||||
return _transportStreams.AsReadOnly();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,46 +0,0 @@
|
||||
using skyscraper5.Mpeg2.Psi;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace skyscraper8.DvbSis
|
||||
{
|
||||
public class SisPatContainer : IPatEventHandler
|
||||
{
|
||||
public ushort? TransportStreamId { get; private set; }
|
||||
public int? NetworkPid { get; private set; }
|
||||
|
||||
public ReadOnlyDictionary<int,ushort> ProgramMappings
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_ProgramMappings == null)
|
||||
{
|
||||
return new ReadOnlyDictionary<int, ushort>(new Dictionary<int, ushort>());
|
||||
}
|
||||
return _ProgramMappings.AsReadOnly();
|
||||
}
|
||||
}
|
||||
private Dictionary<int,ushort> _ProgramMappings;
|
||||
|
||||
public void NetworkPidFromPat(int networkPid)
|
||||
{
|
||||
NetworkPid = networkPid;
|
||||
}
|
||||
|
||||
public void ProgramMapPidFromPat(int pmtPid, ushort programNumber)
|
||||
{
|
||||
if (_ProgramMappings == null)
|
||||
_ProgramMappings = new Dictionary<int,ushort>();
|
||||
_ProgramMappings.Add(pmtPid, programNumber);
|
||||
}
|
||||
|
||||
public void SetTransportStreamId(ushort transportStreamId)
|
||||
{
|
||||
TransportStreamId = transportStreamId;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,20 +0,0 @@
|
||||
using skyscraper5.Mpeg2.Psi;
|
||||
using skyscraper5.Mpeg2.Psi.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace skyscraper8.DvbSis
|
||||
{
|
||||
public class SisPmtContainer : IPmtEventHandler
|
||||
{
|
||||
public void PmtEvent(ProgramMapping result, int pmtPid)
|
||||
{
|
||||
this.ProgramMapping = result;
|
||||
}
|
||||
|
||||
public ProgramMapping ProgramMapping { get; private set; }
|
||||
}
|
||||
}
|
||||
@ -1,34 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace skyscraper8.DvbSis
|
||||
{
|
||||
internal class SisProgramIdentifier
|
||||
{
|
||||
public SisProgramIdentifier(ushort program)
|
||||
{
|
||||
this.Program = program;
|
||||
}
|
||||
|
||||
public int Program { get; }
|
||||
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
return obj is SisProgramIdentifier pid &&
|
||||
Program == pid.Program;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return HashCode.Combine(Program);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return String.Format("DVB-SIS Program {0}", Program);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,81 +0,0 @@
|
||||
using skyscraper5.Dvb.Psi;
|
||||
using skyscraper5.Mpeg2;
|
||||
using skyscraper5.Mpeg2.Psi;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace skyscraper8.DvbSis
|
||||
{
|
||||
internal class SisPsiHandler : IPsiProcessor
|
||||
{
|
||||
public SisPsiHandler(SisHandler handler, ushort parentProgram)
|
||||
{
|
||||
_handler = handler;
|
||||
_parentProgram = parentProgram;
|
||||
}
|
||||
|
||||
private SisHandler _handler;
|
||||
private ushort _parentProgram;
|
||||
|
||||
public void GatherPsi(PsiSection section, int sourcePid)
|
||||
{
|
||||
switch (section.TableId)
|
||||
{
|
||||
case 0x00:
|
||||
SisPatContainer patContainer = new SisPatContainer();
|
||||
PatParser patParser = new PatParser(patContainer);
|
||||
patParser.GatherPsi(section, 0);
|
||||
_handler.OnSisPat(sourcePid, _parentProgram, patContainer);
|
||||
break;
|
||||
case 0x01:
|
||||
SisCatContainer catContainer = new SisCatContainer();
|
||||
CatParser catParser = new CatParser(catContainer);
|
||||
catParser.GatherPsi(section, 0);
|
||||
_handler.OnSisCat(sourcePid, _parentProgram, catContainer);
|
||||
break;
|
||||
case 0x02:
|
||||
SisPmtContainer pmtContainer = new SisPmtContainer();
|
||||
PmtParser pmtParser = new PmtParser(pmtContainer);
|
||||
pmtParser.GatherPsi(section, 0);
|
||||
_handler.OnSisPmt(sourcePid, _parentProgram, pmtContainer);
|
||||
break;
|
||||
case 0x40:
|
||||
SisNitContainer nitContainer = new SisNitContainer();
|
||||
NitParser nitParser = new NitParser(nitContainer);
|
||||
nitParser.GatherPsi(section, 0);
|
||||
_handler.OnSisNit(sourcePid, _parentProgram, nitContainer);
|
||||
break;
|
||||
case 0x42:
|
||||
SisSdtContainer sdtContainer = new SisSdtContainer();
|
||||
SdtParser sdtParser = new SdtParser(sdtContainer);
|
||||
sdtParser.GatherPsi(section, 0);
|
||||
_handler.OnSisSdt(sourcePid, _parentProgram, sdtContainer);
|
||||
break;
|
||||
case 0x4e:
|
||||
case 0x50:
|
||||
SisEitContainer eitContainer = new SisEitContainer();
|
||||
EitParser eitParser = new EitParser(eitContainer);
|
||||
eitParser.GatherPsi(section, sourcePid);
|
||||
_handler.OnSisEit(sourcePid, _parentProgram, eitContainer);
|
||||
break;
|
||||
case 0x70:
|
||||
SisTdtContainer tdtContainer = new SisTdtContainer();
|
||||
TimetableParser tdtParser = new TimetableParser(tdtContainer, null);
|
||||
tdtParser.GatherPsi(section, sourcePid);
|
||||
_handler.OnSisTdt(sourcePid, _parentProgram, tdtContainer);
|
||||
break;
|
||||
case 0x73:
|
||||
SisTotContainer totContainer = new SisTotContainer();
|
||||
TimetableParser totParser = new TimetableParser(null, totContainer);
|
||||
totParser.GatherPsi(section, sourcePid);
|
||||
_handler.OnSisTot(sourcePid, _parentProgram, totContainer);
|
||||
break;
|
||||
default:
|
||||
throw new NotImplementedException(String.Format("Table ID 0x{0:X2} in DVB-SIS PSI/SI not supported yet. To get this fixed, please share a sample of this stream.", section.TableId));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,46 +0,0 @@
|
||||
using skyscraper5.Dvb.Psi;
|
||||
using skyscraper5.Dvb.Psi.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace skyscraper8.DvbSis
|
||||
{
|
||||
public class SisSdtContainer : ISdtEventHandler
|
||||
{
|
||||
public ushort? NetworkId { get; private set; }
|
||||
public ushort? TransportStreamId { get; private set; }
|
||||
|
||||
private List<Tuple<ushort,ushort,SdtService>> sdtServices;
|
||||
public void OnSdtService(ushort transportStreamId, ushort originalNetworkId, SdtService sdtService)
|
||||
{
|
||||
if (sdtServices == null)
|
||||
sdtServices = new List<Tuple<ushort, ushort, SdtService>>();
|
||||
|
||||
sdtServices.Add(new Tuple<ushort,ushort,SdtService>(transportStreamId,originalNetworkId,sdtService));
|
||||
}
|
||||
|
||||
public void SetNetworkId(ushort networkId)
|
||||
{
|
||||
this.NetworkId = networkId;
|
||||
}
|
||||
|
||||
public void SetTransportStreamId(ushort transportStreamId)
|
||||
{
|
||||
this.TransportStreamId = transportStreamId;
|
||||
}
|
||||
|
||||
public IReadOnlyList<Tuple<ushort, ushort, SdtService>> Services
|
||||
{
|
||||
get
|
||||
{
|
||||
if (sdtServices == null)
|
||||
return new List<Tuple<ushort, ushort, SdtService>>().AsReadOnly();
|
||||
|
||||
return sdtServices.AsReadOnly();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user