feyris-tan c64a0f5c46
Some checks failed
🚀 Pack skyscraper8 / make-zip (push) Failing after 1m29s
Can now parse RMT, CMT and TBTP2 from GSE packets.
2025-11-09 12:16:44 +01:00

41 lines
1.0 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using skyscraper5.Skyscraper;
using skyscraper5.Skyscraper.IO;
namespace skyscraper8.InteractionChannel
{
/// <summary>
/// Represents the structure in ETSI EN 301 545-2 V1.4.1, clause 6.4.3.1.1
/// </summary>
internal class GseTableStructure : Validatable
{
public GseTableStructure(byte[] buffer)
{
MemoryStream ms = new MemoryStream(buffer, false);
TableId = ms.ReadUInt8();
InteractiveNetworkId = ms.ReadUInt16BE();
byte byteA = ms.ReadUInt8();
VersionNumber = (byteA & 0x3e) >> 1;
CurrentNextIndicator = (byteA & 0x01) != 0;
TableContent = ms.ReadBytes(ms.GetAvailableBytes());
Valid = true;
}
public byte[] TableContent { get; private set; }
public bool CurrentNextIndicator { get; private set; }
public int VersionNumber { get; private set; }
public ushort InteractiveNetworkId { get; private set; }
public byte TableId { get; private set; }
}
}