protected override void DeserializeFromStream(CitpBinaryReader reader)
        {
            base.DeserializeFromStream(reader);

            switch (Version)
            {
            case MsexVersion.Version1_0:
            case MsexVersion.Version1_1:
            {
                SourceIdentifier = reader.ReadUInt16();
                FrameFormat      = CitpEnumHelper.GetEnumFromIdString <MsexImageFormat>(reader.ReadIdString());
                FrameWidth       = reader.ReadUInt16();
                FrameHeight      = reader.ReadUInt16();

                int frameBufferLength = reader.ReadUInt16();
                FrameBuffer = reader.ReadBytes(frameBufferLength);
            }
            break;

            case MsexVersion.Version1_2:
            {
                MediaServerUuid  = reader.ReadGuid();
                SourceIdentifier = reader.ReadUInt16();
                FrameFormat      = CitpEnumHelper.GetEnumFromIdString <MsexImageFormat>(reader.ReadIdString());
                FrameWidth       = reader.ReadUInt16();
                FrameHeight      = reader.ReadUInt16();

                int frameBufferLength = reader.ReadUInt16();
                FrameBuffer = reader.ReadBytes(frameBufferLength);
            }
            break;
            }
        }
Exemple #2
0
        protected override void DeserializeFromStream(CitpBinaryReader reader)
        {
            base.DeserializeFromStream(reader);

            switch (Version)
            {
            case MsexVersion.Version1_1:
            {
                LibraryId = MsexLibraryId.FromByteArray(reader.ReadBytes(4));

                int elementCount = reader.ReadByte();
                Information = new List <CitpGenericInformation>(elementCount);
                for (int i = 0; i < elementCount; ++i)
                {
                    Information.Add(new CitpGenericInformation
                        {
                            ElementNumber    = reader.ReadByte(),
                            DmxRangeMin      = reader.ReadByte(),
                            DmxRangeMax      = reader.ReadByte(),
                            Name             = reader.ReadString(),
                            VersionTimestamp = DateTimeHelpers.ConvertFromUnixTimestamp(reader.ReadUInt64())
                        });
                }
            }
            break;

            case MsexVersion.Version1_2:
            {
                LibraryId = MsexLibraryId.FromByteArray(reader.ReadBytes(4));

                int elementCount = reader.ReadUInt16();
                Information = new List <CitpGenericInformation>(elementCount);
                for (int i = 0; i < elementCount; ++i)
                {
                    Information.Add(new CitpGenericInformation
                        {
                            ElementNumber    = reader.ReadByte(),
                            SerialNumber     = reader.ReadUInt32(),
                            DmxRangeMin      = reader.ReadByte(),
                            DmxRangeMax      = reader.ReadByte(),
                            Name             = reader.ReadString(),
                            VersionTimestamp = DateTimeHelpers.ConvertFromUnixTimestamp(reader.ReadUInt64())
                        });
                }
            }
            break;
            }
        }
Exemple #3
0
        public override void ReadData(CitpBinaryReader data)
        {
            base.ReadData(data);
            Format = (LiveViewImageFormat)data.ReadByte();
            uint dataSize = data.ReadUInt32();

            Data = data.ReadBytes((int)dataSize);
        }
