public override void ReadData(ArtNetBinaryReader data) { base.ReadData(data); IpAddress = data.ReadBytes(4); Port = data.ReadInt16(); FirmwareVersion = data.ReadNetwork16(); SubSwitch = data.ReadNetwork16(); Oem = data.ReadNetwork16(); UbeaVersion = data.ReadByte(); Status = (PollReplyStatus)data.ReadByte(); EstaCode = data.ReadInt16(); ShortName = data.ReadNetworkString(18); LongName = data.ReadNetworkString(64); NodeReport = data.ReadNetworkString(64); PortCount = data.ReadNetwork16(); PortTypes = data.ReadBytes(4); GoodInput = data.ReadBytes(4); GoodOutput = data.ReadBytes(4); SwIn = data.ReadBytes(4); SwOut = data.ReadBytes(4); SwVideo = data.ReadByte(); SwMacro = data.ReadByte(); SwRemote = data.ReadByte(); data.ReadBytes(3); Style = data.ReadByte(); MacAddress = data.ReadBytes(6); BindIpAddress = data.ReadBytes(4); BindIndex = data.ReadByte(); Status2 = data.ReadByte(); }
/// <summary> /// 读取数据 /// </summary> /// <param name="data">ArtNet 二进制读取器</param> public override void ReadData(ArtNetBinaryReader data) { base.ReadData(data); IpAddress = data.ReadBytes(4); // IpAddress Port = data.ReadInt16(); // PortNumberLo PortNumberHi FirmwareVersion = data.ReadNetwork16(); // VersInfoHi VersInfoLo SubSwitch = data.ReadNetwork16(); // NetSwitch SubSwitch Oem = data.ReadNetwork16(); // OemHi OemLo UbeaVersion = data.ReadByte(); // UbeaVersion Status = (PollReplyStatus)data.ReadByte(); // Status1 EstaCode = data.ReadNetwork16(); // EstaManLo EstaManHi ShortName = data.ReadNetworkString(18); // ShortName LongName = data.ReadNetworkString(64); // LongName NodeReport = data.ReadNetworkString(64); // NodeReport PortCount = data.ReadNetwork16(); // NumPortsHi NumPortsLo PortTypes = data.ReadBytes(4); // PortTypes GoodInput = data.ReadBytes(4); // GoodInput GoodOutput = data.ReadBytes(4); // GoodOutput SwIn = data.ReadBytes(4); // SwIn SwOut = data.ReadBytes(4); // SwOut SwVideo = data.ReadByte(); // SwVideo SwMacro = data.ReadByte(); // SwMacro SwRemote = data.ReadByte(); // SwRemote data.ReadBytes(3); // Spare1 Spare2 Spare3 (备用字段) Style = data.ReadByte(); // Style MacAddress = data.ReadBytes(6); // Mac BindIpAddress = data.ReadBytes(4); // BindIp BindIndex = data.ReadByte(); // BindIndex Status2 = data.ReadByte(); // Status2 }
public virtual void ReadData(ArtNetBinaryReader data) { Protocol = data.ReadNetworkString(8); OpCode = (ArtNetOpCodes)data.ReadNetwork16(); //For some reason the poll packet header does not include the version. if (OpCode != ArtNetOpCodes.PollReply) Version = data.ReadNetwork16(); }
/// <summary> /// 解析获取到的数据流 /// </summary> /// <param name="data">ArtNet 二进制读取器</param> public virtual void ReadData(ArtNetBinaryReader data) { // 前 8 位为 ArtNet ID Protocol = data.ReadNetworkString(8); // 16 为 ArtNet OpCode 操作码 OpCode = (ArtNetOpCodes)data.ReadNetwork16(); // 由于某些原因,轮询包头不包括版本 if (OpCode != ArtNetOpCodes.PollReply) { // 16位 ProtVer 协议版本(>= 14) Version = data.ReadNetwork16(); } }
public override void ReadData(ArtNetBinaryReader data) { base.ReadData(data); Sequence = data.ReadByte(); Physical = data.ReadByte(); Universe = data.ReadInt16(); int length = data.ReadNetwork16(); DmxData = data.ReadBytes(length); }
public override void ReadData(ArtNetBinaryReader data) { base.ReadData(data); Filler1 = data.ReadByte(); Filler2 = data.ReadByte(); OemCode = data.ReadNetwork16(); Key = data.ReadByte(); SubKey = data.ReadByte(); Data = data.ReadBytes(512); }
/// <summary> /// 读取数据 /// </summary> /// <param name="data">ArtNet 二进制读取器</param> public override void ReadData(ArtNetBinaryReader data) { base.ReadData(data); Sequence = data.ReadByte(); // Sequence Physical = data.ReadByte(); // Physical Universe = data.ReadByte(); // SubUni Net = data.ReadByte(); // Net int length = data.ReadNetwork16(); // LengthHi LengthLo DmxData = data.ReadBytes(length); // Data[] }
/// <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()); } }