/// <summary> /// 读取 RDM 数据 /// </summary> /// <param name="data">ArtNet 二进制读取器</param> public override void ReadData(ArtNetBinaryReader data) { var reader = new ArtNetBinaryReader(data.BaseStream); base.ReadData(data); RdmVersion = data.ReadByte(); // RdmVer Port = data.ReadByte(); // Port data.BaseStream.Seek(7, System.IO.SeekOrigin.Current); // BindIndex 未实现 Net = data.ReadByte(); // Net Command = data.ReadByte(); // Command Universe = data.ReadByte(); // 高 8 位 Sub-Net & 低 8 位 Universe UIdTotal = reader.ReadNetwork16(); // UidTotalHi UidTotalLo BlockCount = data.ReadByte(); // BlockCount Devices = new List <UId>(); int count = data.ReadByte(); // UidCount for (int n = 0; n < count; n++) { Devices.Add(reader.ReadUId()); // ToD[] } }
public override void ReadData(ArtNetBinaryReader data) { var reader = new ArtNetBinaryReader(data.BaseStream); base.ReadData(data); RdmVersion = data.ReadByte(); Port = data.ReadByte(); data.BaseStream.Seek(7, System.IO.SeekOrigin.Current); Net = data.ReadByte(); Command = data.ReadByte(); Universe = data.ReadByte(); UIdTotal = reader.ReadNetwork16(); BlockCount = data.ReadByte(); Devices = new List <UId>(); int count = data.ReadByte(); for (int n = 0; n < count; n++) { Devices.Add(reader.ReadUId()); } }