Exemple #4
0
        protected override void DeserializeFromStream(CitpBinaryReader reader)
        {
            base.DeserializeFromStream(reader);

            switch (Version)
            {
            case MsexVersion.Version1_0:
                LibraryType   = (MsexLibraryType)reader.ReadByte();
                LibraryNumber = reader.ReadByte();
                UpdateFlags   = (MsexElementLibraryUpdatedFlags)reader.ReadByte();
                break;

            case MsexVersion.Version1_1:
                LibraryType = (MsexLibraryType)reader.ReadByte();
                LibraryId   = MsexLibraryId.FromByteArray(reader.ReadBytes(4));
                UpdateFlags = (MsexElementLibraryUpdatedFlags)reader.ReadByte();
                break;

            case MsexVersion.Version1_2:
                LibraryType = (MsexLibraryType)reader.ReadByte();
                LibraryId   = MsexLibraryId.FromByteArray(reader.ReadBytes(4));
                UpdateFlags = (MsexElementLibraryUpdatedFlags)reader.ReadByte();

                AffectedElements = new List <byte>();
                var affectedElementsArray = new BitArray(reader.ReadBytes(32));
                for (byte i = 0; i <= 255; ++i)
                {
                    if (affectedElementsArray[i])
                    {
                        AffectedElements.Add(i);
                    }
                }

                AffectedLibraries = new List <byte>();
                var affectedLibrariesArray = new BitArray(reader.ReadBytes(32));
                for (byte i = 0; i <= 255; ++i)
                {
                    if (affectedLibrariesArray[i])
                    {
                        AffectedLibraries.Add(i);
                    }
                }
                break;
            }
        }
Exemple #5
0
        public override void ReadData(CitpBinaryReader data)
        {
            base.ReadData(data);

            Blind         = data.ReadByte();
            UniverseIndex = data.ReadByte();
            FirstChannel  = data.ReadUInt16();
            int channelCount = data.ReadUInt16();

            ChannelLevels = data.ReadBytes(channelCount);
        }
Exemple #6
0
        public override void ReadData(CitpBinaryReader data)
        {
            base.ReadData(data);

            int liveStatusCount = data.ReadUInt16();

            FlagSize = data.ReadByte();

            LiveStatus.Clear();
            for (int n = 0; n < liveStatusCount; n++)
            {
                LiveStatus status = new LiveStatus()
                {
                    FixtureIdentifier = data.ReadUInt16(),
                    FlagMask          = data.ReadBytes(FlagSize),
                    Flags             = data.ReadBytes(FlagSize)
                };

                LiveStatus.Add(status);
            }
        }
Exemple #7
0
        protected override void DeserializeFromStream(CitpBinaryReader reader)
        {
            base.DeserializeFromStream(reader);

            switch (Version)
            {
            case MsexVersion.Version1_0:
            case MsexVersion.Version1_1:
            {
                int layerStatusCount = reader.ReadByte();
                LayerStatuses = new List <LayerStatus>(layerStatusCount);
                for (int i = 0; i < layerStatusCount; ++i)
                {
                    LayerStatuses.Add(new LayerStatus
                        {
                            LayerNumber        = reader.ReadByte(),
                            PhysicalOutput     = reader.ReadByte(),
                            MediaLibraryNumber = reader.ReadByte(),
                            MediaNumber        = reader.ReadByte(),
                            MediaName          = reader.ReadString(),
                            MediaPosition      = reader.ReadUInt32(),
                            MediaLength        = reader.ReadUInt32(),
                            MediaFps           = reader.ReadByte(),
                            LayerStatusFlags   = (MsexLayerStatusFlags)reader.ReadUInt32()
                        });
                }
            }
            break;

            case MsexVersion.Version1_2:
            {
                int layerStatusCount = reader.ReadByte();
                LayerStatuses = new List <LayerStatus>(layerStatusCount);
                for (int i = 0; i < layerStatusCount; ++i)
                {
                    LayerStatuses.Add(new LayerStatus
                        {
                            LayerNumber      = reader.ReadByte(),
                            PhysicalOutput   = reader.ReadByte(),
                            MediaLibraryType = (MsexLibraryType)reader.ReadByte(),
                            MediaLibraryId   = MsexLibraryId.FromByteArray(reader.ReadBytes(4)),
                            MediaNumber      = reader.ReadByte(),
                            MediaName        = reader.ReadString(),
                            MediaPosition    = reader.ReadUInt32(),
                            MediaLength      = reader.ReadUInt32(),
                            MediaFps         = reader.ReadByte(),
                            LayerStatusFlags = (MsexLayerStatusFlags)reader.ReadUInt32()
                        });
                }
            }
            break;
            }
        }
