diff --git a/Documentation/ATSC3-XSD/RRT-1.0-20170209.xsd b/Documentation/ATSC3-XSD/RRT-1.0-20170209.xsd
new file mode 100644
index 0000000..2220218
--- /dev/null
+++ b/Documentation/ATSC3-XSD/RRT-1.0-20170209.xsd
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Documentation/ATSC3-XSD/SA-1.0-20170921.xsd b/Documentation/ATSC3-XSD/SA-1.0-20170921.xsd
new file mode 100644
index 0000000..168e7c6
--- /dev/null
+++ b/Documentation/ATSC3-XSD/SA-1.0-20170921.xsd
@@ -0,0 +1,225 @@
+
+
+
+
+
+
+ The definition of this schema can also be found in an XML schema file, SA-1.0-20170921.xsd at the ATSC website.The XML schema file RRT-1.0-20170209.xsd can also be found at the ATSC website.
+
+
+
+
+
+
+ Name and Description elements in Service and Content Fragments of OMA BCAST service guide will be replaced with following extended elements
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This element is a wrapper for ATSC service extensions to OMA BCAST SG Service fragments. It shall only be used inside a PrivateExt element within a Service fragment.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This element is a wrapper for ATSC media extensions to OMA BCAST SG Content fragments. It shall only be used inside a PrivateExt element within a Content fragment.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This element is only used inside a PrivateExt element within a Content fragment as defined in Table 5.7 and its cardinality is defined in Table 5.9.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Documentation/ATSC3-XSD/SLT-1.0-20180228.xsd b/Documentation/ATSC3-XSD/SLT-1.0-20180228.xsd
new file mode 100644
index 0000000..458f558
--- /dev/null
+++ b/Documentation/ATSC3-XSD/SLT-1.0-20180228.xsd
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Documentation/ATSC3-XSD/SYSTIME-1.0-20170921.xsd b/Documentation/ATSC3-XSD/SYSTIME-1.0-20170921.xsd
new file mode 100644
index 0000000..afbf4ec
--- /dev/null
+++ b/Documentation/ATSC3-XSD/SYSTIME-1.0-20170921.xsd
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Documentation/ATSC3-XSD/make-xsd.bat b/Documentation/ATSC3-XSD/make-xsd.bat
new file mode 100644
index 0000000..b1699e5
--- /dev/null
+++ b/Documentation/ATSC3-XSD/make-xsd.bat
@@ -0,0 +1,3 @@
+"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8.1 Tools\x64\xsd.exe" /classes SLT-1.0-20180228.xsd SA-1.0-20170921.xsd RRT-1.0-20170209.xsd /out:. /namespace:skyscraper8.Atsc.A331.Schema
+"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8.1 Tools\x64\xsd.exe" /classes SYSTIME-1.0-20170921.xsd /out:. /namespace:skyscraper8.Atsc.A331.Schema
+pause
diff --git a/skyscraper8/Atsc/A324/BasebandPacketDataStreamReceiver.cs b/skyscraper8/Atsc/A324/BasebandPacketDataStreamReceiver.cs
index 1ec44e8..6ece5b7 100644
--- a/skyscraper8/Atsc/A324/BasebandPacketDataStreamReceiver.cs
+++ b/skyscraper8/Atsc/A324/BasebandPacketDataStreamReceiver.cs
@@ -17,6 +17,7 @@ using System.Threading.Tasks;
namespace skyscraper8.Atsc.A324
{
[SkyscraperPlugin]
+ [PluginPriority(2)]
internal class BasebandPacketDataStreamReceiver : ISkyscraperMpePlugin
{
private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name);
diff --git a/skyscraper8/Atsc/A324/StltpReceiver.cs b/skyscraper8/Atsc/A324/StltpReceiver.cs
index 02bf987..561b72f 100644
--- a/skyscraper8/Atsc/A324/StltpReceiver.cs
+++ b/skyscraper8/Atsc/A324/StltpReceiver.cs
@@ -14,6 +14,7 @@ using System.Threading.Tasks;
namespace skyscraper8.Atsc.A324
{
[SkyscraperPlugin]
+ [PluginPriority(1)]
internal class StltpReceiver : ISkyscraperMpePlugin
{
public bool CanHandlePacket(InternetHeader internetHeader, byte[] ipv4Packet)
diff --git a/skyscraper8/Atsc/A331/Atsc3EventHandler.cs b/skyscraper8/Atsc/A331/Atsc3EventHandler.cs
new file mode 100644
index 0000000..5dea2a6
--- /dev/null
+++ b/skyscraper8/Atsc/A331/Atsc3EventHandler.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using skyscraper8.Atsc.A331.Schema;
+
+namespace skyscraper8.Atsc.A331
+{
+ internal interface IAtsc3EventHandler
+ {
+ void OnAtsc3Detected();
+ void OnAtsc3ServiceList(sltType slt);
+ }
+}
diff --git a/skyscraper8/Atsc/A331/Atsc3Unpacker.cs b/skyscraper8/Atsc/A331/Atsc3Unpacker.cs
new file mode 100644
index 0000000..51f95f5
--- /dev/null
+++ b/skyscraper8/Atsc/A331/Atsc3Unpacker.cs
@@ -0,0 +1,119 @@
+using log4net;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Text;
+using System.Threading.Tasks;
+using skyscraper5.Ietf.Rfc768;
+using skyscraper5.Ietf.Rfc971;
+using skyscraper5.Skyscraper;
+using skyscraper5.Skyscraper.Plugins;
+using skyscraper5.Skyscraper.Scraper;
+using skyscraper8.Atsc.A331.Schema;
+
+namespace skyscraper8.Atsc.A331
+{
+ [SkyscraperPlugin]
+ [PluginPriority(3)]
+ internal class Atsc3Unpacker : ISkyscraperMpePlugin
+ {
+ private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name);
+ private static readonly IPAddress LLS_IP = IPAddress.Parse("224.0.23.60");
+ private static readonly ushort LLS_PORT = 4937;
+
+ private IAtsc3EventHandler eventHandler;
+ private bool systimeDetected;
+
+ public void ConnectToStorage(object[] connector)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void SetContext(DateTime? currentTime, object skyscraperContext)
+ {
+ eventHandler = (IAtsc3EventHandler)skyscraperContext;
+ }
+
+ private bool atsc3detected;
+ public bool CanHandlePacket(InternetHeader internetHeader, byte[] ipv4Packet)
+ {
+ if (internetHeader.Protocol != 0x11)
+ return false;
+
+ if (atsc3detected && internetHeader.IsDestinationMulticast)
+ return true;
+
+ if (internetHeader.DestinationAddress.Equals(LLS_IP))
+ {
+ if (ipv4Packet.GetUInt16BE(2) == LLS_PORT)
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public void HandlePacket(InternetHeader internetHeader, byte[] ipv4Packet)
+ {
+ _stopProcessIndicator = false;
+ UserDatagram udpPacket = new UserDatagram(ipv4Packet);
+ if (internetHeader.DestinationAddress.Equals(LLS_IP) && udpPacket.DestinationPort == LLS_PORT)
+ {
+ //Handle LLS
+ LlsTable lls = new LlsTable(udpPacket.Payload);
+ HandleLls(lls);
+ return;
+ }
+
+ if (!atsc3detected)
+ {
+ return;
+ }
+ }
+
+ private void HandleLls(LlsTable lls)
+ {
+ if (!lls.Valid)
+ return;
+
+ _stopProcessIndicator = true;
+
+ switch (lls.LlsTableId)
+ {
+ case 0x01:
+ //SLT
+ if (!atsc3detected)
+ {
+ atsc3detected = true;
+ eventHandler.OnAtsc3Detected();
+ }
+ sltType slt = Atsc3Utilities.UnpackSlt(lls.Payload);
+ eventHandler.OnAtsc3ServiceList(slt);
+ break;
+ case 0x03:
+ SysTimeType systime = Atsc3Utilities.UnpackSystime(lls.Payload);
+ if (systime.ptpPrepend != 0 && !systimeDetected)
+ {
+ logger.WarnFormat("Found valid ATSC A/331 SYSTIME, however it is not implemented yet. ");
+ systimeDetected = true;
+ }
+ break;
+ case 0xff:
+ //User defined, can be removed.
+ break;
+ default:
+ logger.InfoFormat(
+ "Encountered unknown ATSC A/331 LLS Table: 0x{0:X2} This means that this stream uses a version of ATSC 3 than skyscraper8 knows about. It would be great if you could share a recording of this stream so this can be implemented.", lls.LlsTableId);
+ break;
+ }
+ }
+
+ private bool _stopProcessIndicator;
+ public bool StopProcessingAfterThis()
+ {
+ return _stopProcessIndicator;
+ }
+ }
+}
diff --git a/skyscraper8/Atsc/A331/Atsc3Utilities.cs b/skyscraper8/Atsc/A331/Atsc3Utilities.cs
new file mode 100644
index 0000000..a338fe2
--- /dev/null
+++ b/skyscraper8/Atsc/A331/Atsc3Utilities.cs
@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Xml.Serialization;
+using skyscraper8.Atsc.A331.Schema;
+
+namespace skyscraper8.Atsc.A331
+{
+ internal static class Atsc3Utilities
+ {
+ private static XmlSerializer sltSerializer;
+ private static XmlSerializer systimeSerializer;
+
+ public static sltType UnpackSlt(byte[] buffer)
+ {
+ if (sltSerializer == null)
+ {
+ sltSerializer = new XmlSerializer(typeof(sltType));
+ }
+ MemoryStream ms = new MemoryStream(buffer, false);
+ object deserialize = sltSerializer.Deserialize(ms);
+ sltType result = (sltType)deserialize;
+ return result;
+ }
+
+ public static SysTimeType UnpackSystime(byte[] buffer)
+ {
+ if (systimeSerializer == null)
+ {
+ systimeSerializer = new XmlSerializer(typeof(SysTimeType));
+ }
+ MemoryStream ms = new MemoryStream(buffer, false);
+ object deserialize = systimeSerializer.Deserialize(ms);
+ SysTimeType result = (SysTimeType)deserialize;
+ return result;
+ }
+ }
+}
diff --git a/skyscraper8/Atsc/A331/LlsTable.cs b/skyscraper8/Atsc/A331/LlsTable.cs
new file mode 100644
index 0000000..02be174
--- /dev/null
+++ b/skyscraper8/Atsc/A331/LlsTable.cs
@@ -0,0 +1,59 @@
+using Ionic.Zlib;
+using log4net;
+using skyscraper5.Skyscraper;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace skyscraper8.Atsc.A331
+{
+ internal class LlsTable : Validatable
+ {
+ private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name);
+
+ public LlsTable(Span data)
+ {
+ LlsTableId = data[0];
+ LlsGroupId = data[1];
+ GroupCount = data[2] + 1;
+ TableVersion = data[3];
+
+ data = data.Slice(4);
+ if (data[0] != 0x1f)
+ {
+ Valid = false;
+ return;
+ }
+
+ if (data[1] != 0x8b)
+ {
+ Valid = false;
+ return;
+ }
+
+ try
+ {
+ Payload = GZipStream.UncompressBuffer(data.ToArray());
+ Valid = true;
+ }
+ catch (Exception e)
+ {
+ Valid = false;
+ logger.ErrorFormat("Failed to unpack the payload of an ATSC A/331 LLS table.");
+ }
+
+ }
+
+ public byte[] Payload { get; private set; }
+
+ public byte TableVersion { get; private set; }
+
+ public int GroupCount { get; private set; }
+
+ public byte LlsGroupId { get; private set; }
+
+ public byte LlsTableId { get; private set; }
+ }
+}
diff --git a/skyscraper8/Atsc/A331/Schema/SLT-1_0-20180228_SA-1_0-20170921_RRT-1_0-20170209.cs b/skyscraper8/Atsc/A331/Schema/SLT-1_0-20180228_SA-1_0-20170921_RRT-1_0-20170209.cs
new file mode 100644
index 0000000..1a8aea1
--- /dev/null
+++ b/skyscraper8/Atsc/A331/Schema/SLT-1_0-20180228_SA-1_0-20170921_RRT-1_0-20170209.cs
@@ -0,0 +1,2418 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+//
+// This source code was auto-generated by xsd, Version=4.8.9037.0.
+//
+namespace skyscraper8.Atsc.A331.Schema {
+ using System.Xml.Serialization;
+
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/Delivery/SLT/1.0/")]
+ [System.Xml.Serialization.XmlRootAttribute("SLT", Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/Delivery/SLT/1.0/", IsNullable=false)]
+ public partial class sltType {
+
+ private string sLTCapabilitiesField;
+
+ private URLType[] sLTInetUrlField;
+
+ private serviceType[] serviceField;
+
+ private System.Xml.XmlElement[] anyField;
+
+ private ushort[] bsidField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ ///
+ public string SLTCapabilities {
+ get {
+ return this.sLTCapabilitiesField;
+ }
+ set {
+ this.sLTCapabilitiesField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("SLTInetUrl")]
+ public URLType[] SLTInetUrl {
+ get {
+ return this.sLTInetUrlField;
+ }
+ set {
+ this.sLTInetUrlField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("Service")]
+ public serviceType[] Service {
+ get {
+ return this.serviceField;
+ }
+ set {
+ this.serviceField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ public System.Xml.XmlElement[] Any {
+ get {
+ return this.anyField;
+ }
+ set {
+ this.anyField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public ushort[] bsid {
+ get {
+ return this.bsidField;
+ }
+ set {
+ this.bsidField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/Delivery/SLT/1.0/")]
+ public partial class URLType {
+
+ private byte urlTypeField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ private string valueField;
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public byte urlType {
+ get {
+ return this.urlTypeField;
+ }
+ set {
+ this.urlTypeField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute(DataType="anyURI")]
+ public string Value {
+ get {
+ return this.valueField;
+ }
+ set {
+ this.valueField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/Delivery/SLT/1.0/")]
+ public partial class OtherBsidType {
+
+ private byte typeField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ private string[] textField;
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public byte type {
+ get {
+ return this.typeField;
+ }
+ set {
+ this.typeField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute()]
+ public string[] Text {
+ get {
+ return this.textField;
+ }
+ set {
+ this.textField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/Delivery/SLT/1.0/")]
+ public partial class broadcastSigType {
+
+ private byte slsProtocolField;
+
+ private byte slsMajorProtocolVersionField;
+
+ private byte slsMinorProtocolVersionField;
+
+ private string slsDestinationIpAddressField;
+
+ private ushort slsDestinationUdpPortField;
+
+ private string slsSourceIpAddressField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ public broadcastSigType() {
+ this.slsMajorProtocolVersionField = ((byte)(1));
+ this.slsMinorProtocolVersionField = ((byte)(0));
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public byte slsProtocol {
+ get {
+ return this.slsProtocolField;
+ }
+ set {
+ this.slsProtocolField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ [System.ComponentModel.DefaultValueAttribute(typeof(byte), "1")]
+ public byte slsMajorProtocolVersion {
+ get {
+ return this.slsMajorProtocolVersionField;
+ }
+ set {
+ this.slsMajorProtocolVersionField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ [System.ComponentModel.DefaultValueAttribute(typeof(byte), "0")]
+ public byte slsMinorProtocolVersion {
+ get {
+ return this.slsMinorProtocolVersionField;
+ }
+ set {
+ this.slsMinorProtocolVersionField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="token")]
+ public string slsDestinationIpAddress {
+ get {
+ return this.slsDestinationIpAddressField;
+ }
+ set {
+ this.slsDestinationIpAddressField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public ushort slsDestinationUdpPort {
+ get {
+ return this.slsDestinationUdpPortField;
+ }
+ set {
+ this.slsDestinationUdpPortField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="token")]
+ public string slsSourceIpAddress {
+ get {
+ return this.slsSourceIpAddressField;
+ }
+ set {
+ this.slsSourceIpAddressField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/Delivery/SLT/1.0/")]
+ public partial class SimulcastTSIDType {
+
+ private ushort simulcastMajorChannelNoField;
+
+ private bool simulcastMajorChannelNoFieldSpecified;
+
+ private ushort simulcastMinorChannelNoField;
+
+ private bool simulcastMinorChannelNoFieldSpecified;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ private ushort valueField;
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public ushort simulcastMajorChannelNo {
+ get {
+ return this.simulcastMajorChannelNoField;
+ }
+ set {
+ this.simulcastMajorChannelNoField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool simulcastMajorChannelNoSpecified {
+ get {
+ return this.simulcastMajorChannelNoFieldSpecified;
+ }
+ set {
+ this.simulcastMajorChannelNoFieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public ushort simulcastMinorChannelNo {
+ get {
+ return this.simulcastMinorChannelNoField;
+ }
+ set {
+ this.simulcastMinorChannelNoField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool simulcastMinorChannelNoSpecified {
+ get {
+ return this.simulcastMinorChannelNoFieldSpecified;
+ }
+ set {
+ this.simulcastMinorChannelNoFieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute()]
+ public ushort Value {
+ get {
+ return this.valueField;
+ }
+ set {
+ this.valueField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/Delivery/SLT/1.0/")]
+ public partial class serviceType {
+
+ private SimulcastTSIDType simulcastTSIDField;
+
+ private string svcCapabilitiesField;
+
+ private broadcastSigType broadcastSvcSignalingField;
+
+ private URLType[] svcInetUrlField;
+
+ private OtherBsidType[] otherBsidField;
+
+ private System.Xml.XmlElement[] anyField;
+
+ private ushort serviceIdField;
+
+ private string globalServiceIDField;
+
+ private byte sltSvcSeqNumField;
+
+ private bool protectedField;
+
+ private ushort majorChannelNoField;
+
+ private bool majorChannelNoFieldSpecified;
+
+ private ushort minorChannelNoField;
+
+ private bool minorChannelNoFieldSpecified;
+
+ private byte serviceCategoryField;
+
+ private string shortServiceNameField;
+
+ private bool hiddenField;
+
+ private bool broadbandAccessRequiredField;
+
+ private bool essentialField;
+
+ private bool essentialFieldSpecified;
+
+ private string drmSystemIDField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ public serviceType() {
+ this.protectedField = false;
+ this.hiddenField = false;
+ this.broadbandAccessRequiredField = false;
+ }
+
+ ///
+ public SimulcastTSIDType SimulcastTSID {
+ get {
+ return this.simulcastTSIDField;
+ }
+ set {
+ this.simulcastTSIDField = value;
+ }
+ }
+
+ ///
+ public string SvcCapabilities {
+ get {
+ return this.svcCapabilitiesField;
+ }
+ set {
+ this.svcCapabilitiesField = value;
+ }
+ }
+
+ ///
+ public broadcastSigType BroadcastSvcSignaling {
+ get {
+ return this.broadcastSvcSignalingField;
+ }
+ set {
+ this.broadcastSvcSignalingField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("SvcInetUrl")]
+ public URLType[] SvcInetUrl {
+ get {
+ return this.svcInetUrlField;
+ }
+ set {
+ this.svcInetUrlField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("OtherBsid")]
+ public OtherBsidType[] OtherBsid {
+ get {
+ return this.otherBsidField;
+ }
+ set {
+ this.otherBsidField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ public System.Xml.XmlElement[] Any {
+ get {
+ return this.anyField;
+ }
+ set {
+ this.anyField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public ushort serviceId {
+ get {
+ return this.serviceIdField;
+ }
+ set {
+ this.serviceIdField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string globalServiceID {
+ get {
+ return this.globalServiceIDField;
+ }
+ set {
+ this.globalServiceIDField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public byte sltSvcSeqNum {
+ get {
+ return this.sltSvcSeqNumField;
+ }
+ set {
+ this.sltSvcSeqNumField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ [System.ComponentModel.DefaultValueAttribute(false)]
+ public bool @protected {
+ get {
+ return this.protectedField;
+ }
+ set {
+ this.protectedField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public ushort majorChannelNo {
+ get {
+ return this.majorChannelNoField;
+ }
+ set {
+ this.majorChannelNoField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool majorChannelNoSpecified {
+ get {
+ return this.majorChannelNoFieldSpecified;
+ }
+ set {
+ this.majorChannelNoFieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public ushort minorChannelNo {
+ get {
+ return this.minorChannelNoField;
+ }
+ set {
+ this.minorChannelNoField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool minorChannelNoSpecified {
+ get {
+ return this.minorChannelNoFieldSpecified;
+ }
+ set {
+ this.minorChannelNoFieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public byte serviceCategory {
+ get {
+ return this.serviceCategoryField;
+ }
+ set {
+ this.serviceCategoryField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public string shortServiceName {
+ get {
+ return this.shortServiceNameField;
+ }
+ set {
+ this.shortServiceNameField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ [System.ComponentModel.DefaultValueAttribute(false)]
+ public bool hidden {
+ get {
+ return this.hiddenField;
+ }
+ set {
+ this.hiddenField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ [System.ComponentModel.DefaultValueAttribute(false)]
+ public bool broadbandAccessRequired {
+ get {
+ return this.broadbandAccessRequiredField;
+ }
+ set {
+ this.broadbandAccessRequiredField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public bool essential {
+ get {
+ return this.essentialField;
+ }
+ set {
+ this.essentialField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool essentialSpecified {
+ get {
+ return this.essentialFieldSpecified;
+ }
+ set {
+ this.essentialFieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string drmSystemID {
+ get {
+ return this.drmSystemIDField;
+ }
+ set {
+ this.drmSystemIDField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/SA/1.0/")]
+ [System.Xml.Serialization.XmlRootAttribute("Name", Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/SA/1.0/", IsNullable=false)]
+ public partial class NameDescriptionType {
+
+ private NameDescriptionTypeSpeechInfoURI[] speechInfoURIField;
+
+ private NameDescriptionTypeSpeechInfo[] speechInfoField;
+
+ private System.Xml.XmlElement[] anyField;
+
+ private string textField;
+
+ private string langField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("SpeechInfoURI")]
+ public NameDescriptionTypeSpeechInfoURI[] SpeechInfoURI {
+ get {
+ return this.speechInfoURIField;
+ }
+ set {
+ this.speechInfoURIField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("SpeechInfo")]
+ public NameDescriptionTypeSpeechInfo[] SpeechInfo {
+ get {
+ return this.speechInfoField;
+ }
+ set {
+ this.speechInfoField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ public System.Xml.XmlElement[] Any {
+ get {
+ return this.anyField;
+ }
+ set {
+ this.anyField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public string text {
+ get {
+ return this.textField;
+ }
+ set {
+ this.textField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(Form=System.Xml.Schema.XmlSchemaForm.Qualified, Namespace="http://www.w3.org/XML/1998/namespace")]
+ public string lang {
+ get {
+ return this.langField;
+ }
+ set {
+ this.langField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/SA/1.0/")]
+ public partial class NameDescriptionTypeSpeechInfoURI {
+
+ private string contenttypeField;
+
+ private string contentencField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ private string valueField;
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute("content-type")]
+ public string contenttype {
+ get {
+ return this.contenttypeField;
+ }
+ set {
+ this.contenttypeField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute("content-enc")]
+ public string contentenc {
+ get {
+ return this.contentencField;
+ }
+ set {
+ this.contentencField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute(DataType="anyURI")]
+ public string Value {
+ get {
+ return this.valueField;
+ }
+ set {
+ this.valueField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/SA/1.0/")]
+ public partial class NameDescriptionTypeSpeechInfo {
+
+ private string contenttypeField;
+
+ private string contentencField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ private string valueField;
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute("content-type")]
+ public string contenttype {
+ get {
+ return this.contenttypeField;
+ }
+ set {
+ this.contenttypeField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute("content-enc")]
+ public string contentenc {
+ get {
+ return this.contentencField;
+ }
+ set {
+ this.contentencField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute()]
+ public string Value {
+ get {
+ return this.valueField;
+ }
+ set {
+ this.valueField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/SA/1.0/")]
+ [System.Xml.Serialization.XmlRootAttribute("ContentAdvisoryRatings", Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/SA/1.0/", IsNullable=false)]
+ public partial class CARatingType {
+
+ private byte regionIdentifierField;
+
+ private bool regionIdentifierFieldSpecified;
+
+ private CARatingTypeRatingDescription ratingDescriptionField;
+
+ private byte ratedDimensionsField;
+
+ private bool ratedDimensionsFieldSpecified;
+
+ private RatingDimValType[] ratingDimValField;
+
+ private System.Xml.XmlElement[] anyField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ ///
+ public byte RegionIdentifier {
+ get {
+ return this.regionIdentifierField;
+ }
+ set {
+ this.regionIdentifierField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool RegionIdentifierSpecified {
+ get {
+ return this.regionIdentifierFieldSpecified;
+ }
+ set {
+ this.regionIdentifierFieldSpecified = value;
+ }
+ }
+
+ ///
+ public CARatingTypeRatingDescription RatingDescription {
+ get {
+ return this.ratingDescriptionField;
+ }
+ set {
+ this.ratingDescriptionField = value;
+ }
+ }
+
+ ///
+ public byte RatedDimensions {
+ get {
+ return this.ratedDimensionsField;
+ }
+ set {
+ this.ratedDimensionsField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool RatedDimensionsSpecified {
+ get {
+ return this.ratedDimensionsFieldSpecified;
+ }
+ set {
+ this.ratedDimensionsFieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("RatingDimVal")]
+ public RatingDimValType[] RatingDimVal {
+ get {
+ return this.ratingDimValField;
+ }
+ set {
+ this.ratingDimValField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ public System.Xml.XmlElement[] Any {
+ get {
+ return this.anyField;
+ }
+ set {
+ this.anyField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/SA/1.0/")]
+ public partial class CARatingTypeRatingDescription {
+
+ private string langField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ private string valueField;
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(Form=System.Xml.Schema.XmlSchemaForm.Qualified, Namespace="http://www.w3.org/XML/1998/namespace")]
+ public string lang {
+ get {
+ return this.langField;
+ }
+ set {
+ this.langField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute()]
+ public string Value {
+ get {
+ return this.valueField;
+ }
+ set {
+ this.valueField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/SA/1.0/")]
+ public partial class RatingDimValType {
+
+ private byte ratingDimensionField;
+
+ private bool ratingDimensionFieldSpecified;
+
+ private string ratingValueStringField;
+
+ private System.Xml.XmlElement[] anyField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ ///
+ public byte RatingDimension {
+ get {
+ return this.ratingDimensionField;
+ }
+ set {
+ this.ratingDimensionField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool RatingDimensionSpecified {
+ get {
+ return this.ratingDimensionFieldSpecified;
+ }
+ set {
+ this.ratingDimensionFieldSpecified = value;
+ }
+ }
+
+ ///
+ public string RatingValueString {
+ get {
+ return this.ratingValueStringField;
+ }
+ set {
+ this.ratingValueStringField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ public System.Xml.XmlElement[] Any {
+ get {
+ return this.anyField;
+ }
+ set {
+ this.anyField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/SA/1.0/")]
+ [System.Xml.Serialization.XmlRootAttribute("OtherRatings", Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/SA/1.0/", IsNullable=false)]
+ public partial class OtherRatingType {
+
+ private object itemField;
+
+ private System.Xml.XmlElement[] anyField;
+
+ private string ratingSchemeField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("RatingInformationData", typeof(RatingContainerType))]
+ [System.Xml.Serialization.XmlElementAttribute("RatingInformationString", typeof(string))]
+ public object Item {
+ get {
+ return this.itemField;
+ }
+ set {
+ this.itemField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ public System.Xml.XmlElement[] Any {
+ get {
+ return this.anyField;
+ }
+ set {
+ this.anyField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string ratingScheme {
+ get {
+ return this.ratingSchemeField;
+ }
+ set {
+ this.ratingSchemeField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/SA/1.0/")]
+ public partial class RatingContainerType {
+
+ private System.Xml.XmlElement[] anyField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ ///
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ public System.Xml.XmlElement[] Any {
+ get {
+ return this.anyField;
+ }
+ set {
+ this.anyField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/SA/1.0/")]
+ [System.Xml.Serialization.XmlRootAttribute("ATSC3ServiceExtension", Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/SA/1.0/", IsNullable=false)]
+ public partial class ATSC3ServiceExtensionType {
+
+ private ATSC3ServiceExtensionTypeIcon[] iconField;
+
+ private LangString majorChannelNumField;
+
+ private LangString minorChannelNumField;
+
+ private RRsType ratingRegionTablesField;
+
+ private System.Xml.XmlElement[] anyField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("Icon")]
+ public ATSC3ServiceExtensionTypeIcon[] Icon {
+ get {
+ return this.iconField;
+ }
+ set {
+ this.iconField = value;
+ }
+ }
+
+ ///
+ public LangString MajorChannelNum {
+ get {
+ return this.majorChannelNumField;
+ }
+ set {
+ this.majorChannelNumField = value;
+ }
+ }
+
+ ///
+ public LangString MinorChannelNum {
+ get {
+ return this.minorChannelNumField;
+ }
+ set {
+ this.minorChannelNumField = value;
+ }
+ }
+
+ ///
+ public RRsType RatingRegionTables {
+ get {
+ return this.ratingRegionTablesField;
+ }
+ set {
+ this.ratingRegionTablesField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ public System.Xml.XmlElement[] Any {
+ get {
+ return this.anyField;
+ }
+ set {
+ this.anyField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/SA/1.0/")]
+ public partial class ATSC3ServiceExtensionTypeIcon {
+
+ private string mIMETypeField;
+
+ private uint widthField;
+
+ private bool widthFieldSpecified;
+
+ private uint heightField;
+
+ private bool heightFieldSpecified;
+
+ private uint dataSizeField;
+
+ private bool dataSizeFieldSpecified;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ private string valueField;
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public string MIMEType {
+ get {
+ return this.mIMETypeField;
+ }
+ set {
+ this.mIMETypeField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public uint width {
+ get {
+ return this.widthField;
+ }
+ set {
+ this.widthField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool widthSpecified {
+ get {
+ return this.widthFieldSpecified;
+ }
+ set {
+ this.widthFieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public uint height {
+ get {
+ return this.heightField;
+ }
+ set {
+ this.heightField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool heightSpecified {
+ get {
+ return this.heightFieldSpecified;
+ }
+ set {
+ this.heightFieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public uint dataSize {
+ get {
+ return this.dataSizeField;
+ }
+ set {
+ this.dataSizeField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool dataSizeSpecified {
+ get {
+ return this.dataSizeFieldSpecified;
+ }
+ set {
+ this.dataSizeFieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute(DataType="anyURI")]
+ public string Value {
+ get {
+ return this.valueField;
+ }
+ set {
+ this.valueField = value;
+ }
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIncludeAttribute(typeof(IndividualComponentType))]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/SA/1.0/")]
+ public partial class LangString {
+
+ private string langField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ private string valueField;
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(Form=System.Xml.Schema.XmlSchemaForm.Qualified, Namespace="http://www.w3.org/XML/1998/namespace")]
+ public string lang {
+ get {
+ return this.langField;
+ }
+ set {
+ this.langField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute()]
+ public string Value {
+ get {
+ return this.valueField;
+ }
+ set {
+ this.valueField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/SA/1.0/")]
+ public partial class IndividualComponentType : LangString {
+
+ private string languageField;
+
+ private System.Xml.XmlAttribute[] anyAttr1Field;
+
+ public IndividualComponentType() {
+ this.languageField = "en";
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ [System.ComponentModel.DefaultValueAttribute("en")]
+ public string language {
+ get {
+ return this.languageField;
+ }
+ set {
+ this.languageField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr1 {
+ get {
+ return this.anyAttr1Field;
+ }
+ set {
+ this.anyAttr1Field = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/RRT/1.0/")]
+ [System.Xml.Serialization.XmlRootAttribute("RatingRegionTables", Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/RRT/1.0/", IsNullable=false)]
+ public partial class RRsType {
+
+ private RatingRegionTableType[] ratingRegionTableField;
+
+ private System.Xml.XmlElement[] anyField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("RatingRegionTable")]
+ public RatingRegionTableType[] RatingRegionTable {
+ get {
+ return this.ratingRegionTableField;
+ }
+ set {
+ this.ratingRegionTableField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ public System.Xml.XmlElement[] Any {
+ get {
+ return this.anyField;
+ }
+ set {
+ this.anyField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/RRT/1.0/")]
+ public partial class RatingRegionTableType {
+
+ private TextType[] regionIdTextField;
+
+ private DimensionType[] dimensionField;
+
+ private System.Xml.XmlElement[] anyField;
+
+ private byte regionIdentifierField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("RegionIdText")]
+ public TextType[] RegionIdText {
+ get {
+ return this.regionIdTextField;
+ }
+ set {
+ this.regionIdTextField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("Dimension")]
+ public DimensionType[] Dimension {
+ get {
+ return this.dimensionField;
+ }
+ set {
+ this.dimensionField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ public System.Xml.XmlElement[] Any {
+ get {
+ return this.anyField;
+ }
+ set {
+ this.anyField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public byte regionIdentifier {
+ get {
+ return this.regionIdentifierField;
+ }
+ set {
+ this.regionIdentifierField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/RRT/1.0/")]
+ public partial class TextType {
+
+ private string langField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ private string valueField;
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(Form=System.Xml.Schema.XmlSchemaForm.Qualified, Namespace="http://www.w3.org/XML/1998/namespace")]
+ public string lang {
+ get {
+ return this.langField;
+ }
+ set {
+ this.langField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute()]
+ public string Value {
+ get {
+ return this.valueField;
+ }
+ set {
+ this.valueField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/RRT/1.0/")]
+ public partial class DimensionType {
+
+ private TextType[] dimensionTitleField;
+
+ private RatingType[] ratingField;
+
+ private System.Xml.XmlElement[] anyField;
+
+ private byte dimensionLevelsField;
+
+ private bool dimensionGraduatedField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ public DimensionType() {
+ this.dimensionGraduatedField = false;
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("DimensionTitle")]
+ public TextType[] DimensionTitle {
+ get {
+ return this.dimensionTitleField;
+ }
+ set {
+ this.dimensionTitleField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("Rating")]
+ public RatingType[] Rating {
+ get {
+ return this.ratingField;
+ }
+ set {
+ this.ratingField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ public System.Xml.XmlElement[] Any {
+ get {
+ return this.anyField;
+ }
+ set {
+ this.anyField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public byte dimensionLevels {
+ get {
+ return this.dimensionLevelsField;
+ }
+ set {
+ this.dimensionLevelsField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ [System.ComponentModel.DefaultValueAttribute(false)]
+ public bool dimensionGraduated {
+ get {
+ return this.dimensionGraduatedField;
+ }
+ set {
+ this.dimensionGraduatedField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/RRT/1.0/")]
+ public partial class RatingType {
+
+ private TextType[] ratingValueAbbrevField;
+
+ private TextType[] ratingValueStringField;
+
+ private System.Xml.XmlElement[] anyField;
+
+ private byte ratingValueField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("RatingValueAbbrev")]
+ public TextType[] RatingValueAbbrev {
+ get {
+ return this.ratingValueAbbrevField;
+ }
+ set {
+ this.ratingValueAbbrevField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("RatingValueString")]
+ public TextType[] RatingValueString {
+ get {
+ return this.ratingValueStringField;
+ }
+ set {
+ this.ratingValueStringField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ public System.Xml.XmlElement[] Any {
+ get {
+ return this.anyField;
+ }
+ set {
+ this.anyField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public byte ratingValue {
+ get {
+ return this.ratingValueField;
+ }
+ set {
+ this.ratingValueField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/SA/1.0/")]
+ [System.Xml.Serialization.XmlRootAttribute("Components", Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/SA/1.0/", IsNullable=false)]
+ public partial class ComponentsType {
+
+ private IndividualComponentType[] videoComponentField;
+
+ private IndividualComponentType[] audioComponentField;
+
+ private IndividualComponentType[] cCComponentField;
+
+ private IndividualComponentType[] appComponentField;
+
+ private System.Xml.XmlElement[] anyField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("VideoComponent")]
+ public IndividualComponentType[] VideoComponent {
+ get {
+ return this.videoComponentField;
+ }
+ set {
+ this.videoComponentField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("AudioComponent")]
+ public IndividualComponentType[] AudioComponent {
+ get {
+ return this.audioComponentField;
+ }
+ set {
+ this.audioComponentField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("CCComponent")]
+ public IndividualComponentType[] CCComponent {
+ get {
+ return this.cCComponentField;
+ }
+ set {
+ this.cCComponentField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("AppComponent")]
+ public IndividualComponentType[] AppComponent {
+ get {
+ return this.appComponentField;
+ }
+ set {
+ this.appComponentField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ public System.Xml.XmlElement[] Any {
+ get {
+ return this.anyField;
+ }
+ set {
+ this.anyField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/SA/1.0/")]
+ [System.Xml.Serialization.XmlRootAttribute(Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/SA/1.0/", IsNullable=false)]
+ public partial class ContentIcon {
+
+ private string mIMETypeField;
+
+ private uint widthField;
+
+ private bool widthFieldSpecified;
+
+ private uint heightField;
+
+ private bool heightFieldSpecified;
+
+ private uint dataSizeField;
+
+ private bool dataSizeFieldSpecified;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ private string valueField;
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public string MIMEType {
+ get {
+ return this.mIMETypeField;
+ }
+ set {
+ this.mIMETypeField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public uint width {
+ get {
+ return this.widthField;
+ }
+ set {
+ this.widthField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool widthSpecified {
+ get {
+ return this.widthFieldSpecified;
+ }
+ set {
+ this.widthFieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public uint height {
+ get {
+ return this.heightField;
+ }
+ set {
+ this.heightField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool heightSpecified {
+ get {
+ return this.heightFieldSpecified;
+ }
+ set {
+ this.heightFieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public uint dataSize {
+ get {
+ return this.dataSizeField;
+ }
+ set {
+ this.dataSizeField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool dataSizeSpecified {
+ get {
+ return this.dataSizeFieldSpecified;
+ }
+ set {
+ this.dataSizeFieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute(DataType="anyURI")]
+ public string Value {
+ get {
+ return this.valueField;
+ }
+ set {
+ this.valueField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/SA/1.0/")]
+ [System.Xml.Serialization.XmlRootAttribute("Preview", Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/SA/1.0/", IsNullable=false)]
+ public partial class PreviewType {
+
+ private PreviewTypePreviewIcon[] previewIconField;
+
+ private NameDescriptionType[] descriptionField;
+
+ private PreviewTypePreviewContent[] previewContentField;
+
+ private System.Xml.XmlElement[] anyField;
+
+ private string usageField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ public PreviewType() {
+ this.usageField = "promo";
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("PreviewIcon")]
+ public PreviewTypePreviewIcon[] PreviewIcon {
+ get {
+ return this.previewIconField;
+ }
+ set {
+ this.previewIconField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("Description")]
+ public NameDescriptionType[] Description {
+ get {
+ return this.descriptionField;
+ }
+ set {
+ this.descriptionField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("PreviewContent")]
+ public PreviewTypePreviewContent[] PreviewContent {
+ get {
+ return this.previewContentField;
+ }
+ set {
+ this.previewContentField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ public System.Xml.XmlElement[] Any {
+ get {
+ return this.anyField;
+ }
+ set {
+ this.anyField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ [System.ComponentModel.DefaultValueAttribute("promo")]
+ public string usage {
+ get {
+ return this.usageField;
+ }
+ set {
+ this.usageField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/SA/1.0/")]
+ public partial class PreviewTypePreviewIcon {
+
+ private string mIMETypeField;
+
+ private uint widthField;
+
+ private bool widthFieldSpecified;
+
+ private uint heightField;
+
+ private bool heightFieldSpecified;
+
+ private uint dataSizeField;
+
+ private bool dataSizeFieldSpecified;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ private string valueField;
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public string MIMEType {
+ get {
+ return this.mIMETypeField;
+ }
+ set {
+ this.mIMETypeField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public uint width {
+ get {
+ return this.widthField;
+ }
+ set {
+ this.widthField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool widthSpecified {
+ get {
+ return this.widthFieldSpecified;
+ }
+ set {
+ this.widthFieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public uint height {
+ get {
+ return this.heightField;
+ }
+ set {
+ this.heightField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool heightSpecified {
+ get {
+ return this.heightFieldSpecified;
+ }
+ set {
+ this.heightFieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public uint dataSize {
+ get {
+ return this.dataSizeField;
+ }
+ set {
+ this.dataSizeField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool dataSizeSpecified {
+ get {
+ return this.dataSizeFieldSpecified;
+ }
+ set {
+ this.dataSizeFieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute(DataType="anyURI")]
+ public string Value {
+ get {
+ return this.valueField;
+ }
+ set {
+ this.valueField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/SA/1.0/")]
+ public partial class PreviewTypePreviewContent {
+
+ private string mIMETypeField;
+
+ private uint widthField;
+
+ private bool widthFieldSpecified;
+
+ private uint heightField;
+
+ private bool heightFieldSpecified;
+
+ private uint dataSizeField;
+
+ private bool dataSizeFieldSpecified;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ private string valueField;
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public string MIMEType {
+ get {
+ return this.mIMETypeField;
+ }
+ set {
+ this.mIMETypeField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public uint width {
+ get {
+ return this.widthField;
+ }
+ set {
+ this.widthField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool widthSpecified {
+ get {
+ return this.widthFieldSpecified;
+ }
+ set {
+ this.widthFieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public uint height {
+ get {
+ return this.heightField;
+ }
+ set {
+ this.heightField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool heightSpecified {
+ get {
+ return this.heightFieldSpecified;
+ }
+ set {
+ this.heightFieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public uint dataSize {
+ get {
+ return this.dataSizeField;
+ }
+ set {
+ this.dataSizeField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool dataSizeSpecified {
+ get {
+ return this.dataSizeFieldSpecified;
+ }
+ set {
+ this.dataSizeFieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute(DataType="anyURI")]
+ public string Value {
+ get {
+ return this.valueField;
+ }
+ set {
+ this.valueField = value;
+ }
+ }
+ }
+}
diff --git a/skyscraper8/Atsc/A331/Schema/SYSTIME-1_0-20170921.cs b/skyscraper8/Atsc/A331/Schema/SYSTIME-1_0-20170921.cs
new file mode 100644
index 0000000..8d3ff04
--- /dev/null
+++ b/skyscraper8/Atsc/A331/Schema/SYSTIME-1_0-20170921.cs
@@ -0,0 +1,181 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+//
+// This source code was auto-generated by xsd, Version=4.8.9037.0.
+//
+namespace skyscraper8.Atsc.A331.Schema {
+ using System.Xml.Serialization;
+
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/Delivery/SYSTIME/1.0/")]
+ [System.Xml.Serialization.XmlRootAttribute("SystemTime", Namespace="tag:atsc.org,2016:XMLSchemas/ATSC3/Delivery/SYSTIME/1.0/", IsNullable=false)]
+ public partial class SysTimeType {
+
+ private short currentUtcOffsetField;
+
+ private ushort ptpPrependField;
+
+ private bool leap59Field;
+
+ private bool leap61Field;
+
+ private string utcLocalOffsetField;
+
+ private bool dsStatusField;
+
+ private byte dsDayOfMonthField;
+
+ private bool dsDayOfMonthFieldSpecified;
+
+ private byte dsHourField;
+
+ private bool dsHourFieldSpecified;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ public SysTimeType() {
+ this.ptpPrependField = ((ushort)(0));
+ this.leap59Field = false;
+ this.leap61Field = false;
+ this.dsStatusField = false;
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public short currentUtcOffset {
+ get {
+ return this.currentUtcOffsetField;
+ }
+ set {
+ this.currentUtcOffsetField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ [System.ComponentModel.DefaultValueAttribute(typeof(ushort), "0")]
+ public ushort ptpPrepend {
+ get {
+ return this.ptpPrependField;
+ }
+ set {
+ this.ptpPrependField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ [System.ComponentModel.DefaultValueAttribute(false)]
+ public bool leap59 {
+ get {
+ return this.leap59Field;
+ }
+ set {
+ this.leap59Field = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ [System.ComponentModel.DefaultValueAttribute(false)]
+ public bool leap61 {
+ get {
+ return this.leap61Field;
+ }
+ set {
+ this.leap61Field = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="duration")]
+ public string utcLocalOffset {
+ get {
+ return this.utcLocalOffsetField;
+ }
+ set {
+ this.utcLocalOffsetField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ [System.ComponentModel.DefaultValueAttribute(false)]
+ public bool dsStatus {
+ get {
+ return this.dsStatusField;
+ }
+ set {
+ this.dsStatusField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public byte dsDayOfMonth {
+ get {
+ return this.dsDayOfMonthField;
+ }
+ set {
+ this.dsDayOfMonthField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool dsDayOfMonthSpecified {
+ get {
+ return this.dsDayOfMonthFieldSpecified;
+ }
+ set {
+ this.dsDayOfMonthFieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public byte dsHour {
+ get {
+ return this.dsHourField;
+ }
+ set {
+ this.dsHourField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool dsHourSpecified {
+ get {
+ return this.dsHourFieldSpecified;
+ }
+ set {
+ this.dsHourFieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+ }
+}
diff --git a/skyscraper8/Skyscraper/ByteArrayExtensions.cs b/skyscraper8/Skyscraper/ByteArrayExtensions.cs
index 41632ad..da81d58 100644
--- a/skyscraper8/Skyscraper/ByteArrayExtensions.cs
+++ b/skyscraper8/Skyscraper/ByteArrayExtensions.cs
@@ -1,4 +1,5 @@
using skyscraper5.Skyscraper.Plugins;
+using System.Diagnostics;
namespace skyscraper5.Skyscraper
{
@@ -27,5 +28,17 @@ namespace skyscraper5.Skyscraper
data[data.Length - i - 1] = temp;
}
}
+
+ public static ushort GetUInt16BE(this byte[] input, int offset)
+ {
+ byte[] buffer = new byte[2];
+
+ buffer[0] = input[offset + 0];
+ buffer[1] = input[offset + 1];
+
+ if (BitConverter.IsLittleEndian)
+ Array.Reverse(buffer, 0, 2);
+ return BitConverter.ToUInt16(buffer, 0);
+ }
}
}
diff --git a/skyscraper8/Skyscraper/Plugins/PluginManager.cs b/skyscraper8/Skyscraper/Plugins/PluginManager.cs
index 0c34ffa..66c5373 100644
--- a/skyscraper8/Skyscraper/Plugins/PluginManager.cs
+++ b/skyscraper8/Skyscraper/Plugins/PluginManager.cs
@@ -701,6 +701,7 @@ namespace skyscraper5.Skyscraper.Plugins
if (mpePlugin != null)
result.Add(mpePlugin);
}
+ result.Sort(new PluginPrioritySorter());
return result.AsReadOnly();
}
diff --git a/skyscraper8/Skyscraper/Scraper/SkyscraperContext.cs b/skyscraper8/Skyscraper/Scraper/SkyscraperContext.cs
index c775247..dbacdbb 100644
--- a/skyscraper8/Skyscraper/Scraper/SkyscraperContext.cs
+++ b/skyscraper8/Skyscraper/Scraper/SkyscraperContext.cs
@@ -90,6 +90,8 @@ using System.Text;
using System.Threading;
using skyscraper8.Atsc.A322;
using skyscraper8.Atsc.A330;
+using skyscraper8.Atsc.A331;
+using skyscraper8.Atsc.A331.Schema;
using Tsubasa.IO;
using Platform = skyscraper5.Dvb.SystemSoftwareUpdate.Model.Platform;
using RntParser = skyscraper5.Dvb.TvAnytime.RntParser;
@@ -102,7 +104,7 @@ namespace skyscraper5.Skyscraper.Scraper
UpdateNotificationEventHandler, DataCarouselEventHandler, RdsEventHandler, IScte35EventHandler,
IAutodetectionEventHandler, IRstEventHandler, IRntEventHandler, IMultiprotocolEncapsulationEventHandler, ObjectCarouselEventHandler, T2MIEventHandler,
IDisposable, IFrameGrabberEventHandler, IntEventHandler, IRctEventHandler, ISkyscraperContext, IDocsisEventHandler, AbertisDecoderEventHandler, Id3Handler,
- InteractionChannelHandler, SgtEventHandler, IDvbNipEventHandler, UleEventHandler, OtvSsuHandler, NdsSsuHandler, ISubTsHandler, ILldpFrameHandler, SisHandler, IWneHandler, IAtscPlpEventHandler
+ InteractionChannelHandler, SgtEventHandler, IDvbNipEventHandler, UleEventHandler, OtvSsuHandler, NdsSsuHandler, ISubTsHandler, ILldpFrameHandler, SisHandler, IWneHandler, IAtscPlpEventHandler, IAtsc3EventHandler
{
public const bool ALLOW_STREAM_TYPE_AUTODETECTION = true;
public const bool ALLOW_FFMPEG_FRAMEGRABBER = true;
@@ -3555,5 +3557,21 @@ namespace skyscraper5.Skyscraper.Scraper
{
UiJunction?.WneStoryProgress(wneStoryProgress.SessionId, wneStoryProgress.Filename, wneStoryProgress.FileCaught, wneStoryProgress.FileSize);
}
+
+ public void OnAtsc3Detected()
+ {
+ LogEvent(SkyscraperContextEvent.Atsc3Detected);
+ }
+
+ public void OnAtsc3ServiceList(sltType slt)
+ {
+ foreach (serviceType service in slt.Service)
+ {
+ if (DataStorage.UpsertAtsc3Service(service))
+ {
+ LogEvent(SkyscraperContextEvent.Atsc3ServiceFound, service.shortServiceName);
+ }
+ }
+ }
}
}
diff --git a/skyscraper8/Skyscraper/Scraper/SkyscraperContextEvent.cs b/skyscraper8/Skyscraper/Scraper/SkyscraperContextEvent.cs
index a734ba2..6b0dcf1 100644
--- a/skyscraper8/Skyscraper/Scraper/SkyscraperContextEvent.cs
+++ b/skyscraper8/Skyscraper/Scraper/SkyscraperContextEvent.cs
@@ -104,6 +104,8 @@
DvbSisDaughterSitePsi,
DvbSisFramingInformation,
DvbSisTimestamp,
- DvbSisDaughterSiteAdapterConfiguration
+ DvbSisDaughterSiteAdapterConfiguration,
+ Atsc3Detected,
+ Atsc3ServiceFound
}
}
diff --git a/skyscraper8/Skyscraper/Scraper/Storage/DataStorage.cs b/skyscraper8/Skyscraper/Scraper/Storage/DataStorage.cs
index d6b0048..0979eeb 100644
--- a/skyscraper8/Skyscraper/Scraper/Storage/DataStorage.cs
+++ b/skyscraper8/Skyscraper/Scraper/Storage/DataStorage.cs
@@ -26,6 +26,7 @@ using skyscraper8.Ses;
using System.Net;
using System.Net.NetworkInformation;
using skyscraper5.src.InteractionChannel.Model2;
+using skyscraper8.Atsc.A331.Schema;
using skyscraper8.InteractionChannel.Model;
using skyscraper8.InteractionChannel.Model2;
@@ -196,5 +197,12 @@ namespace skyscraper8.Skyscraper.Scraper.Storage
Tim GetLastTim(ushort interactiveNetworkId, PhysicalAddress physicalAddress);
void UpsertTim(ushort interactiveNetworkId, PhysicalAddress physicalAddress, Tim currentTim);
void StoreUpdateNotification2(UpdateNotificationGroup common, UpdateNotificationTarget target);
- }
+
+ ///
+ /// Inserts or Updates an ATSC 3 service in the underlaying data storage.
+ ///
+ /// An ATSC3 Service
+ /// true if the service was added or was changed, false if no changes in the DB were made.
+ bool UpsertAtsc3Service(serviceType service);
+ }
}
diff --git a/skyscraper8/Skyscraper/Scraper/Storage/Filesystem/FilesystemStorage.cs b/skyscraper8/Skyscraper/Scraper/Storage/Filesystem/FilesystemStorage.cs
index 7b8c393..6dd0398 100644
--- a/skyscraper8/Skyscraper/Scraper/Storage/Filesystem/FilesystemStorage.cs
+++ b/skyscraper8/Skyscraper/Scraper/Storage/Filesystem/FilesystemStorage.cs
@@ -46,6 +46,7 @@ using System.Net;
using System.Net.NetworkInformation;
using System.Text;
using System.Text.RegularExpressions;
+using skyscraper8.Atsc.A331.Schema;
using Platform = skyscraper5.Dvb.SystemSoftwareUpdate.Model.Platform;
namespace skyscraper5.Skyscraper.Scraper.Storage.Filesystem
@@ -1782,6 +1783,11 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.Filesystem
throw new NotImplementedException();
}
+ public bool UpsertAtsc3Service(serviceType service)
+ {
+ throw new NotImplementedException();
+ }
+
public RfSpectrumData GetRfSpectrum(Guid jobGuid)
{
string filename = Path.Combine(rootDirectory.FullName, "rf", jobGuid.ToString() + ".rf");
diff --git a/skyscraper8/Skyscraper/Scraper/Storage/InMemory/InMemoryScraperStorage.cs b/skyscraper8/Skyscraper/Scraper/Storage/InMemory/InMemoryScraperStorage.cs
index 8615d32..83b5795 100644
--- a/skyscraper8/Skyscraper/Scraper/Storage/InMemory/InMemoryScraperStorage.cs
+++ b/skyscraper8/Skyscraper/Scraper/Storage/InMemory/InMemoryScraperStorage.cs
@@ -36,6 +36,7 @@ using System.Linq;
using System.Net;
using System.Net.NetworkInformation;
using skyscraper5.src.InteractionChannel.Model2;
+using skyscraper8.Atsc.A331.Schema;
using skyscraper8.Ietf.FLUTE;
using skyscraper8.InteractionChannel.Model;
using skyscraper8.InteractionChannel.Model2;
@@ -1888,5 +1889,21 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
knownUnts[common.Oui] = new Tuple(common, target);
}
+
+ private Dictionary _atsc3Services;
+ public bool UpsertAtsc3Service(serviceType service)
+ {
+ if (_atsc3Services == null)
+ _atsc3Services = new Dictionary();
+ if (_atsc3Services.ContainsKey(service.globalServiceID))
+ {
+ return false;
+ }
+ else
+ {
+ _atsc3Services.Add(service.globalServiceID, service);
+ return true;
+ }
+ }
}
}
diff --git a/skyscraper8/Skyscraper/Scraper/Storage/StorageConnectionManager.cs b/skyscraper8/Skyscraper/Scraper/Storage/StorageConnectionManager.cs
index 229af23..92e0d4d 100644
--- a/skyscraper8/Skyscraper/Scraper/Storage/StorageConnectionManager.cs
+++ b/skyscraper8/Skyscraper/Scraper/Storage/StorageConnectionManager.cs
@@ -1,220 +1,220 @@
-using log4net;
-using skyscraper5.Skyscraper;
-using skyscraper5.Skyscraper.Plugins;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Linq;
-using System.Reflection;
-using System.Text;
-using System.Threading.Tasks;
-using skyscraper5.Skyscraper.Net;
-using skyscraper5.Skyscraper.Scraper.Storage;
-using skyscraper8.Skyscraper.Net;
-using skyscraper8.Skyscraper.Net.Pcap;
-
-namespace skyscraper8.Skyscraper.Scraper.Storage
-{
- public class StorageConnectionManager
- {
- private StorageConnectionManager()
- {
- plugins = PluginManager.GetInstance();
- ini = plugins.Ini;
- }
-
- private readonly PluginManager plugins;
- private static StorageConnectionManager _instance;
- private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name);
- private static Type storageNameAttributeType = typeof(StorageNameAttribute);
- private readonly Ini ini;
-
- public static StorageConnectionManager GetInstance()
- {
- if (_instance == null)
- _instance = new StorageConnectionManager();
- return _instance;
- }
-
- public IEnumerable> GetAllKnownFactoryNames()
- {
- ReadOnlyDictionary dataStorages = plugins.GetDataStorages();
- foreach (KeyValuePair dataStorageFactory in dataStorages)
- {
- yield return new Tuple(dataStorageFactory.Key, true, GetName(dataStorageFactory.Value));
- }
-
- ReadOnlyDictionary objectStorages = plugins.GetObjectStorages();
- foreach (KeyValuePair objectStorageFactory in objectStorages)
- {
- yield return new Tuple(objectStorageFactory.Key, false, GetName(objectStorageFactory.Value));
- }
- }
-
- public string GetName(object o)
- {
- Type type = o.GetType();
- Attribute attribute = type.GetCustomAttribute(storageNameAttributeType);
- StorageNameAttribute storageNameAttribute = attribute as StorageNameAttribute;
- if (storageNameAttribute == null)
- {
- logger.WarnFormat("{0} does not have a {1}.", type.Name, storageNameAttributeType.Name);
- return type.Name;
- }
- return storageNameAttribute.Name;
- }
-
- public DataStorageFactory GetDefaultDataStorageFactory()
- {
- int requiredDataStorageId = ini.ReadValue("startup", "dataStorage", -1);
- if (requiredDataStorageId == -1)
- {
- throw new ScraperStorageException("Could not determine the data storage factory from ini file. Configure it using the UI!");
- }
-
- string iniCategoryName = String.Format("dataStorage{0}", requiredDataStorageId);
- if (!ini.ContainsKey(iniCategoryName))
- {
- throw new ScraperStorageException("Could not find configuration for the storage factory. Configure it using the UI!");
- }
-
- ReadOnlyDictionary dataStorages = plugins.GetDataStorages();
- KeyValuePair valuePair = dataStorages.First(x => x.Key == requiredDataStorageId);
- if (valuePair.Value == null)
- {
- throw new ScraperStorageException(String.Format("Storage Factory {0} was not loaded. Reconfigure with the UI!", requiredDataStorageId));
- }
-
- string factoryCname = String.Format("dataStorage{0}", requiredDataStorageId);
- PluginManager.GetInstance().AutoconfigureObject(factoryCname, valuePair.Value);
-
- return valuePair.Value;
- }
-
- public ObjectStorageFactory GetDefaultObjectStorageFactory()
- {
- int requiredObjectStorageId = ini.ReadValue("startup", "objectStorage", -1);
- if (requiredObjectStorageId == -1)
- {
- throw new ScraperStorageException("Could not determine the object storage factory from ini file. Configure it using the UI!");
- }
-
- string iniCategoryName = String.Format("objectStorage{0}", requiredObjectStorageId);
- if (!ini.ContainsKey(iniCategoryName))
- {
- throw new ScraperStorageException("Could not find configuration for the object storage factory. Configure it using the UI!");
- }
-
- ReadOnlyDictionary dataStorages = plugins.GetObjectStorages();
- KeyValuePair valuePair = dataStorages.First(x => x.Key == requiredObjectStorageId);
- if (valuePair.Value == null)
- {
- throw new ScraperStorageException(String.Format("Object Storage Factory {0} was not loaded. Reconfigure with the UI!", requiredObjectStorageId));
- }
-
- string factoryCname = String.Format("objectStorage{0}", requiredObjectStorageId);
- PluginManager.GetInstance().AutoconfigureObject(factoryCname, valuePair.Value);
-
- return valuePair.Value;
- }
-
- public static object[] GetPluginConnectors(DataStorage dataStorage, ObjectStorage objectStorage)
- {
- object[] dataConnector = dataStorage.GetPluginConnector();
- object[] objectConnector = objectStorage.GetPluginConnector();
- object[] result = new object[dataConnector.Length + objectConnector.Length];
- Array.Copy(dataConnector, 0, result, 0, dataConnector.Length);
- Array.Copy(objectConnector, 0, result, dataConnector.Length, objectConnector.Length);
- return result;
- }
-
- public bool IniExists()
- {
- return ini != null;
- }
-
- public ReadOnlyDictionary GetObjectStorages()
- {
- return plugins.GetObjectStorages();
- }
-
- public ReadOnlyDictionary GetDataStorages()
- {
- return plugins.GetDataStorages();
- }
-
- private bool IsIpTafficHandlerConfigured()
- {
- if (ini == null)
- return false;
- if (!ini.ContainsKey("ip_handler"))
- return false;
- if (!ini["ip_handler"].ContainsKey("type"))
- return false;
- return true;
- }
-
-
- internal IpTrafficHandler GetDefaultIpTrafficHandler()
- {
- Type targetType;
- if (IsIpTafficHandlerConfigured())
- {
- ReadOnlyDictionary handlers = plugins.GetIpTrafficHandlers();
- int type = Int32.Parse(ini["ip_handler"]["type"]);
- if (!handlers.ContainsKey(type))
- {
- logger.WarnFormat("The IP traffic handler with ID {0} was not found. I'm gonna assume you want the pcap files.", type);
- targetType = typeof(PcapIpTrafficHandler);
- }
- else
- {
- targetType = handlers[type];
- }
- }
- else
- {
- logger.WarnFormat("You didn't call \"pcapon\" or \"pcapoff\" before. I'm gonna assume you want the pcap files.");
- targetType = typeof(PcapIpTrafficHandler);
- }
-
- ConstructorInfo constructorInfo = targetType.GetConstructor(new Type[] { });
- if (constructorInfo == null)
- {
- throw new ScraperStorageException(String.Format("The type {0} doesn't contain a parameterless constructor.", targetType.Name));
- }
-
- object invoke = constructorInfo.Invoke(new object[] { });
- return (IpTrafficHandler) invoke;
- }
-
- private bool IsSubTsDumpingConfigured()
- {
- if (ini == null)
- return false;
- if (!ini.ContainsKey("subts"))
- return false;
- if (!ini["subts"].ContainsKey("dump"))
- return false;
- return true;
- }
-
- internal bool IsSubTsDumpingEnabled()
- {
- if (IsSubTsDumpingConfigured())
- {
- return ini.ReadValue("subts", "dump", true);
- }
- else
- {
- logger.WarnFormat("You didn't call the subts option before. I'm gonna assume you want me to dump inner TS packets.");
- return true;
- }
- }
-
+using log4net;
+using skyscraper5.Skyscraper;
+using skyscraper5.Skyscraper.Plugins;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using System.Threading.Tasks;
+using skyscraper5.Skyscraper.Net;
+using skyscraper5.Skyscraper.Scraper.Storage;
+using skyscraper8.Skyscraper.Net;
+using skyscraper8.Skyscraper.Net.Pcap;
+
+namespace skyscraper8.Skyscraper.Scraper.Storage
+{
+ public class StorageConnectionManager
+ {
+ private StorageConnectionManager()
+ {
+ plugins = PluginManager.GetInstance();
+ ini = plugins.Ini;
+ }
+
+ private readonly PluginManager plugins;
+ private static StorageConnectionManager _instance;
+ private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name);
+ private static Type storageNameAttributeType = typeof(StorageNameAttribute);
+ private readonly Ini ini;
+
+ public static StorageConnectionManager GetInstance()
+ {
+ if (_instance == null)
+ _instance = new StorageConnectionManager();
+ return _instance;
+ }
+
+ public IEnumerable> GetAllKnownFactoryNames()
+ {
+ ReadOnlyDictionary dataStorages = plugins.GetDataStorages();
+ foreach (KeyValuePair dataStorageFactory in dataStorages)
+ {
+ yield return new Tuple(dataStorageFactory.Key, true, GetName(dataStorageFactory.Value));
+ }
+
+ ReadOnlyDictionary objectStorages = plugins.GetObjectStorages();
+ foreach (KeyValuePair objectStorageFactory in objectStorages)
+ {
+ yield return new Tuple(objectStorageFactory.Key, false, GetName(objectStorageFactory.Value));
+ }
+ }
+
+ public string GetName(object o)
+ {
+ Type type = o.GetType();
+ Attribute attribute = type.GetCustomAttribute(storageNameAttributeType);
+ StorageNameAttribute storageNameAttribute = attribute as StorageNameAttribute;
+ if (storageNameAttribute == null)
+ {
+ logger.WarnFormat("{0} does not have a {1}.", type.Name, storageNameAttributeType.Name);
+ return type.Name;
+ }
+ return storageNameAttribute.Name;
+ }
+
+ public DataStorageFactory GetDefaultDataStorageFactory()
+ {
+ int requiredDataStorageId = ini.ReadValue("startup", "dataStorage", -1);
+ if (requiredDataStorageId == -1)
+ {
+ throw new ScraperStorageException("Could not determine the data storage factory from ini file. Configure it using the UI!");
+ }
+
+ string iniCategoryName = String.Format("dataStorage{0}", requiredDataStorageId);
+ if (!ini.ContainsKey(iniCategoryName))
+ {
+ throw new ScraperStorageException("Could not find configuration for the storage factory. Configure it using the UI!");
+ }
+
+ ReadOnlyDictionary dataStorages = plugins.GetDataStorages();
+ KeyValuePair valuePair = dataStorages.First(x => x.Key == requiredDataStorageId);
+ if (valuePair.Value == null)
+ {
+ throw new ScraperStorageException(String.Format("Storage Factory {0} was not loaded. Reconfigure with the UI!", requiredDataStorageId));
+ }
+
+ string factoryCname = String.Format("dataStorage{0}", requiredDataStorageId);
+ PluginManager.GetInstance().AutoconfigureObject(factoryCname, valuePair.Value);
+
+ return valuePair.Value;
+ }
+
+ public ObjectStorageFactory GetDefaultObjectStorageFactory()
+ {
+ int requiredObjectStorageId = ini.ReadValue("startup", "objectStorage", -1);
+ if (requiredObjectStorageId == -1)
+ {
+ throw new ScraperStorageException("Could not determine the object storage factory from ini file. Configure it using the UI!");
+ }
+
+ string iniCategoryName = String.Format("objectStorage{0}", requiredObjectStorageId);
+ if (!ini.ContainsKey(iniCategoryName))
+ {
+ throw new ScraperStorageException("Could not find configuration for the object storage factory. Configure it using the UI!");
+ }
+
+ ReadOnlyDictionary dataStorages = plugins.GetObjectStorages();
+ KeyValuePair valuePair = dataStorages.First(x => x.Key == requiredObjectStorageId);
+ if (valuePair.Value == null)
+ {
+ throw new ScraperStorageException(String.Format("Object Storage Factory {0} was not loaded. Reconfigure with the UI!", requiredObjectStorageId));
+ }
+
+ string factoryCname = String.Format("objectStorage{0}", requiredObjectStorageId);
+ PluginManager.GetInstance().AutoconfigureObject(factoryCname, valuePair.Value);
+
+ return valuePair.Value;
+ }
+
+ public static object[] GetPluginConnectors(DataStorage dataStorage, ObjectStorage objectStorage)
+ {
+ object[] dataConnector = dataStorage.GetPluginConnector();
+ object[] objectConnector = objectStorage.GetPluginConnector();
+ object[] result = new object[dataConnector.Length + objectConnector.Length];
+ Array.Copy(dataConnector, 0, result, 0, dataConnector.Length);
+ Array.Copy(objectConnector, 0, result, dataConnector.Length, objectConnector.Length);
+ return result;
+ }
+
+ public bool IniExists()
+ {
+ return ini != null;
+ }
+
+ public ReadOnlyDictionary GetObjectStorages()
+ {
+ return plugins.GetObjectStorages();
+ }
+
+ public ReadOnlyDictionary GetDataStorages()
+ {
+ return plugins.GetDataStorages();
+ }
+
+ private bool IsIpTafficHandlerConfigured()
+ {
+ if (ini == null)
+ return false;
+ if (!ini.ContainsKey("ip_handler"))
+ return false;
+ if (!ini["ip_handler"].ContainsKey("type"))
+ return false;
+ return true;
+ }
+
+
+ internal IpTrafficHandler GetDefaultIpTrafficHandler()
+ {
+ Type targetType;
+ if (IsIpTafficHandlerConfigured())
+ {
+ ReadOnlyDictionary handlers = plugins.GetIpTrafficHandlers();
+ int type = Int32.Parse(ini["ip_handler"]["type"]);
+ if (!handlers.ContainsKey(type))
+ {
+ logger.WarnFormat("The IP traffic handler with ID {0} was not found. I'm gonna assume you want the pcap files.", type);
+ targetType = typeof(PcapIpTrafficHandler);
+ }
+ else
+ {
+ targetType = handlers[type];
+ }
+ }
+ else
+ {
+ logger.WarnFormat("You didn't call \"pcapon\" or \"pcapoff\" before. I'm gonna assume you want the pcap files.");
+ targetType = typeof(PcapIpTrafficHandler);
+ }
+
+ ConstructorInfo constructorInfo = targetType.GetConstructor(new Type[] { });
+ if (constructorInfo == null)
+ {
+ throw new ScraperStorageException(String.Format("The type {0} doesn't contain a parameterless constructor.", targetType.Name));
+ }
+
+ object invoke = constructorInfo.Invoke(new object[] { });
+ return (IpTrafficHandler) invoke;
+ }
+
+ private bool IsSubTsDumpingConfigured()
+ {
+ if (ini == null)
+ return false;
+ if (!ini.ContainsKey("subts"))
+ return false;
+ if (!ini["subts"].ContainsKey("dump"))
+ return false;
+ return true;
+ }
+
+ internal bool IsSubTsDumpingEnabled()
+ {
+ if (IsSubTsDumpingConfigured())
+ {
+ return ini.ReadValue("subts", "dump", true);
+ }
+ else
+ {
+ logger.WarnFormat("You didn't call the subts option before. I'm gonna assume you want me to dump inner TS packets.");
+ return true;
+ }
+ }
+
internal string GetSubTsOutputPath()
- {
- return ini.ReadValue("subts", "outdir", "");
- }
- }
-}
+ {
+ return ini.ReadValue("subts", "outdir", "");
+ }
+ }
+}