diff --git a/Giselle.Net.EtherNetIP/ENIP/ENIPCodec.cs b/Giselle.Net.EtherNetIP/ENIP/ENIPCodec.cs index 325947d..c7008d8 100644 --- a/Giselle.Net.EtherNetIP/ENIP/ENIPCodec.cs +++ b/Giselle.Net.EtherNetIP/ENIP/ENIPCodec.cs @@ -123,7 +123,13 @@ public void UnRegisterSession(Stream stream) public SendRRData CreateSendRRData(params CommandItem[] items) => this.CreateSendRRData((IEnumerable)items); - public SendRRData CreateSendRRData(IEnumerable items) => new SendRRData(items) { Timeout = this.SendRRDataTimeout }; + public SendRRData CreateSendRRData(IEnumerable items) + { + var sendRRData = new SendRRData() { Timeout = this.SendRRDataTimeout }; + sendRRData.Items.Add(new CommandItemNull()); + sendRRData.Items.AddRange(items); + return sendRRData; + } public CommandItems ExchangeSendRRData(Stream stream, params CommandItem[] requests) {