Exemple #8
0
        protected override void DeserializeFromStream(CitpBinaryReader reader)
        {
            base.DeserializeFromStream(reader);

            switch (Version)
            {
            case MsexVersion.Version1_0:
            {
                LibraryType   = (MsexLibraryType)reader.ReadByte();
                LibraryNumber = reader.ReadByte();
                ElementNumber = reader.ReadByte();

                ThumbnailFormat = CitpEnumHelper.GetEnumFromIdString <MsexImageFormat>(reader.ReadIdString());

                ThumbnailWidth  = reader.ReadUInt16();
                ThumbnailHeight = reader.ReadUInt16();

                int thumbnailBufferLength = reader.ReadUInt16();
                ThumbnailBuffer = reader.ReadBytes(thumbnailBufferLength);
            }
            break;

            case MsexVersion.Version1_1:
            case MsexVersion.Version1_2:
            {
                LibraryType   = (MsexLibraryType)reader.ReadByte();
                LibraryId     = MsexLibraryId.FromByteArray(reader.ReadBytes(4));
                ElementNumber = reader.ReadByte();

                ThumbnailFormat = CitpEnumHelper.GetEnumFromIdString <MsexImageFormat>(reader.ReadIdString());

                ThumbnailWidth  = reader.ReadUInt16();
                ThumbnailHeight = reader.ReadUInt16();

                int thumbnailBufferLength = reader.ReadUInt16();
                ThumbnailBuffer = reader.ReadBytes(thumbnailBufferLength);
            }
            break;
            }
        }
Exemple #9
0
        public override void ReadData(CitpBinaryReader data)
        {
            base.ReadData(data);

            SourceIdentifier = data.ReadUInt16();
            FrameFormat      = data.ReadCookie();
            FrameWidth       = data.ReadUInt16();
            FrameHeight      = data.ReadUInt16();

            int bufferSize = data.ReadUInt16();

            FrameBuffer = data.ReadBytes(bufferSize);
        }
Exemple #10
0
        public override void ReadData(CitpBinaryReader data)
        {
            base.ReadData(data);

            LibraryType = (MsexElementType)data.ReadByte();

            if (MsexVersion < CitpMsexVersions.Msex11Version)
            {
                LibraryId.ParseNumber(data.ReadByte());
            }
            else
            {
                LibraryId = data.ReadMsexLibraryId();
            }

            UpdateFlags = (MsexUpdateFlags)data.ReadByte();

            if (MsexVersion >= CitpMsexVersions.Msex12Version)
            {
                AffectedElements  = new BitArray(data.ReadBytes(32));
                AffectedLibraries = new BitArray(data.ReadBytes(32));
            }
        }
Exemple #11
0
        public override void ReadData(CitpBinaryReader data)
        {
            base.ReadData(data);
            if (MsexVersion > CitpMsexVersions.Msex11Version)
            {
                MediaServerUid = data.ReadUcs1();
            }
            SourceIdentifier = data.ReadUInt16();
            FrameFormat      = data.ReadCookie();
            FrameWidth       = data.ReadUInt16();
            FrameHeight      = data.ReadUInt16();

            int bufferSize = data.ReadUInt16();

            FrameBuffer = data.ReadBytes(bufferSize);
        }
Exemple #12
0
        /// <summary>
        /// Reads the packet information from the specified stream.
        /// </summary>
        /// <param name="data">The stream to read the packet information from.</param>
        /// <remarks>
        /// Use to create a packet from a network stream.
        /// </remarks>
        public override void ReadData(CitpBinaryReader data)
        {
            base.ReadData(data);

            FixtureLinks.Clear();

            int count = data.ReadUInt16();

            for (int n = 0; n < count; n++)
            {
                CaptureToFixtureLink link = new CaptureToFixtureLink()
                {
                    CaptureInstanceId = new Guid(data.ReadBytes(15)).FromNetwork(),
                    FixtureId         = (int)data.ReadUInt32()
                };

                FixtureLinks.Add(link);
            }
        }
