예제 #1
0
        public static S7CommSetupDatagram TranslateFromMemory(Memory <byte> data)
        {
            var result = new S7CommSetupDatagram
            {
                Header = S7HeaderDatagram.TranslateFromMemory(data)
            };

            result.Parameter = S7CommSetupParameterDatagram.TranslateFromMemory(data.Slice(result.Header.GetHeaderSize()));
            return(result);
        }
예제 #2
0
        public static S7CommSetupAckDataDatagram TranslateFromMemory(Memory <byte> data)
        {
            var result = new S7CommSetupAckDataDatagram
            {
                Header = S7AckDataDatagram.TranslateFromMemory(data),
            };

            result.Parameter = S7CommSetupParameterDatagram.TranslateFromMemory(data.Slice(result.Header.GetParameterOffset()));
            return(result);
        }