public override void Read(MCDataProcessor source) { this.NetworkNumber = source.ReadByte(); this.PLCNumber = source.ReadByte(); this.IONumber = source.ReadUShort(); this.StationNumber = source.ReadByte(); this.CommandCode = source.ReadUShort(); this.SubCommandCode = source.ReadUShort(); }
public override void Read(MCDataProcessor source) { if (source.DataCode == CommunicationDataCode.BINARY) { this.Offset = source.ReadUShort(); source.ReadByte(); this.DeviceCode = DeviceCodeSerializer.Read(source); } else if (source.DataCode == CommunicationDataCode.ASCII) { this.DeviceCode = DeviceCodeSerializer.Read(source); source.ReadByte(); this.Offset = source.ReadUShort(); } this.Count = source.ReadUShort(); }
public override void Read(MCDataProcessor source) { var length = this.Request.Count; var data = this.Data = new ushort[length]; for (int i = 0; i < length; i++) { data[i] = source.ReadUShort(); } }
public override void Read(MCDataProcessor source) { if (source.DataCode == CommunicationDataCode.BINARY) { this.Offset = source.ReadUShort(); source.ReadByte(); this.DeviceCode = DeviceCodeSerializer.Read(source); } else if (source.DataCode == CommunicationDataCode.ASCII) { this.DeviceCode = DeviceCodeSerializer.Read(source); this.Offset = source.ReadUShort(); source.ReadByte(); } int count = source.ReadUShort(); var data = this.Data = new ushort[count]; for (int i = 0; i < count; i++) { data[i] = source.ReadUShort(); } }