public override void ReadData(CitpBinaryReader data) { base.ReadData(data); ContentType = data.ReadCookie(); ContentHint = data.ReadUInt32(); }
public override void ReadData(CitpBinaryReader data) { Number = data.ReadByte(); if (MsexVersion == CitpMsexVersions.Msex12Version) { SerialNumber = data.ReadUInt32(); } DmxRangeMin = data.ReadByte(); DmxRangeMax = data.ReadByte(); MediaName = data.ReadUcs2(); MediaVersionTimestamp = data.ReadUInt64(); MediaWidth = data.ReadUInt16(); MediaHeight = data.ReadUInt16(); MediaLength = data.ReadUInt32(); MediaFPS = data.ReadByte(); }
public override void ReadData(CitpBinaryReader data) { base.ReadData(data); int count = data.ReadUInt16(); for (int n = 0; n < count; n++) { FixtureChange change = new FixtureChange() { FixtureId = data.ReadUInt32(), ChangedFields = (Modification)data.ReadByte(), Patched = data.ReadBoolean(), DMXUniverse = data.ReadByte(), DMXAddress = data.ReadUInt16(), Unit = data.ReadUcs2(), Channel = data.ReadUInt16(), Circuit = data.ReadUcs2(), Note = data.ReadUcs2(), Position = new Coordinate() { X = data.ReadSingle(), Y = data.ReadSingle(), Z = data.ReadSingle() }, Angle = new Coordinate() { X = data.ReadSingle(), Y = data.ReadSingle(), Z = data.ReadSingle() } }; Fixtures.Add(change); } }
public override void ReadData(CitpBinaryReader data) { if (MsexVersion < CitpMsexVersions.Msex11Version) { LibraryNumber = data.ReadByte(); } else { LibraryId = data.ReadMsexLibraryId(); } if (MsexVersion > CitpMsexVersions.Msex11Version) { SerialNumber = data.ReadUInt32(); } DmxRangeMin = data.ReadByte(); DmxRangeMax = data.ReadByte(); Name = data.ReadUcs2(); if (MsexVersion > CitpMsexVersions.Msex10Version) { LibraryCount = MsexVersion < CitpMsexVersions.Msex12Version ? data.ReadByte() : data.ReadUInt16(); } ElementCount = MsexVersion < CitpMsexVersions.Msex12Version ? data.ReadByte() : data.ReadUInt16(); }
public override void ReadData(CitpBinaryReader data) { base.ReadData(data); Format = (LiveViewImageFormat)data.ReadByte(); uint dataSize = data.ReadUInt32(); Data = data.ReadBytes((int)dataSize); }
public override void ReadData(CitpBinaryReader data) { LayerNumber = data.ReadByte(); PhysicalOutput = data.ReadByte(); if (MsexVersion < CitpMsexVersions.Msex12Version) { MediaLibraryNumber = data.ReadByte(); } else { MediaLibraryType = data.ReadByte(); MediaLibraryId = data.ReadMsexLibraryId(); } MediaNumber = data.ReadByte(); MediaName = data.ReadUcs2(); MediaPosition = data.ReadUInt32(); MediaLength = data.ReadUInt32(); MediaFPS = data.ReadByte(); LayerStatusFlags = data.ReadUInt32(); }
public override void ReadData(CitpBinaryReader data) { base.ReadData(data); int count = data.ReadUInt16(); for (int n = 0; n < count; n++) { FixtureIds.Add(data.ReadUInt32()); } }
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(); }
public override void ReadData(CitpBinaryReader data) { Cookie = data.ReadCookie(); VersionMajor = data.ReadByte(); VersionMinor = data.ReadByte(); RequestId = data.ReadUInt16(); MessageSize = data.ReadUInt32(); MessagePartCount = data.ReadUInt16(); MessagePart = data.ReadUInt16(); ContentType = data.ReadCookie(); }
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; } }
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; } }
public override void ReadData(CitpBinaryReader data) { ElementNumber = data.ReadByte(); if (MsexVersion == CitpMsexVersions.Msex12Version) { SerialNumber = data.ReadUInt32(); } DmxRangeMin = data.ReadByte(); DmxRangeMax = data.ReadByte(); EffectName = data.ReadUcs2(); byte parameterCount = data.ReadByte(); EffectParameterNames.Clear(); for (int i = 0; i < parameterCount; i++) { EffectParameterNames.Add(data.ReadUcs2()); } }
public override void ReadData(CitpBinaryReader data) { base.ReadData(data); int count = data.ReadUInt16(); Fixtures.Clear(); for (int n = 0; n < count; n++) { FixtureStatus status = new FixtureStatus() { FixtureId = data.ReadUInt32(), Locked = data.ReadBoolean(), Clearable = data.ReadBoolean() }; Fixtures.Add(status); } }
/// <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); } }
public override void ReadData(CitpBinaryReader data) { base.ReadData(data); Type = (FixtureChanges)data.ReadByte(); int count = data.ReadUInt16(); Fixtures.Clear(); for (int n = 0; n < count; n++) { FixtureInformation information = new FixtureInformation() { FixtureId = data.ReadUInt32(), ManufacturerName = data.ReadUcs2(), FixtureName = data.ReadUcs2(), ModeName = data.ReadUcs2(), ChannelCount = data.ReadUInt16(), IsDimmer = data.ReadBoolean(), Links = ReadLinks(data), IsPatched = data.ReadBoolean(), DMXUniverse = data.ReadByte(), DMXAddress = data.ReadUInt16(), Unit = data.ReadUcs2(), Channel = data.ReadUInt16(), Circuit = data.ReadUcs2(), Note = data.ReadUcs2(), Position = new Coordinate() { X = data.ReadSingle(), Y = data.ReadSingle(), Z = data.ReadSingle() }, Angle = new Coordinate() { X = data.ReadSingle(), Y = data.ReadSingle(), Z = data.ReadSingle() } }; Fixtures.Add(information); } }
public override void ReadData(CitpBinaryReader data) { base.ReadData(data); ContentCode = (CaExContentCodes)data.ReadUInt32(); }
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: { 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; } }