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(); } }