Exemple #13
0
        public List <FixtureLink> ReadLinks(CitpBinaryReader data)
        {
            List <FixtureLink> links = new List <FixtureLink>();

            int count = data.ReadByte();

            for (int n = 0; n < count; n++)
            {
                FixtureLink link = new FixtureLink()
                {
                    Type = (FixtureLinkType)data.ReadByte()
                };

                int linkDataSize = data.ReadUInt16();
                link.Data = data.ReadBytes(linkDataSize);
                links.Add(link);
            }

            return(links);
        }
        public override void ReadData(CitpBinaryReader data)
        {
            base.ReadData(data);

            LibraryType = (MsexElementType)data.ReadByte();

            if (MsexVersion < CitpMsexVersions.Msex11Version)
            {
                LibraryId.ParseNumber(data.ReadByte());
            }
            else
            {
                LibraryId = data.ReadMsexLibraryId();
            }

            ThumbnailFormat = data.ReadCookie();
            ThumbnailWidth  = data.ReadUInt16();
            ThumbnailHeight = data.ReadUInt16();

            int bufferSize = data.ReadUInt16();

            ThumbnailBuffer = data.ReadBytes(bufferSize);
        }
        protected override void DeserializeFromStream(CitpBinaryReader reader)
        {
            base.DeserializeFromStream(reader);

            switch (Version)
            {
            case MsexVersion.Version1_0:
            {
                LibraryNumber = reader.ReadByte();

                int mediaCount = reader.ReadByte();
                Media = new List <CitpMediaInformation>(mediaCount);
                for (int i = 0; i < mediaCount; ++i)
                {
                    Media.Add(new CitpMediaInformation
                        {
                            ElementNumber         = reader.ReadByte(),
                            DmxRangeMin           = reader.ReadByte(),
                            DmxRangeMax           = reader.ReadByte(),
                            Name                  = reader.ReadString(),
                            MediaVersionTimestamp = DateTimeHelpers.ConvertFromUnixTimestamp(reader.ReadUInt64()),
                            MediaWidth            = reader.ReadUInt16(),
                            MediaHeight           = reader.ReadUInt16(),
                            MediaLength           = reader.ReadUInt32(),
                            MediaFps              = reader.ReadByte()
                        });
                }
            }
            break;

            case MsexVersion.Version1_1:
            {
                LibraryId = MsexLibraryId.FromByteArray(reader.ReadBytes(4));

                int mediaCount = reader.ReadByte();
                Media = new List <CitpMediaInformation>(mediaCount);
                for (int i = 0; i < mediaCount; ++i)
                {
                    Media.Add(new CitpMediaInformation
                        {
                            ElementNumber         = reader.ReadByte(),
                            DmxRangeMin           = reader.ReadByte(),
                            DmxRangeMax           = reader.ReadByte(),
                            Name                  = reader.ReadString(),
                            MediaVersionTimestamp = DateTimeHelpers.ConvertFromUnixTimestamp(reader.ReadUInt64()),
                            MediaWidth            = reader.ReadUInt16(),
                            MediaHeight           = reader.ReadUInt16(),
                            MediaLength           = reader.ReadUInt32(),
                            MediaFps              = reader.ReadByte()
                        });
                }
            }
            break;

            case MsexVersion.Version1_2:
            {
                LibraryId = MsexLibraryId.FromByteArray(reader.ReadBytes(4));

                int mediaCount = reader.ReadUInt16();
                Media = new List <CitpMediaInformation>(mediaCount);
                for (int i = 0; i < mediaCount; ++i)
                {
                    Media.Add(new CitpMediaInformation
                        {
                            ElementNumber         = reader.ReadByte(),
                            SerialNumber          = reader.ReadUInt32(),
                            DmxRangeMin           = reader.ReadByte(),
                            DmxRangeMax           = reader.ReadByte(),
                            Name                  = reader.ReadString(),
                            MediaVersionTimestamp = DateTimeHelpers.ConvertFromUnixTimestamp(reader.ReadUInt64()),
                            MediaWidth            = reader.ReadUInt16(),
                            MediaHeight           = reader.ReadUInt16(),
                            MediaLength           = reader.ReadUInt32(),
                            MediaFps              = reader.ReadByte()
                        });
                }
            }
            break;
            }
        }
