コード例 #1
0
 public override void ReadData(CitpBinaryReader data)
 {
     ElementNumber = data.ReadByte();
     if (MsexVersion == CitpMsexVersions.Msex12Version)
     {
         SerialNumber = data.ReadUInt32();
     }
     DmxRangeMin      = data.ReadByte();
     DmxRangeMax      = data.ReadByte();
     Name             = data.ReadUcs2();
     VersionTimeStamp = data.ReadUInt64();
 }
コード例 #2
0
 public override void ReadData(CitpBinaryReader data)
 {
     Number                = data.ReadByte();
     DmxRangeMin           = data.ReadByte();
     DmxRangeMax           = data.ReadByte();
     MediaName             = data.ReadUcs2();
     MediaVersionTimestamp = data.ReadUInt64();
     MediaWidth            = data.ReadUInt16();
     MediaHeight           = data.ReadUInt16();
     MediaLength           = data.ReadUInt32();
     MediaFPS              = data.ReadByte();
 }
コード例 #3
0
        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;
            }
        }
コード例 #4
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;
            }
        }