Merge remote-tracking branch 'remotes/origin/sauerland'
Some checks failed
🚀 Pack skyscraper8 / make-zip (push) Failing after 1m9s
Some checks failed
🚀 Pack skyscraper8 / make-zip (push) Failing after 1m9s
# Conflicts: # skyscraper8/GS/GSE/GseReader.cs # skyscraper8/Properties/launchSettings.json
This commit is contained in:
commit
28d9b9b2f8
@ -5,7 +5,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Minio" Version="6.0.5" />
|
<PackageReference Include="Minio" Version="6.0.4" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@ -2,7 +2,9 @@
|
|||||||
using Npgsql;
|
using Npgsql;
|
||||||
using skyscraper5.src.InteractionChannel.Model;
|
using skyscraper5.src.InteractionChannel.Model;
|
||||||
using skyscraper5.src.InteractionChannel.Model.Descriptors;
|
using skyscraper5.src.InteractionChannel.Model.Descriptors;
|
||||||
|
using skyscraper5.src.InteractionChannel.Model2;
|
||||||
using skyscraper5.src.Skyscraper.Scraper.Storage.Utilities;
|
using skyscraper5.src.Skyscraper.Scraper.Storage.Utilities;
|
||||||
|
using skyscraper8.InteractionChannel.Model2;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
@ -969,5 +971,30 @@ namespace skyscraper5.Data.PostgreSql
|
|||||||
command.Parameters.AddWithValue("@nid", NpgsqlTypes.NpgsqlDbType.Integer, (int)coordinate.Item1);
|
command.Parameters.AddWithValue("@nid", NpgsqlTypes.NpgsqlDbType.Integer, (int)coordinate.Item1);
|
||||||
command.ExecuteNonQuery();
|
command.ExecuteNonQuery();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
3
GUIs/skyscraper8.UI.ImGui/.filenesting.json
Normal file
3
GUIs/skyscraper8.UI.ImGui/.filenesting.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"help":"https://go.microsoft.com/fwlink/?linkid=866610"
|
||||||
|
}
|
||||||
7
GUIs/skyscraper8.UI.ImGui/Properties/launchSettings.json
Normal file
7
GUIs/skyscraper8.UI.ImGui/Properties/launchSettings.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"profiles": {
|
||||||
|
"skyscraper8.UI.SDL2": {
|
||||||
|
"commandName": "Project"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -588,11 +588,9 @@ namespace skyscraper5.Skyscraper.IO.CrazycatStreamReader
|
|||||||
{
|
{
|
||||||
this.wrapped = client;
|
this.wrapped = client;
|
||||||
this.bufferedStream = new BufferedStream(wrapped.GetStream(), 96256);
|
this.bufferedStream = new BufferedStream(wrapped.GetStream(), 96256);
|
||||||
this.packetsRemainBeforeStart = 512;
|
|
||||||
}
|
}
|
||||||
internal TcpClient wrapped;
|
internal TcpClient wrapped;
|
||||||
internal BufferedStream bufferedStream;
|
internal BufferedStream bufferedStream;
|
||||||
private int packetsRemainBeforeStart;
|
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
@ -615,15 +613,6 @@ namespace skyscraper5.Skyscraper.IO.CrazycatStreamReader
|
|||||||
|
|
||||||
internal void DropPacket(byte[] buffer, int offset, int length)
|
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);
|
bufferedStream?.Write(buffer, offset, length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -80,7 +80,15 @@ namespace skyscraper5.IO.StreamReader
|
|||||||
|
|
||||||
public bool SetChannel(int freq, int symbrate, int pol, VITERBIRATE_TYPE fec, int lof1, int lof2, int lofsw)
|
public bool SetChannel(int freq, int symbrate, int pol, VITERBIRATE_TYPE fec, int lof1, int lof2, int lofsw)
|
||||||
{
|
{
|
||||||
return UnsafeStreamReaderMethods.SetChannel(freq, symbrate, pol, fec, lof1, lof2, 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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool SetChannelEx(int freq, int symbrate, int pol, VITERBIRATE_TYPE fec, int lof1, int lof2, int lofsw, MOD_TYPE mod)
|
public bool SetChannelEx(int freq, int symbrate, int pol, VITERBIRATE_TYPE fec, int lof1, int lof2, int lofsw, MOD_TYPE mod)
|
||||||
|
|||||||
15
skyscraper8.slnLaunch.user
Normal file
15
skyscraper8.slnLaunch.user
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
@ -33,6 +33,8 @@ internal class GseReader : IMisHandler
|
|||||||
GsePacket child = new GsePacket(startIndicator, endIndicator, labelTypeIndicator);
|
GsePacket child = new GsePacket(startIndicator, endIndicator, labelTypeIndicator);
|
||||||
if (!startIndicator || !endIndicator)
|
if (!startIndicator || !endIndicator)
|
||||||
{
|
{
|
||||||
|
if (ms.Position == ms.Length)
|
||||||
|
return;
|
||||||
child.FragmentId = ms.ReadUInt8();
|
child.FragmentId = ms.ReadUInt8();
|
||||||
gseLength--;
|
gseLength--;
|
||||||
}
|
}
|
||||||
@ -45,6 +47,8 @@ internal class GseReader : IMisHandler
|
|||||||
|
|
||||||
if (startIndicator)
|
if (startIndicator)
|
||||||
{
|
{
|
||||||
|
if (ms.GetAvailableBytes() < 2)
|
||||||
|
return;
|
||||||
child.ProtocolType = ms.ReadUInt16BE();
|
child.ProtocolType = ms.ReadUInt16BE();
|
||||||
gseLength -= 2;
|
gseLength -= 2;
|
||||||
if (!endIndicator)
|
if (!endIndicator)
|
||||||
@ -52,6 +56,8 @@ internal class GseReader : IMisHandler
|
|||||||
switch (labelTypeIndicator)
|
switch (labelTypeIndicator)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
|
if (ms.GetAvailableBytes() < 6)
|
||||||
|
return;
|
||||||
child.Label = new _6byteLabel(ms.ReadBytes(6));
|
child.Label = new _6byteLabel(ms.ReadBytes(6));
|
||||||
gseLength -= 6;
|
gseLength -= 6;
|
||||||
if (!endIndicator)
|
if (!endIndicator)
|
||||||
@ -59,6 +65,8 @@ internal class GseReader : IMisHandler
|
|||||||
lastLabel = child.Label;
|
lastLabel = child.Label;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
|
if (ms.GetAvailableBytes() < 3)
|
||||||
|
return;
|
||||||
child.Label = new _3byteLabel(ms.ReadBytes(3));
|
child.Label = new _3byteLabel(ms.ReadBytes(3));
|
||||||
gseLength -= 3;
|
gseLength -= 3;
|
||||||
if (!endIndicator)
|
if (!endIndicator)
|
||||||
@ -81,6 +89,8 @@ internal class GseReader : IMisHandler
|
|||||||
|
|
||||||
if (gseLength > ms.GetAvailableBytes())
|
if (gseLength > ms.GetAvailableBytes())
|
||||||
return;
|
return;
|
||||||
|
if (gseLength <= -1)
|
||||||
|
return;
|
||||||
child.GseDataBytes = ms.ReadBytes(gseLength);
|
child.GseDataBytes = ms.ReadBytes(gseLength);
|
||||||
|
|
||||||
if (!startIndicator && endIndicator)
|
if (!startIndicator && endIndicator)
|
||||||
@ -120,6 +130,21 @@ internal class GseReader : IMisHandler
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!child.StartIndicator && !child.EndIndicator)
|
||||||
|
{
|
||||||
|
if (fragmentations == null)
|
||||||
|
{
|
||||||
|
//We haven't seen any starting frames yet, so we can't use an inbetween frame. We can throw this away.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (fragmentations[child.FragmentId.Value] == null)
|
||||||
|
{
|
||||||
|
//fragment beginning missing, we can throw this away.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
throw new NotImplementedException(child.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
if (child.StartIndicator && child.EndIndicator)
|
if (child.StartIndicator && child.EndIndicator)
|
||||||
{
|
{
|
||||||
switch (child.ProtocolType)
|
switch (child.ProtocolType)
|
||||||
@ -129,10 +154,10 @@ internal class GseReader : IMisHandler
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (warnedEthertypes == null)
|
if (warnedEthertypes == null)
|
||||||
warnedEthertypes = new bool[0xffff];
|
warnedEthertypes = new bool[ushort.MaxValue];
|
||||||
if (!warnedEthertypes[child.ProtocolType.Value])
|
if (!warnedEthertypes[child.ProtocolType.Value])
|
||||||
{
|
{
|
||||||
logger.WarnFormat("This GSE contains other traffic types (type {0:X4}) besides IP (type 0x0800). If it's not too much trouble, please consider submitting a sample.",child.ProtocolType.Value);
|
logger.WarnFormat("This GSE contains other traffic types (type 0x{0:X4}) besides IP (type 0x0800). If it's not too much trouble, please consider submitting a sample.",child.ProtocolType.Value);
|
||||||
warnedEthertypes[child.ProtocolType.Value] = true;
|
warnedEthertypes[child.ProtocolType.Value] = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -236,7 +236,10 @@ namespace skyscraper5.Mpeg2
|
|||||||
//Marker Flag
|
//Marker Flag
|
||||||
markerBit = (escrBinary & 0x0000000000000001) != 0;
|
markerBit = (escrBinary & 0x0000000000000001) != 0;
|
||||||
if (!markerBit)
|
if (!markerBit)
|
||||||
throw new DvbException("invalid pes packet");
|
{
|
||||||
|
//invalid PES
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EsRateFlag)
|
if (EsRateFlag)
|
||||||
|
|||||||
@ -34,6 +34,7 @@ using skyscraper8.SatIp;
|
|||||||
using skyscraper8.SatIp.RtspResponses;
|
using skyscraper8.SatIp.RtspResponses;
|
||||||
using skyscraper8.SimpleServiceDiscoveryProtocol;
|
using skyscraper8.SimpleServiceDiscoveryProtocol;
|
||||||
using skyscraper8.Skyscraper.Math;
|
using skyscraper8.Skyscraper.Math;
|
||||||
|
using skyscraper8.Skyscraper;
|
||||||
|
|
||||||
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config")]
|
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config")]
|
||||||
namespace skyscraper5
|
namespace skyscraper5
|
||||||
|
|||||||
@ -2,7 +2,11 @@
|
|||||||
"profiles": {
|
"profiles": {
|
||||||
"skyscraper8": {
|
"skyscraper8": {
|
||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
|
<<<<<<< HEAD
|
||||||
"commandLineArgs": "\"D:\\sorglos-iww-rww-aca-oca.ts\"",
|
"commandLineArgs": "\"D:\\sorglos-iww-rww-aca-oca.ts\"",
|
||||||
|
=======
|
||||||
|
"commandLineArgs": "udpin udp://127.0.0.1:6970",
|
||||||
|
>>>>>>> remotes/origin/sauerland
|
||||||
"remoteDebugEnabled": false
|
"remoteDebugEnabled": false
|
||||||
},
|
},
|
||||||
"Container (Dockerfile)": {
|
"Container (Dockerfile)": {
|
||||||
|
|||||||
@ -572,6 +572,12 @@ namespace skyscraper8.Skyscraper.FrequencyListGenerator
|
|||||||
|
|
||||||
if (caps.HasFlag(Caps.SR_SIGINFO))
|
if (caps.HasFlag(Caps.SR_SIGINFO))
|
||||||
{
|
{
|
||||||
|
int polarity = result.SearchResult.Pol;
|
||||||
|
int freq = result.SearchResult.Freq;
|
||||||
|
bool isHighBand = freq > config.LnbType.LofSw * 1000;
|
||||||
|
bool isHorizontal = polarity == 0;
|
||||||
|
|
||||||
|
SendDiseqcCommand(isHighBand, isHorizontal);
|
||||||
logger.Log(PluginLogLevel.Info, string.Format("Trying to BLScanEx..."), 8);
|
logger.Log(PluginLogLevel.Info, string.Format("Trying to BLScanEx..."), 8);
|
||||||
if (!config.StreamReader.BLScanEx(result.SearchResult.Freq, 5000, result.SearchResult.Pol,
|
if (!config.StreamReader.BLScanEx(result.SearchResult.Freq, 5000, result.SearchResult.Pol,
|
||||||
config.LnbType.Lof1 * 1000, config.LnbType.Lof2 * 1000,
|
config.LnbType.Lof1 * 1000, config.LnbType.Lof2 * 1000,
|
||||||
@ -587,35 +593,31 @@ namespace skyscraper8.Skyscraper.FrequencyListGenerator
|
|||||||
|
|
||||||
if (!satelliteSr.Lock)
|
if (!satelliteSr.Lock)
|
||||||
{
|
{
|
||||||
logger.Log(PluginLogLevel.Info, string.Format("Trying to SetChannel..."), 8);
|
int attempts = (result.SearchResult.Freq / 1000).GetHighestDigit();
|
||||||
bool channel = config.StreamReader.SetChannel(result.SearchResult.Freq, result.SearchResult.SR, result.SearchResult.Freq, result.SearchResult.FEC, config.LnbType.Lof1 * 1000, config.LnbType.Lof2 * 1000, config.LnbType.LofSw * 1000);
|
bool success = false;
|
||||||
if (!channel)
|
for (int i = 0; i < attempts; i++)
|
||||||
{
|
{
|
||||||
result.State = BlindscanResultState.TuningFailed;
|
Thread.Sleep(1000);
|
||||||
config.Ui.OnBlindscanLockFail(satelliteSr, result.State);
|
result.State = BlindscanResultState.Retrying;
|
||||||
config.DataStorage.UpdateTransponderState(jobInDb, result.IsSatellite(), result.SearchResult, result.State, result.SearchResult2);
|
logger.Log(PluginLogLevel.Info, string.Format("Retrying BLScanEx... ({0}/{1})", i + 1, attempts + 1), 8);
|
||||||
return;
|
bool retryResult = config.StreamReader.BLScanEx(result.SearchResult.Freq, 5000, result.SearchResult.Pol, config.LnbType.Lof1 * 1000, config.LnbType.Lof2 * 1000, config.LnbType.LofSw * 1000, 1000000, (STD_TYPE)result.SearchResult.StdType,ref satelliteSr);
|
||||||
}
|
if (!retryResult)
|
||||||
else
|
|
||||||
{
|
|
||||||
logger.Log(PluginLogLevel.Info, string.Format("Trying to get SignalInfo..."), 8);
|
|
||||||
bool signalInfo = config.StreamReader.SignalInfo(ref satelliteSr);
|
|
||||||
if (!signalInfo)
|
|
||||||
{
|
{
|
||||||
result.State = BlindscanResultState.TuningFailed;
|
result.State = BlindscanResultState.BlScanFailure;
|
||||||
config.DataStorage.UpdateTransponderState(jobInDb, result.IsSatellite(), result.SearchResult, result.State, result.SearchResult2);
|
continue;
|
||||||
config.Ui.OnBlindscanLockFail(satelliteSr, result.State);
|
}
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!satelliteSr.Lock)
|
if (!satelliteSr.Lock)
|
||||||
{
|
{
|
||||||
result.State = BlindscanResultState.NoLock;
|
result.State = BlindscanResultState.NoLock;
|
||||||
config.DataStorage.UpdateTransponderState(jobInDb, result.IsSatellite(), result.SearchResult, result.State, result.SearchResult2);
|
continue;
|
||||||
config.Ui.OnBlindscanLockFail(satelliteSr, result.State);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
success = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
config.DataStorage.UpdateTransponderState(jobInDb, result.IsSatellite(), result.SearchResult, result.State, result.SearchResult2);
|
||||||
|
if (!success)
|
||||||
|
return;
|
||||||
|
logger.Log(PluginLogLevel.Debug, "Sucessfully tuned with retries.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (caps.HasFlag(Caps.SR_MISSEL))
|
if (caps.HasFlag(Caps.SR_MISSEL))
|
||||||
|
|||||||
@ -27,6 +27,7 @@ namespace skyscraper5.src.Skyscraper.FrequencyListGenerator
|
|||||||
BlScanFailure = 108,
|
BlScanFailure = 108,
|
||||||
DataSaving = 4,
|
DataSaving = 4,
|
||||||
IqCollecting = 5,
|
IqCollecting = 5,
|
||||||
IqSaving = 6
|
IqSaving = 6,
|
||||||
}
|
Retrying = 7
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,11 +52,19 @@ namespace skyscraper8.Skyscraper.FrequencyListGenerator
|
|||||||
if (!_proxiedStreamReader.StartDvbEx(targetTuner))
|
if (!_proxiedStreamReader.StartDvbEx(targetTuner))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (lastDiseqcType != uint.MaxValue)
|
/*if (lastDiseqcType != uint.MaxValue)
|
||||||
{
|
{
|
||||||
if (!_proxiedStreamReader.SendDiSEqC(lastDiseqcType, lastDiseqcOpcode))
|
if (!_proxiedStreamReader.SendDiSEqC(lastDiseqcType, lastDiseqcOpcode))
|
||||||
return false;
|
return false;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
if (lastDiseqcOpcode.HasFlag(DiSEqC_Opcode.DISEQC_HORIZONTAL))
|
||||||
|
{
|
||||||
|
if (!_proxiedStreamReader.StopDVB())
|
||||||
|
return false;
|
||||||
|
if (!_proxiedStreamReader.StartDvbEx(targetTuner))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
currentlySelectedTuner = targetTuner;
|
currentlySelectedTuner = targetTuner;
|
||||||
return true;
|
return true;
|
||||||
@ -260,9 +268,13 @@ namespace skyscraper8.Skyscraper.FrequencyListGenerator
|
|||||||
if (!SwitchTuner(_setFilterTuner))
|
if (!SwitchTuner(_setFilterTuner))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
bool diseqc = SendDiSEqC(lastDiseqcType, lastDiseqcOpcode);
|
||||||
|
|
||||||
if (!_proxiedStreamReader.BLScanEx(freq, freq_range, pol, lof1, lof2, lofsw, minsr, std, ref pSearchResult))
|
if (!_proxiedStreamReader.BLScanEx(freq, freq_range, pol, lof1, lof2, lofsw, minsr, std, ref pSearchResult))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
logger.InfoFormat("Frequency: {0}, Polarity: {1}, Lock: {2}", freq, pol, pSearchResult.Lock);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
24
skyscraper8/Skyscraper/IntegerExtensions.cs
Normal file
24
skyscraper8/Skyscraper/IntegerExtensions.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace skyscraper8.Skyscraper
|
||||||
|
{
|
||||||
|
internal static class IntegerExtensions
|
||||||
|
{
|
||||||
|
public static int GetHighestDigit(this int source)
|
||||||
|
{
|
||||||
|
int result = 0;
|
||||||
|
while (source > 0)
|
||||||
|
{
|
||||||
|
int currentDigit = source % 10;
|
||||||
|
if (currentDigit > result)
|
||||||
|
result = currentDigit;
|
||||||
|
source /= 10;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -30,9 +30,10 @@ namespace skyscraper5.src.Skyscraper
|
|||||||
string versionString = version.ToString();
|
string versionString = version.ToString();
|
||||||
switch(versionString)
|
switch(versionString)
|
||||||
{
|
{
|
||||||
|
case "1.2.5.208": return QualificationToolResultEnum.Good;
|
||||||
case "1.2.5.194": return QualificationToolResultEnum.Bad; //Won't find most transponders with a 6903x
|
case "1.2.5.194": return QualificationToolResultEnum.Bad; //Won't find most transponders with a 6903x
|
||||||
case "1.2.5.176": return QualificationToolResultEnum.Bad; //Won't find most transponders with a 6903x
|
case "1.2.5.176": return QualificationToolResultEnum.Bad; //Won't find most transponders with a 6903x
|
||||||
case "1.2.4.101": return QualificationToolResultEnum.Good; //Works great, but is reather slow with a 6903x
|
case "1.2.4.101": return QualificationToolResultEnum.Bad; //Breaks GS encapsulation on 6903x.
|
||||||
default: return QualificationToolResultEnum.Unknown;
|
default: return QualificationToolResultEnum.Unknown;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1276,14 +1276,21 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private byte[][] _tmst;
|
||||||
public byte[] GetTmst(ushort interactiveNetworkId)
|
public byte[] GetTmst(ushort interactiveNetworkId)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
if (_tmst == null)
|
||||||
|
return null;
|
||||||
|
if (_tmst[interactiveNetworkId] == null)
|
||||||
|
return null;
|
||||||
|
return _tmst[interactiveNetworkId];
|
||||||
}
|
}
|
||||||
|
|
||||||
public void InsertTmst(ushort interactiveNetworkId, byte[] modes)
|
public void InsertTmst(ushort interactiveNetworkId, byte[] modes)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
if (_tmst == null)
|
||||||
|
_tmst = new byte[ushort.MaxValue][];
|
||||||
|
_tmst[interactiveNetworkId] = modes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateTmst(ushort interactiveNetworkId, byte[] modes)
|
public void UpdateTmst(ushort interactiveNetworkId, byte[] modes)
|
||||||
|
|||||||
@ -32,6 +32,7 @@ namespace skyscraper5.Skyscraper.Text.Encodings
|
|||||||
case 0xc7: resultBuilder.Append('Ç'); break;
|
case 0xc7: resultBuilder.Append('Ç'); break;
|
||||||
case 0xc9: resultBuilder.Append('É'); break;
|
case 0xc9: resultBuilder.Append('É'); break;
|
||||||
case 0xcb: resultBuilder.Append('¼'); break;
|
case 0xcb: resultBuilder.Append('¼'); break;
|
||||||
|
case 0xcd: resultBuilder.Append('Í'); break;
|
||||||
case 0xd6: resultBuilder.Append('Ö'); break;
|
case 0xd6: resultBuilder.Append('Ö'); break;
|
||||||
case 0xdc: resultBuilder.Append('Ü'); break;
|
case 0xdc: resultBuilder.Append('Ü'); break;
|
||||||
case 0xdf: resultBuilder.Append('ß'); break;
|
case 0xdf: resultBuilder.Append('ß'); break;
|
||||||
@ -59,6 +60,7 @@ namespace skyscraper5.Skyscraper.Text.Encodings
|
|||||||
case 0xfa: resultBuilder.Append('ú'); break;
|
case 0xfa: resultBuilder.Append('ú'); break;
|
||||||
case 0xfb: resultBuilder.Append('û'); break;
|
case 0xfb: resultBuilder.Append('û'); break;
|
||||||
case 0xfc: resultBuilder.Append('ü'); break;
|
case 0xfc: resultBuilder.Append('ü'); break;
|
||||||
|
case 0xfd: resultBuilder.Append('ý'); break;
|
||||||
default:
|
default:
|
||||||
throw new NotImplementedException(String.Format("0x{0:X2}", preprocessed[i]));
|
throw new NotImplementedException(String.Format("0x{0:X2}", preprocessed[i]));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -78,19 +78,21 @@ namespace skyscraper5.Skyscraper.Text.Encodings
|
|||||||
case 0xee: resultBuilder.Append('ī'); break;
|
case 0xee: resultBuilder.Append('ī'); break;
|
||||||
case 0xf0: resultBuilder.Append('š'); break;
|
case 0xf0: resultBuilder.Append('š'); break;
|
||||||
case 0xf1: resultBuilder.Append('ń'); break;
|
case 0xf1: resultBuilder.Append('ń'); break;
|
||||||
|
case 0xf2: resultBuilder.Append('ņ'); break;
|
||||||
case 0xf3: resultBuilder.Append('ó'); break;
|
case 0xf3: resultBuilder.Append('ó'); break;
|
||||||
|
case 0xf5: resultBuilder.Append('õ'); break;
|
||||||
case 0xf6: resultBuilder.Append('ö'); break;
|
case 0xf6: resultBuilder.Append('ö'); break;
|
||||||
case 0xf8: resultBuilder.Append('ų'); break;
|
case 0xf8: resultBuilder.Append('ų'); break;
|
||||||
case 0xf9: resultBuilder.Append('ł'); break;
|
case 0xf9: resultBuilder.Append('ł'); break;
|
||||||
case 0xfa: resultBuilder.Append('ś'); break;
|
case 0xfa: resultBuilder.Append('ś'); break;
|
||||||
case 0xfb: resultBuilder.Append('ū'); break;
|
case 0xfb: resultBuilder.Append('ū'); break;
|
||||||
case 0xfc: resultBuilder.Append('ü'); break;
|
case 0xfc: resultBuilder.Append('ü'); break;
|
||||||
case 0xfd: resultBuilder.Append('ż'); break;
|
case 0xfd: resultBuilder.Append('ż'); break;
|
||||||
case 0xfe: resultBuilder.Append('ž'); break;
|
case 0xfe: resultBuilder.Append('ž'); break;
|
||||||
case 0xff: resultBuilder.Append('’'); break;
|
case 0xff: resultBuilder.Append('’'); break;
|
||||||
default:
|
default:
|
||||||
throw new NotImplementedException(String.Format("0x{0:X2}", preprocessed[i]));
|
throw new NotImplementedException(String.Format("0x{0:X2}", preprocessed[i]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return resultBuilder.ToString().ToCharArray();
|
return resultBuilder.ToString().ToCharArray();
|
||||||
|
|||||||
@ -26,6 +26,7 @@ namespace skyscraper5.Skyscraper.Text.Encodings
|
|||||||
case 0xa2: resultBuilder.Append('’'); break;
|
case 0xa2: resultBuilder.Append('’'); break;
|
||||||
case 0xa3: resultBuilder.Append('£'); break;
|
case 0xa3: resultBuilder.Append('£'); break;
|
||||||
case 0xa4: resultBuilder.Append('€'); break;
|
case 0xa4: resultBuilder.Append('€'); break;
|
||||||
|
case 0xa8: resultBuilder.Append('¨'); break;
|
||||||
case 0xa9: resultBuilder.Append('©'); break;
|
case 0xa9: resultBuilder.Append('©'); break;
|
||||||
case 0xab: resultBuilder.Append('«'); break;
|
case 0xab: resultBuilder.Append('«'); break;
|
||||||
case 0xad: resultBuilder.Append('\u00AD'); break;
|
case 0xad: resultBuilder.Append('\u00AD'); break;
|
||||||
|
|||||||
@ -32,17 +32,26 @@ namespace skyscraper5.Teletext
|
|||||||
{
|
{
|
||||||
//Non-Displayable Packet Y = 26 to 31
|
//Non-Displayable Packet Y = 26 to 31
|
||||||
if (ms.GetAvailableBytes() == 0)
|
if (ms.GetAvailableBytes() == 0)
|
||||||
|
{
|
||||||
|
Valid = false;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
DesignationCode = ms.ReadUInt8();
|
DesignationCode = ms.ReadUInt8();
|
||||||
if (ms.GetAvailableBytes() < 39)
|
if (ms.GetAvailableBytes() < 39)
|
||||||
return;
|
{
|
||||||
|
Valid = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
CharacterCodes = ms.ReadBytes(39);
|
CharacterCodes = ms.ReadBytes(39);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//Normal Packet (Y = 1 to 25)
|
//Normal Packet (Y = 1 to 25)
|
||||||
if (ms.GetAvailableBytes() < 40)
|
if (ms.GetAvailableBytes() < 40)
|
||||||
return;
|
{
|
||||||
|
Valid = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
CharacterCodes = ms.ReadBytes(40);
|
CharacterCodes = ms.ReadBytes(40);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user