Exemple #16
0
		protected override void DeserializeFromStream(CitpBinaryReader reader)
		{
			base.DeserializeFromStream(reader);

			switch (Version)
			{
				case MsexVersion.Version1_0:
				{
					LibraryNumber = reader.ReadByte();

					int effectCount = reader.ReadByte();
					Effects = new List<CitpEffectInformation>(effectCount);
					for (int i = 0; i < effectCount; ++i)
					{
						var e = new CitpEffectInformation
						{
							ElementNumber = reader.ReadByte(),
							DmxRangeMin = reader.ReadByte(),
							DmxRangeMax = reader.ReadByte(),
							Name = reader.ReadString()
						};

						int effectParameterNameCount = reader.ReadByte();
						e.EffectParameterNames = new List<string>(effectParameterNameCount);
						for (int j = 0; j < effectParameterNameCount; ++j)
							e.EffectParameterNames.Add(reader.ReadString());

						Effects.Add(e);
					}
				}
					break;

				case MsexVersion.Version1_1:
				{
					LibraryId = MsexLibraryId.FromByteArray(reader.ReadBytes(4));

					int effectCount = reader.ReadByte();
					Effects = new List<CitpEffectInformation>(effectCount);
					for (int i = 0; i < effectCount; ++i)
					{
						var e = new CitpEffectInformation
						{
							ElementNumber = reader.ReadByte(),
							DmxRangeMin = reader.ReadByte(),
							DmxRangeMax = reader.ReadByte(),
							Name = reader.ReadString()
						};

						int effectParameterNameCount = reader.ReadByte();
						e.EffectParameterNames = new List<string>(effectParameterNameCount);
						for (int j = 0; j < effectParameterNameCount; ++j)
							e.EffectParameterNames.Add(reader.ReadString());

						Effects.Add(e);
					}
				}
					break;

				case MsexVersion.Version1_2:
				{
					LibraryId = MsexLibraryId.FromByteArray(reader.ReadBytes(4));

					int effectCount = reader.ReadUInt16();
					Effects = new List<CitpEffectInformation>(effectCount);
					for (int i = 0; i < effectCount; ++i)
					{
						var e = new CitpEffectInformation
						{
							ElementNumber = reader.ReadByte(),
							SerialNumber = reader.ReadUInt32(),
							DmxRangeMin = reader.ReadByte(),
							DmxRangeMax = reader.ReadByte(),
							Name = reader.ReadString()
						};

						int effectParameterNameCount = reader.ReadByte();
						e.EffectParameterNames = new List<string>(effectParameterNameCount);
						for (int j = 0; j < effectParameterNameCount; ++j)
							e.EffectParameterNames.Add(reader.ReadString());

						Effects.Add(e);
					}
				}
					break;
			}
		}
        protected override void DeserializeFromStream(CitpBinaryReader reader)
        {
            base.DeserializeFromStream(reader);

            switch (Version)
            {
            case MsexVersion.Version1_0:
            {
                ThumbnailFormat = CitpEnumHelper.GetEnumFromIdString <MsexImageFormat>(reader.ReadIdString());
                ThumbnailWidth  = reader.ReadUInt16();
                ThumbnailHeight = reader.ReadUInt16();
                ThumbnailFlags  = (MsexThumbnailFlags)reader.ReadByte();
                LibraryType     = (MsexLibraryType)reader.ReadByte();
                LibraryNumber   = reader.ReadByte();

                int elementNumberCount = reader.ReadByte();
                ElementNumbers = new List <byte>(elementNumberCount);
                for (int i = 0; i < elementNumberCount; ++i)
                {
                    ElementNumbers.Add(reader.ReadByte());
                }

                if (elementNumberCount == 0)
                {
                    ShouldRequestAllThumbnails = true;
                }
            }
            break;

            case MsexVersion.Version1_1:
            {
                ThumbnailFormat = CitpEnumHelper.GetEnumFromIdString <MsexImageFormat>(reader.ReadIdString());
                ThumbnailWidth  = reader.ReadUInt16();
                ThumbnailHeight = reader.ReadUInt16();
                ThumbnailFlags  = (MsexThumbnailFlags)reader.ReadByte();
                LibraryType     = (MsexLibraryType)reader.ReadByte();
                LibraryId       = MsexLibraryId.FromByteArray(reader.ReadBytes(4));

                int elementNumberCount = reader.ReadByte();
                ElementNumbers = new List <byte>(elementNumberCount);
                for (int i = 0; i < elementNumberCount; ++i)
                {
                    ElementNumbers.Add(reader.ReadByte());
                }

                if (elementNumberCount == 0)
                {
                    ShouldRequestAllThumbnails = true;
                }
            }
            break;

            case MsexVersion.Version1_2:
            {
                ThumbnailFormat = CitpEnumHelper.GetEnumFromIdString <MsexImageFormat>(reader.ReadIdString());
                ThumbnailWidth  = reader.ReadUInt16();
                ThumbnailHeight = reader.ReadUInt16();
                ThumbnailFlags  = (MsexThumbnailFlags)reader.ReadByte();
                LibraryType     = (MsexLibraryType)reader.ReadByte();
                LibraryId       = MsexLibraryId.FromByteArray(reader.ReadBytes(4));

                int elementNumberCount = reader.ReadUInt16();
                ElementNumbers = new List <byte>(elementNumberCount);
                for (int i = 0; i < elementNumberCount; ++i)
                {
                    ElementNumbers.Add(reader.ReadByte());
                }

                if (elementNumberCount == 0)
                {
                    ShouldRequestAllThumbnails = true;
                }
            }
            break;
            }
        }
        protected override void DeserializeFromStream(CitpBinaryReader reader)
        {
            base.DeserializeFromStream(reader);

            switch (Version)
            {
            case MsexVersion.Version1_0:
            {
                LibraryType = (MsexLibraryType)reader.ReadByte();

                int libraryNumberCount = reader.ReadByte();
                RequestedLibraryNumbers = new List <byte>(libraryNumberCount);
                for (int i = 0; i < libraryNumberCount; ++i)
                {
                    RequestedLibraryNumbers.Add(reader.ReadByte());
                }

                if (libraryNumberCount == 0)
                {
                    ShouldRequestAllLibraries = true;
                }
            }
            break;

            case MsexVersion.Version1_1:
            {
                LibraryType     = (MsexLibraryType)reader.ReadByte();
                LibraryParentId = MsexLibraryId.FromByteArray(reader.ReadBytes(4));

                int libraryNumberCount = reader.ReadByte();
                RequestedLibraryNumbers = new List <byte>(libraryNumberCount);
                for (int i = 0; i < libraryNumberCount; ++i)
                {
                    RequestedLibraryNumbers.Add(reader.ReadByte());
                }

                if (libraryNumberCount == 0)
                {
                    ShouldRequestAllLibraries = true;
                }
            }
            break;

            case MsexVersion.Version1_2:
            {
                LibraryType     = (MsexLibraryType)reader.ReadByte();
                LibraryParentId = MsexLibraryId.FromByteArray(reader.ReadBytes(4));

                int libraryNumberCount = reader.ReadUInt16();
                RequestedLibraryNumbers = new List <byte>(libraryNumberCount);
                for (int i = 0; i < libraryNumberCount; ++i)
                {
                    RequestedLibraryNumbers.Add(reader.ReadByte());
                }

                if (libraryNumberCount == 0)
                {
                    ShouldRequestAllLibraries = true;
                }
            }
            break;
            }
        }
Exemple #19
0
 protected virtual void DeserializeFromStream(CitpBinaryReader reader)
 {
     // Read Header
     reader.ReadBytes(CitpHeaderLength);
 }
Exemple #20
0
        protected override void DeserializeFromStream(CitpBinaryReader reader)
        {
            base.DeserializeFromStream(reader);

            switch (Version)
            {
            case MsexVersion.Version1_0:
            case MsexVersion.Version1_1:
            {
                ProductName         = reader.ReadString();
                ProductVersionMajor = reader.ReadByte();
                ProductVersionMinor = reader.ReadByte();

                int dmxSourcesCount = reader.ReadByte();
                LayerDmxSources = new List <CitpDmxConnectionString>(dmxSourcesCount);
                for (int i = 0; i < dmxSourcesCount; ++i)
                {
                    LayerDmxSources.Add(CitpDmxConnectionString.Parse(reader.ReadString(true)));
                }
            }
            break;

            case MsexVersion.Version1_2:
            {
                Uuid = new Guid(reader.ReadString(true));

                ProductName          = reader.ReadString();
                ProductVersionMajor  = reader.ReadByte();
                ProductVersionMinor  = reader.ReadByte();
                ProductVersionBugfix = reader.ReadByte();

                byte supportedVersionsCount = reader.ReadByte();
                SupportedMsexVersions = new List <MsexVersion>(supportedVersionsCount);
                for (int i = 0; i < supportedVersionsCount; ++i)
                {
                    byte versionMajor = reader.ReadByte();
                    byte versionMinor = reader.ReadByte();

                    if (versionMajor == 1 && versionMinor == 0)
                    {
                        SupportedMsexVersions.Add(MsexVersion.Version1_0);
                    }
                    else if (versionMajor == 1 && versionMinor == 1)
                    {
                        SupportedMsexVersions.Add(MsexVersion.Version1_1);
                    }
                    else if (versionMajor == 1 && versionMinor == 2)
                    {
                        SupportedMsexVersions.Add(MsexVersion.Version1_2);
                    }
                    else
                    {
                        SupportedMsexVersions.Add(MsexVersion.UnsupportedVersion);
                    }
                }

                SupportedLibraryTypes = new List <MsexLibraryType>();
                var supportedLibraryTypesBits = new BitArray(reader.ReadBytes(2));
                for (byte i = 0; i < supportedLibraryTypesBits.Length; ++i)
                {
                    if (supportedLibraryTypesBits[i])
                    {
                        SupportedLibraryTypes.Add((MsexLibraryType)i);
                    }
                }

                int thumbnailFormatsCount = reader.ReadByte();
                ThumbnailFormats = new List <MsexImageFormat>(thumbnailFormatsCount);
                for (int i = 0; i < thumbnailFormatsCount; ++i)
                {
                    ThumbnailFormats.Add(CitpEnumHelper.GetEnumFromIdString <MsexImageFormat>(reader.ReadIdString()));
                }

                int streamFormatsCount = reader.ReadByte();
                StreamFormats = new List <MsexImageFormat>(streamFormatsCount);
                for (int i = 0; i < streamFormatsCount; ++i)
                {
                    StreamFormats.Add(CitpEnumHelper.GetEnumFromIdString <MsexImageFormat>(reader.ReadIdString()));
                }

                int dmxSourcesCount = reader.ReadByte();
                LayerDmxSources = new List <CitpDmxConnectionString>(dmxSourcesCount);
                for (int i = 0; i < dmxSourcesCount; ++i)
                {
                    LayerDmxSources.Add(CitpDmxConnectionString.Parse(reader.ReadString(true)));
                }
            }
            break;
            }
        }