<NME> SZLDatasets.cs
<BEF> ﻿using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
using DotNetSiemensPLCToolBoxLibrary.General;

namespace DotNetSiemensPLCToolBoxLibrary.Communication.S7_xxx
{
    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public abstract class SZLDataset
    {
    }

    public class DefaultSZLDataset : SZLDataset
        public byte[] Bytes { get; set; }
    }

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public class xy11Dataset : SZLDataset
    {
        public short Index { get; set; }

        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
        private string _mlfB;     
        public string MlfB
        {
        private string _mlfB;
            set { _mlfB = value; }
        }

        public UInt16 BGTyp { get; set; }

        public UInt16 Ausbg1 { get; set; }

        public UInt16 Ausbg2 { get; set; }
    }

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public class xy12Dataset : SZLDataset
    {
        public UInt16 Feature { get; set; }
    }


    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public class xy13Dataset : SZLDataset
    {
        public UInt16 Index { get; set; }

        public UInt16 Code { get; set; }

        public UInt32 Size { get; set; }

        public UInt16 Mode { get; set; }

        public UInt16 Granu { get; set; }

        public UInt32 Ber1 { get; set; }

        public UInt32 Belegt1 { get; set; }

        public UInt32 Block1 { get; set; }

        public UInt32 Ber2 { get; set; }

        public UInt32 Belegt2 { get; set; }

        public UInt32 Block2 { get; set; }
    }


    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public class xy14Dataset : SZLDataset
    {
        public UInt16 Index { get; set; }

        public UInt16 Code { get; set; }

        public UInt16 Anzahl { get; set; }

        public UInt16 Reman { get; set; }
    }
    
    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public class xy15Dataset : SZLDataset
    {
        public UInt16 Index { get; set; }

        public UInt16 MaxAnz { get; set; }

        public UInt16 MaxLng { get; set; }

        public UInt32 Maxabl { get; set; }
    }

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public class xy16Dataset : SZLDataset
    {
        public UInt16 Index { get; set; }

        public UInt16 MaxAnz { get; set; }

        public UInt16 AnzAkt { get; set; }        
    }

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public class xy17Dataset : SZLDataset
    {
        public UInt16 SDBNr { get; set; }

        public UInt16 State { get; set; }
    }

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public class xy18Dataset : SZLDataset
    {
        public UInt16 RackNr { get; set; }

        public UInt16 AnzSt { get; set; }
    }

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public class xy19Dataset : SZLDataset
    {
        public UInt16 Index { get; set; }

        public byte Led_On { get; set; }

        public byte Led_Blink { get; set; }
    }

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public class xy21Dataset : SZLDataset
    {
        public UInt16 ereig { get; set; }

        public byte Ae { get; set; }

        public byte OB { get; set; }
    }

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public class xy1CDataset : SZLDataset
    {
        public UInt16 Index { get; set; }
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
        private string _text;
        public string Text
        public UInt16 ereig
        {
            get { return _ereig; }
            set { _ereig = value; }
        }

        private byte _ae;
        public byte Ae
        {
            get { return _ae; }
            set { _ae = value; }
        }

        private byte _ob;
            set { _info = value; }
        }

        public UInt16 Al1 { get; set; }
        public UInt16 Al2 { get; set; }
        public UInt32 Al3 { get; set; }
    }

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public class xy23Dataset : SZLDataset
    {
        public byte Ae { get; set; }
        public byte AeStat { get; set; }
        public UInt16 Aefstat { get; set; }
        public byte MaxBst { get; set; }
        public byte MaxSti { get; set; }
        public byte AktSiv { get; set; }
        public byte AktSib { get; set; }
        public UInt16 Grld { get; set; }
        public UInt32 ProgFm { get; set; }
        public UInt32 SyncFm { get; set; }
    }

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public class xy24Dataset : SZLDataset
    {
        public UInt16 Ereig { get; set; }
        public byte Ae { get; set; }
        public byte bzü_id { get; set; }
        public UInt32 Res { get; set; }
        public byte AnlInfo1 { get; set; }
        public byte AnlInfo2 { get; set; }
        public byte AnlInfo3 { get; set; }
        public byte AnlInfo4 { get; set; }
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
        private UInt16[] _time;
        public UInt16[] Time
        {
            get { return _bzüId; }
            set { _bzüId = value; }
        }

        [Endian(Endianness.BigEndian)]
    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public class xy25Dataset : SZLDataset
    {
        public byte tpa_nr { get; set; }

        public byte tpa_use { get; set; }

        public byte ob_nr { get; set; }

        public byte res { get; set; }
    }

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public class xy31_1Dataset : SZLDataset
    {
        public UInt16 Index { get; set; }

        public UInt16 Pdu { get; set; }

        public UInt16 Anz { get; set; }

        public UInt32 Mpi_bps { get; set; }

        public UInt32 Kbus_bps { get; set; }

        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 13)]
        private UInt16[] _res;
            set { _res = value; }
        }
    }

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public class xy31_1Dataset : SZLDataset
    {
    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public class xy31_2Dataset : SZLDataset
    {
        public UInt16 Index { get; set; }

        public byte funkt_0 { get; set; }

        public byte funkt_1 { get; set; }

        public byte funkt_2 { get; set; }

        public byte funkt_3 { get; set; }

        public byte funkt_4 { get; set; }

        public byte funkt_5 { get; set; }

         [MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
        private byte[] _aseg;
        public byte[] aseg
        {
            get { return _index; }
            set { _index = value; }
        }

        private byte _funkt0;
        public byte funkt_0
        {
            get { return _funkt0; }
            set { _funkt0 = value; }
            set { _eseg = value; }
        }

        public byte trgereig_0 { get; set; }

        public byte trgereig_1 { get; set; }

        public byte trgereig_2 { get; set; }

        public byte trgbed { get; set; }

        public byte pfad { get; set; }

        public byte tiefe { get; set; }

        public byte systrig { get; set; }

        public byte erg_par { get; set; }

        public UInt16 erg_pat_1 { get; set; }

        public UInt16 erg_pat_2 { get; set; }

        public UInt16 force { get; set; }

        public UInt16 time { get; set; }

        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
        private UInt16[] _res;
        public byte tiefe
        {
            get { return _tiefe; }
            set { _tiefe = value; }
        }

        private byte _systrig;
    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public class xy31_3Dataset : SZLDataset
    {
        public UInt16 Index { get; set; }

        public byte funkt_0 { get; set; }

        public byte funkt_1 { get; set; }

        public byte funkt_2 { get; set; }

        public byte funkt_3 { get; set; }
        
        public Int16 Data {get; set; }

        public Int16 Anz { get; set; }

        public Int16 Per_Min { get; set; }

        public Int16 Per_Max { get; set; }        

        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 13)]
        private UInt16[] _res;
            get { return _funkt0; }
            set { _funkt0 = value; }
        }

        private byte _funkt1;
        public byte funkt_1
        {
    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public class xy71Dataset : SZLDataset
    {
        public UInt16 redinf { get; set; }
        public byte mwstat1 { get; set; }
        public byte mwstat2 { get; set; }
        public UInt16 hsfcinfo { get; set; }
        public UInt16 samfehl { get; set; }
        public UInt16 bz_cpu_0 { get; set; }
        public UInt16 bz_cpu_1 { get; set; }
        public byte cpu_valid { get; set; }
        public byte hsync_f { get; set; }
    }

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public class xy74Dataset : SZLDataset
    {
        public UInt16 led_kennung { get; set; }
        public byte led_on { get; set; }
        public byte led_blink { get; set; }
    }
}
        public byte funkt_3
        {
            get { return _funkt3; }
            set { _funkt3 = value; }
        }

        private byte _funkt4;
        public byte funkt_4
        {
            get { return _funkt4; }
            set { _funkt4 = value; }
        }

        private byte _funkt5;
        public byte funkt_5
        {
            get { return _funkt5; }
            set { _funkt5 = value; }
        }

        private byte _funkt6;
        public byte funkt_6
        {
            get { return _funkt6; }
            set { _funkt6 = value; }
        }

        private byte _funkt7;
        public byte funkt_7
        {
            get { return _funkt7; }
            set { _funkt7 = value; }
        }

        private byte _kop;
        public byte kop
        {
            get { return _kop; }
            set { _kop = value; }
        }

        private byte _del;
        public byte del
        {
            get { return _del; }
            set { _del = value; }
        }

        private byte _kett;
        public byte kett
        {
            get { return _kett; }
            set { _kett = value; }
        }

        private byte _hoch;
        public byte hoch
        {
            get { return _hoch; }
            set { _hoch = value; }
        }

        private byte _ver;
        public byte ver
        {
            get { return _ver; }
            set { _ver = value; }
        }

        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 25)]
        private byte[] _res;
        public byte[] res
        {
            get { return _res; }
            set { _res = value; }
        }
    }

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public class xy31_5Dataset : SZLDataset
    {
        [Endian(Endianness.BigEndian)]
        private ushort _index;
        public UInt16 Index
        {
            get { return _index; }
            set { _index = value; }
        }

        private byte _funkt0;
        public byte funkt_0
        {
            get { return _funkt0; }
            set { _funkt0 = value; }
        }

        private byte _funkt1;
        public byte funkt_1
        {
            get { return _funkt1; }
            set { _funkt1 = value; }
        }

        private byte _funkt2;
        public byte funkt_2
        {
            get { return _funkt2; }
            set { _funkt2 = value; }
        }

        private byte _funkt3;
        public byte funkt_3
        {
            get { return _funkt3; }
            set { _funkt3 = value; }
        }

        private byte _funkt4;
        public byte funkt_4
        {
            get { return _funkt4; }
            set { _funkt4 = value; }
        }

        private byte _funkt5;
        public byte funkt_5
        {
            get { return _funkt5; }
            set { _funkt5 = value; }
        }

        private byte _funkt6;
        public byte funkt_6
        {
            get { return _funkt6; }
            set { _funkt6 = value; }
        }

        private byte _funkt7;
        public byte funkt_7
        {
            get { return _funkt7; }
            set { _funkt7 = value; }
        }

        private byte _anzSen;
        public byte anz_sen
        {
            get { return _anzSen; }
            set { _anzSen = value; }
        }

        private byte _anzEin;
        public byte anz_ein
        {
            get { return _anzEin; }
            set { _anzEin = value; }
        }

        private byte _anzMel;
        public byte anz_mel
        {
            get { return _anzMel; }
            set { _anzMel = value; }
        }

        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 26)]
        private byte[] _res;
        public byte[] res
        {
            get { return _res; }
            set { _res = value; }
        }
    }

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public class xy31_6Dataset : SZLDataset
    {
        [Endian(Endianness.BigEndian)]
        private ushort _index;
        public UInt16 Index
        {
            get { return _index; }
            set { _index = value; }
        }

        private byte _funkt0;
        public byte funkt_0
        {
            get { return _funkt0; }
            set { _funkt0 = value; }
        }

        private byte _funkt1;
        public byte funkt_1
        {
            get { return _funkt1; }
            set { _funkt1 = value; }
        }

        private byte _funkt2;
        public byte funkt_2
        {
            get { return _funkt2; }
            set { _funkt2 = value; }
        }

        private byte _funkt3;
        public byte funkt_3
        {
            get { return _funkt3; }
            set { _funkt3 = value; }
        }

        private byte _funkt4;
        public byte funkt_4
        {
            get { return _funkt4; }
            set { _funkt4 = value; }
        }

        private byte _funkt5;
        public byte funkt_5
        {
            get { return _funkt5; }
            set { _funkt5 = value; }
        }

        private byte _funkt6;
        public byte funkt_6
        {
            get { return _funkt6; }
            set { _funkt6 = value; }
        }

        private byte _funkt7;
        public byte funkt_7
        {
            get { return _funkt7; }
            set { _funkt7 = value; }
        }

        private byte _schnell;
        public byte schnell
        {
            get { return _schnell; }
            set { _schnell = value; }
        }

        [Endian(Endianness.BigEndian)]
        private int _zugTyp;
        public Int32 zug_typ
        {
            get { return _zugTyp; }
            set { _zugTyp = value; }
        }

        private byte _zugtyp0;
        public byte zugtyp_0
        {
            get { return _zugtyp0; }
            set { _zugtyp0 = value; }
        }

        private byte _zugtyp1;
        public byte zugtyp_1
        {
            get { return _zugtyp1; }
            set { _zugtyp1 = value; }
        }

        private byte _zugtyp2;
        public byte zugtyp_2
        {
            get { return _zugtyp2; }
            set { _zugtyp2 = value; }
        }

        private byte _zugtyp3;
        public byte zugtyp_3
        {
            get { return _zugtyp3; }
            set { _zugtyp3 = value; }
        }

        private byte _zugtyp4;
        public byte zugtyp_4
        {
            get { return _zugtyp4; }
            set { _zugtyp4 = value; }
        }

        private byte _zugtyp5;
        public byte zugtyp_5
        {
            get { return _zugtyp5; }
            set { _zugtyp5 = value; }
        }

        private byte _zugtyp6;
        public byte zugtyp_6
        {
            get { return _zugtyp6; }
            set { _zugtyp6 = value; }
        }

        private byte _zugtyp7;
        public byte zugtyp_7
        {
            get { return _zugtyp7; }
            set { _zugtyp7 = value; }
        }

        private short _res1;
        public Int16 res1
        {
            get { return _res1; }
            set { _res1 = value; }
        }

        [Endian(Endianness.BigEndian)]
        private short _maxSdEmpf;
        public Int16 max_sd_empf
        {
            get { return _maxSdEmpf; }
            set { _maxSdEmpf = value; }
        }

        [Endian(Endianness.BigEndian)]
        private short _maxSdAl8P;
        public Int16 max_sd_al8p
        {
            get { return _maxSdAl8P; }
            set { _maxSdAl8P = value; }
        }

        [Endian(Endianness.BigEndian)]
        private short _maxInst;
        public Int16 max_inst
        {
            get { return _maxInst; }
            set { _maxInst = value; }
        }

        [Endian(Endianness.BigEndian)]
        private short _res2;
        public Int16 res2
        {
            get { return _res2; }
            set { _res2 = value; }
        }

        private byte _verbProj;
        public byte verb_proj
        {
            get { return _verbProj; }
            set { _verbProj = value; }
        }

        private byte _verbProg;
        public byte verb_prog
        {
            get { return _verbProg; }
            set { _verbProg = value; }
        }

        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)]
        private byte[] _res;
        public byte[] res
        {
            get { return _res; }
            set { _res = value; }
        }
    }

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public class xy32_1Dataset : SZLDataset
    {
        [Endian(Endianness.BigEndian)]
        private ushort _index;
        public UInt16 Index
        {
            get { return _index; }
            set { _index = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _res_pg;
        public UInt16 Res_pg
        {
            get { return _res_pg; }
            set { _res_pg = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _res_os;
        public UInt16 Res_os
        {
            get { return _res_os; }
            set { _res_os = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _u_pg;
        public UInt16 U_pg
        {
            get { return _u_pg; }
            set { _u_pg = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _u_os;
        public UInt16 U_os
        {
            get { return _u_os; }
            set { _u_os = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _proj;
        public UInt16 Proj
        {
            get { return _proj; }
            set { _proj = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _auf;
        public UInt16 Auf
        {
            get { return _auf; }
            set { _auf = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _free;
        public UInt16 Free
        {
            get { return _free; }
            set { _free = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _used;
        public UInt16 Used
        {
            get { return _used; }
            set { _used = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _last;
        public UInt16 Last
        {
            get { return _last; }
            set { _last = value; }
        }

        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
        private byte[] _res;
        public byte[] res
        {
            get { return _res; }
            set { _res = value; }
        }
    }

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public class xy32_4Dataset : SZLDataset
    {
        //[Endian(Endianness.BigEndian)]
        private ushort _index;
        /// <summary>
        /// ·	Byte 1: B#16#04: CPU-Schutzstufe, Bedienschalterstellungen und Prüfsummen
        /// ·	Byte 0:Standard-CPU: B#16#00H-CPU: Bits 0 bis 2: Baugruppenträger-Nr.Bit 3: 0 = Reserve-CPU, 1 = Master-CPUBits 4 bis 7: 1111
        /// </summary>
        public UInt16 Index
        {
            get { return _index; }
            set { _index = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _sch_schal;
        /// <summary>
        /// Durch Betriebsartenschalter eingestellte Schutzstufe (1, 2, 3)
        /// </summary>
        public UInt16 sch_schal
        {
            get { return _sch_schal; }
            set { _sch_schal = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _sch_par;
        /// <summary>
        /// Parametrierte Schutzstufe (0, 1, 2, 3; 0: kein Paßword vergeben, parametrierte Schutzstufe ungültig).
        /// </summary>
        public UInt16 sch_par
        {
            get { return _sch_par; }
            set { _sch_par = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _sch_rel;
        /// <summary>
        /// Gültige Schutzstufe der CPU
        /// </summary>
        public UInt16 sch_rel
        {
            get { return _sch_rel; }
            set { _sch_rel = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _bart_sch;
        /// <summary>
        /// Stellung des Betriebsartenschalters (1:RUN, 2:RUN-P, 3:STOP, 4:MRES, 0:undefiniert bzw. nicht ermittelbar)
        /// </summary>
        public UInt16 bart_sch
        {
            get { return _bart_sch; }
            set { _bart_sch = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _anl_sch;
        /// <summary>
        /// Stellung des Anlaufartenschalters (1:CRST, 2:WRST, 0:undefiniert, nicht vorhanden oder nicht ermittelbar)
        /// </summary>
        public UInt16 anl_sch
        {
            get { return _anl_sch; }
            set { _anl_sch = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _ken_f;
        /// <summary>
        /// Reserviert
        /// </summary>
        public UInt16 ken_f
        {
            get { return _ken_f; }
            set { _ken_f = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _ken_rel;
        /// <summary>
        /// Kennung für die Gültigkeit der vier folgenden Prüfsummen (0: ungültig)
        /// </summary>
        public UInt16 ken_rel
        {
            get { return _ken_rel; }
            set { _ken_rel = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _ken_ver1_hw;
        /// <summary>
        /// Prüfsumme 1 der Hardwarekonfiguration (Intel-Format):Exklusiv-Oder-Verknüpfung über die Längen aller Systemdatenbausteine
        /// </summary>
        public UInt16 ken_ver1_hw
        {
            get { return _ken_ver1_hw; }
            set { _ken_ver1_hw = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _ken_ver2_hw;
        /// <summary>
        /// Prüfsumme 2 der Hardwarekonfiguration (Intel-Format):Exklusiv-Oder-Verknüpfung über die Prüfsummen aller Systemdatenbausteine
        /// </summary>
        public UInt16 ken_ver2_hw
        {
            get { return _ken_ver2_hw; }
            set { _ken_ver2_hw = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _ken_ver1_awp;
        /// <summary>
        /// Prüfsumme 1 des Anwenderprogramms (Intel-Format):Exklusiv-Oder-Verknüpfung über die Längen der folgenden Bausteine: OBs, DBs, FBs, FCs
        /// </summary>
        public UInt16 ken_ver1_awp
        {
            get { return _ken_ver1_awp; }
            set { _ken_ver1_awp = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _ken_ver2_awp;
        /// <summary>
        /// Prüfsumme 2 des Anwenderprogramms (Intel-Format):Exklusiv-Oder-Verknüpfung über die Prüfsummen der folgenden Bausteine: OBs, DBs, FBs, FCs
        /// </summary>
        public UInt16 ken_ver2_awp
        {
            get { return _ken_ver2_awp; }
            set { _ken_ver2_awp = value; }
        }

        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
        private ushort[] _res;
        /// <summary>
        /// Reserviert
        /// </summary>
        public UInt16[] res
        {
            get { return _res; }
            set { _res = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _sfc_req;
        /// <summary>
        /// Anforderung von Schutzstufe 2 bzw. 3 durch SFC 109 (1: Anforderung ist erfolgt)
        /// </summary>
        public UInt16 sfc_req
        {
            get { return _sfc_req; }
            set { _sfc_req = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _sfc_act;
        /// <summary>
        /// Aktivierung von Schutzstufe 2 bzw. 3 durch SFC 109 (1: Aktivierung ist erfolgt)
        /// </summary>
        public UInt16 sfc_act
        {
            get { return _sfc_act; }
            set { _sfc_act = value; }
        }

        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
        private ushort[] _res2;
        /// <summary>
        /// Reserviert
        /// </summary>
        public UInt16[] res2
        {
            get { return _res2; }
            set { _res2 = value; }
        }
    }

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public class xy32_8Dataset : SZLDataset
    {
        [Endian(Endianness.BigEndian)]
        private ushort _index;
        public UInt16 Index
        {
            get { return _index; }
            set { _index = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _zykl;
        public UInt16 zykl
        {
            get { return _zykl; }
            set { _zykl = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _korr;
        public UInt16 korr
        {
            get { return _korr; }
            set { _korr = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _clock_0;
        public UInt16 clock_0
        {
            get { return _clock_0; }
            set { _clock_0 = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _clock_1;
        public UInt16 clock_1
        {
            get { return _clock_1; }
            set { _clock_1 = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _clock_2;
        public UInt16 clock_2
        {
            get { return _clock_2; }
            set { _clock_2 = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _clock_3;
        public UInt16 clock_3
        {
            get { return _clock_3; }
            set { _clock_3 = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _clock_4;
        public UInt16 clock_4
        {
            get { return _clock_4; }
            set { _clock_4 = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _clock_5;
        public UInt16 clock_5
        {
            get { return _clock_5; }
            set { _clock_5 = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _clock_6;
        public UInt16 clock_6
        {
            get { return _clock_6; }
            set { _clock_6 = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _clock_7;
        public UInt16 clock_7
        {
            get { return _clock_7; }
            set { _clock_7 = value; }
        }

        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
        private ushort[] _time;
        public UInt16[] time
        {
            get { return _time; }
            set { _time = value; }
        }

        private byte _bszl_0;
        public byte bszl_0
        {
            get { return _bszl_0; }
            set { _bszl_0 = value; }
        }

        private byte _bszl_1;
        public byte bszl_1
        {
            get { return _bszl_1; }
            set { _bszl_1 = value; }
        }

        private byte _bszü_0;
        public byte bszü_0
        {
            get { return _bszü_0; }
            set { _bszü_0 = value; }
        }

        //reserviert
        private byte _bszü_1;
        public byte bszü_1
        {
            get { return _bszü_1; }
            set { _bszü_1 = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _status;
        public UInt16 status
        {
            get { return _status; }
            set { _status = value; }
        }

        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
        private byte[] _res;
        public byte[] res
        {
            get { return _res; }
            set { _res = value; }
        }

        private byte _status_valid;
        public byte status_valid
        {
            get { return _status_valid; }
            set { _status_valid = value; }
        }
    }

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public class xy71Dataset : SZLDataset
    {
        [Endian(Endianness.BigEndian)]
        private ushort _redinf;
        public UInt16 redinf
        {
            get { return _redinf; }
            set { _redinf = value; }
        }

        private byte _mwstat1;
        public byte mwstat1
        {
            get { return _mwstat1; }
            set { _mwstat1 = value; }
        }

        private byte _mwstat2;
        public byte mwstat2
        {
            get { return _mwstat2; }
            set { _mwstat2 = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _hsfcinfo;
        public UInt16 hsfcinfo
        {
            get { return _hsfcinfo; }
            set { _hsfcinfo = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _samfehl;
        public UInt16 samfehl
        {
            get { return _samfehl; }
            set { _samfehl = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _bzCpu0;
        public UInt16 bz_cpu_0
        {
            get { return _bzCpu0; }
            set { _bzCpu0 = value; }
        }

        [Endian(Endianness.BigEndian)]
        private ushort _bzCpu1;
        public UInt16 bz_cpu_1
        {
            get { return _bzCpu1; }
            set { _bzCpu1 = value; }
        }

        private byte _cpuValid;
        public byte cpu_valid
        {
            get { return _cpuValid; }
            set { _cpuValid = value; }
        }

        private byte _hsyncF;
        public byte hsync_f
        {
            get { return _hsyncF; }
            set { _hsyncF = value; }
        }
    }

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public class xy74Dataset : SZLDataset
    {
        [Endian(Endianness.BigEndian)]
        private ushort _ledKennung;
        public UInt16 led_kennung
        {
            get { return _ledKennung; }
            set { _ledKennung = value; }
        }

        private byte _ledOn;
        public byte led_on
        {
            get { return _ledOn; }
            set { _ledOn = value; }
        }

        private byte _ledBlink;
        public byte led_blink
        {
            get { return _ledBlink; }
            set { _ledBlink = value; }
        }
    }
}

<MSG> SZL Bugfixes (Auto propertys don't work with StructLayout)


<DFF> @@ -15,12 +15,28 @@ namespace DotNetSiemensPLCToolBoxLibrary.Communication.S7_xxx
         public byte[] Bytes { get; set; }
     }
 
+    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
+    public class xy00Dataset : SZLDataset
+    {
+        private ushort _szlId;
+        public UInt16 SZL_id
+        {
+            get { return _szlId; }
+            set { _szlId = value; }
+        }
+    }
+
     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
     public class xy11Dataset : SZLDataset
     {
-        public short Index { get; set; }
+        private short _index;
+        public short Index
+        {
+            get { return _index; }
+            set { _index = value; }
+        }
 
-        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
+        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)] 
         private string _mlfB;     
         public string MlfB
         {
@@ -28,121 +44,307 @@ namespace DotNetSiemensPLCToolBoxLibrary.Communication.S7_xxx
             set { _mlfB = value; }
         }
 
-        public UInt16 BGTyp { get; set; }
+        private ushort _bgTyp;
+        public UInt16 BGTyp
+        {
+            get { return _bgTyp; }
+            set { _bgTyp = value; }
+        }
 
-        public UInt16 Ausbg1 { get; set; }
+        private ushort _ausbg1;
+        public UInt16 Ausbg1
+        {
+            get { return _ausbg1; }
+            set { _ausbg1 = value; }
+        }
 
-        public UInt16 Ausbg2 { get; set; }
+        private ushort _ausbg2;
+        public UInt16 Ausbg2
+        {
+            get { return _ausbg2; }
+            set { _ausbg2 = value; }
+        }
     }
 
     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
     public class xy12Dataset : SZLDataset
     {
-        public UInt16 Feature { get; set; }
+        private ushort _feature;
+        public UInt16 Feature
+        {
+            get { return _feature; }
+            set { _feature = value; }
+        }
     }
 
 
     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
     public class xy13Dataset : SZLDataset
     {
-        public UInt16 Index { get; set; }
+        private ushort _index;
+        public UInt16 Index
+        {
+            get { return _index; }
+            set { _index = value; }
+        }
 
-        public UInt16 Code { get; set; }
+        private ushort _code;
+        public UInt16 Code
+        {
+            get { return _code; }
+            set { _code = value; }
+        }
 
-        public UInt32 Size { get; set; }
+        private uint _size;
+        public UInt32 Size
+        {
+            get { return _size; }
+            set { _size = value; }
+        }
 
-        public UInt16 Mode { get; set; }
+        private ushort _mode;
+        public UInt16 Mode
+        {
+            get { return _mode; }
+            set { _mode = value; }
+        }
 
-        public UInt16 Granu { get; set; }
+        private ushort _granu;
+        public UInt16 Granu
+        {
+            get { return _granu; }
+            set { _granu = value; }
+        }
 
-        public UInt32 Ber1 { get; set; }
+        private uint _ber1;
+        public UInt32 Ber1
+        {
+            get { return _ber1; }
+            set { _ber1 = value; }
+        }
 
-        public UInt32 Belegt1 { get; set; }
+        private uint _belegt1;
+        public UInt32 Belegt1
+        {
+            get { return _belegt1; }
+            set { _belegt1 = value; }
+        }
 
-        public UInt32 Block1 { get; set; }
+        private uint _block1;
+        public UInt32 Block1
+        {
+            get { return _block1; }
+            set { _block1 = value; }
+        }
 
-        public UInt32 Ber2 { get; set; }
+        private uint _ber2;
+        public UInt32 Ber2
+        {
+            get { return _ber2; }
+            set { _ber2 = value; }
+        }
 
-        public UInt32 Belegt2 { get; set; }
+        private uint _belegt2;
+        public UInt32 Belegt2
+        {
+            get { return _belegt2; }
+            set { _belegt2 = value; }
+        }
 
-        public UInt32 Block2 { get; set; }
+        private uint _block2;
+        public UInt32 Block2
+        {
+            get { return _block2; }
+            set { _block2 = value; }
+        }
     }
 
 
     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
     public class xy14Dataset : SZLDataset
     {
-        public UInt16 Index { get; set; }
+        private ushort _index;
+        public UInt16 Index
+        {
+            get { return _index; }
+            set { _index = value; }
+        }
 
-        public UInt16 Code { get; set; }
+        private ushort _code;
+        public UInt16 Code
+        {
+            get { return _code; }
+            set { _code = value; }
+        }
 
-        public UInt16 Anzahl { get; set; }
+        private ushort _anzahl;
+        public UInt16 Anzahl
+        {
+            get { return _anzahl; }
+            set { _anzahl = value; }
+        }
 
-        public UInt16 Reman { get; set; }
+        private ushort _reman;
+        public UInt16 Reman
+        {
+            get { return _reman; }
+            set { _reman = value; }
+        }
     }
     
     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
     public class xy15Dataset : SZLDataset
     {
-        public UInt16 Index { get; set; }
+        private ushort _index;
+        public UInt16 Index
+        {
+            get { return _index; }
+            set { _index = value; }
+        }
 
-        public UInt16 MaxAnz { get; set; }
+        private ushort _maxAnz;
+        public UInt16 MaxAnz
+        {
+            get { return _maxAnz; }
+            set { _maxAnz = value; }
+        }
 
-        public UInt16 MaxLng { get; set; }
+        private ushort _maxLng;
+        public UInt16 MaxLng
+        {
+            get { return _maxLng; }
+            set { _maxLng = value; }
+        }
 
-        public UInt32 Maxabl { get; set; }
+        private uint _maxabl;
+        public UInt32 Maxabl
+        {
+            get { return _maxabl; }
+            set { _maxabl = value; }
+        }
     }
 
     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
     public class xy16Dataset : SZLDataset
     {
-        public UInt16 Index { get; set; }
+        private ushort _index;
+        public UInt16 Index
+        {
+            get { return _index; }
+            set { _index = value; }
+        }
 
-        public UInt16 MaxAnz { get; set; }
+        private ushort _maxAnz;
+        public UInt16 MaxAnz
+        {
+            get { return _maxAnz; }
+            set { _maxAnz = value; }
+        }
 
-        public UInt16 AnzAkt { get; set; }        
+        private ushort _anzAkt;
+        public UInt16 AnzAkt
+        {
+            get { return _anzAkt; }
+            set { _anzAkt = value; }
+        }
     }
 
     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
     public class xy17Dataset : SZLDataset
     {
-        public UInt16 SDBNr { get; set; }
+        private ushort _sdbNr;
+        public UInt16 SDBNr
+        {
+            get { return _sdbNr; }
+            set { _sdbNr = value; }
+        }
 
-        public UInt16 State { get; set; }
+        private ushort _state;
+        public UInt16 State
+        {
+            get { return _state; }
+            set { _state = value; }
+        }
     }
 
     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
     public class xy18Dataset : SZLDataset
     {
-        public UInt16 RackNr { get; set; }
+        private ushort _rackNr;
+        public UInt16 RackNr
+        {
+            get { return _rackNr; }
+            set { _rackNr = value; }
+        }
 
-        public UInt16 AnzSt { get; set; }
+        private ushort _anzSt;
+        public UInt16 AnzSt
+        {
+            get { return _anzSt; }
+            set { _anzSt = value; }
+        }
     }
 
     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
     public class xy19Dataset : SZLDataset
     {
-        public UInt16 Index { get; set; }
+        private ushort _index;
+        public UInt16 Index
+        {
+            get { return _index; }
+            set { _index = value; }
+        }
 
-        public byte Led_On { get; set; }
+        private byte _ledOn;
+        public byte Led_On
+        {
+            get { return _ledOn; }
+            set { _ledOn = value; }
+        }
 
-        public byte Led_Blink { get; set; }
+        private byte _ledBlink;
+        public byte Led_Blink
+        {
+            get { return _ledBlink; }
+            set { _ledBlink = value; }
+        }
     }
 
     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
     public class xy21Dataset : SZLDataset
     {
-        public UInt16 ereig { get; set; }
+        private ushort _ereig;
+        public UInt16 ereig
+        {
+            get { return _ereig; }
+            set { _ereig = value; }
+        }
 
-        public byte Ae { get; set; }
+        private byte _ae;
+        public byte Ae
+        {
+            get { return _ae; }
+            set { _ae = value; }
+        }
 
-        public byte OB { get; set; }
+        private byte _ob;
+        public byte OB
+        {
+            get { return _ob; }
+            set { _ob = value; }
+        }
     }
 
     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
     public class xy1CDataset : SZLDataset
     {
-        public UInt16 Index { get; set; }
+        private ushort _index;
+        public UInt16 Index
+        {
+            get { return _index; }
+            set { _index = value; }
+        }
+
         [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
         private string _text;
         public string Text
@@ -163,37 +365,161 @@ namespace DotNetSiemensPLCToolBoxLibrary.Communication.S7_xxx
             set { _info = value; }
         }
 
-        public UInt16 Al1 { get; set; }
-        public UInt16 Al2 { get; set; }
-        public UInt32 Al3 { get; set; }
+        private ushort _al1;
+        public UInt16 Al1
+        {
+            get { return _al1; }
+            set { _al1 = value; }
+        }
+
+        private ushort _al2;
+        public UInt16 Al2
+        {
+            get { return _al2; }
+            set { _al2 = value; }
+        }
+
+        private uint _al3;
+        public UInt32 Al3
+        {
+            get { return _al3; }
+            set { _al3 = value; }
+        }
     }
 
     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
     public class xy23Dataset : SZLDataset
     {
-        public byte Ae { get; set; }
-        public byte AeStat { get; set; }
-        public UInt16 Aefstat { get; set; }
-        public byte MaxBst { get; set; }
-        public byte MaxSti { get; set; }
-        public byte AktSiv { get; set; }
-        public byte AktSib { get; set; }
-        public UInt16 Grld { get; set; }
-        public UInt32 ProgFm { get; set; }
-        public UInt32 SyncFm { get; set; }
+        private byte _ae;
+        public byte Ae
+        {
+            get { return _ae; }
+            set { _ae = value; }
+        }
+
+        private byte _aeStat;
+        public byte AeStat
+        {
+            get { return _aeStat; }
+            set { _aeStat = value; }
+        }
+
+        private ushort _aefstat;
+        public UInt16 Aefstat
+        {
+            get { return _aefstat; }
+            set { _aefstat = value; }
+        }
+
+        private byte _maxBst;
+        public byte MaxBst
+        {
+            get { return _maxBst; }
+            set { _maxBst = value; }
+        }
+
+        private byte _maxSti;
+        public byte MaxSti
+        {
+            get { return _maxSti; }
+            set { _maxSti = value; }
+        }
+
+        private byte _aktSiv;
+        public byte AktSiv
+        {
+            get { return _aktSiv; }
+            set { _aktSiv = value; }
+        }
+
+        private byte _aktSib;
+        public byte AktSib
+        {
+            get { return _aktSib; }
+            set { _aktSib = value; }
+        }
+
+        private ushort _grld;
+        public UInt16 Grld
+        {
+            get { return _grld; }
+            set { _grld = value; }
+        }
+
+        private uint _progFm;
+        public UInt32 ProgFm
+        {
+            get { return _progFm; }
+            set { _progFm = value; }
+        }
+
+        private uint _syncFm;
+        public UInt32 SyncFm
+        {
+            get { return _syncFm; }
+            set { _syncFm = value; }
+        }
     }
 
     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
     public class xy24Dataset : SZLDataset
     {
-        public UInt16 Ereig { get; set; }
-        public byte Ae { get; set; }
-        public byte bzü_id { get; set; }
-        public UInt32 Res { get; set; }
-        public byte AnlInfo1 { get; set; }
-        public byte AnlInfo2 { get; set; }
-        public byte AnlInfo3 { get; set; }
-        public byte AnlInfo4 { get; set; }
+        private ushort _ereig;
+        public UInt16 Ereig
+        {
+            get { return _ereig; }
+            set { _ereig = value; }
+        }
+
+        private byte _ae;
+        public byte Ae
+        {
+            get { return _ae; }
+            set { _ae = value; }
+        }
+
+        private byte _bzüId;
+        public byte bzü_id
+        {
+            get { return _bzüId; }
+            set { _bzüId = value; }
+        }
+
+        private uint _res;
+        public UInt32 Res
+        {
+            get { return _res; }
+            set { _res = value; }
+        }
+
+        private byte _anlInfo1;
+        public byte AnlInfo1
+        {
+            get { return _anlInfo1; }
+            set { _anlInfo1 = value; }
+        }
+
+        private byte _anlInfo2;
+        public byte AnlInfo2
+        {
+            get { return _anlInfo2; }
+            set { _anlInfo2 = value; }
+        }
+
+        private byte _anlInfo3;
+        public byte AnlInfo3
+        {
+            get { return _anlInfo3; }
+            set { _anlInfo3 = value; }
+        }
+
+        private byte _anlInfo4;
+        public byte AnlInfo4
+        {
+            get { return _anlInfo4; }
+            set { _anlInfo4 = value; }
+        }
+
         [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
         private UInt16[] _time;
         public UInt16[] Time
@@ -206,27 +532,72 @@ namespace DotNetSiemensPLCToolBoxLibrary.Communication.S7_xxx
     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
     public class xy25Dataset : SZLDataset
     {
-        public byte tpa_nr { get; set; }
+        private byte _tpaNr;
+        public byte tpa_nr
+        {
+            get { return _tpaNr; }
+            set { _tpaNr = value; }
+        }
 
-        public byte tpa_use { get; set; }
+        private byte _tpaUse;
+        public byte tpa_use
+        {
+            get { return _tpaUse; }
+            set { _tpaUse = value; }
+        }
 
-        public byte ob_nr { get; set; }
+        private byte _obNr;
+        public byte ob_nr
+        {
+            get { return _obNr; }
+            set { _obNr = value; }
+        }
 
-        public byte res { get; set; }
+        private byte _res;
+        public byte res
+        {
+            get { return _res; }
+            set { _res = value; }
+        }
     }
 
     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
     public class xy31_1Dataset : SZLDataset
     {
-        public UInt16 Index { get; set; }
+        private ushort _index;
+        public UInt16 Index
+        {
+            get { return _index; }
+            set { _index = value; }
+        }
 
-        public UInt16 Pdu { get; set; }
+        private ushort _pdu;
+        public UInt16 Pdu
+        {
+            get { return _pdu; }
+            set { _pdu = value; }
+        }
 
-        public UInt16 Anz { get; set; }
+        private ushort _anz;
+        public UInt16 Anz
+        {
+            get { return _anz; }
+            set { _anz = value; }
+        }
 
-        public UInt32 Mpi_bps { get; set; }
+        private uint _mpiBps;
+        public UInt32 Mpi_bps
+        {
+            get { return _mpiBps; }
+            set { _mpiBps = value; }
+        }
 
-        public UInt32 Kbus_bps { get; set; }
+        private uint _kbusBps;
+        public UInt32 Kbus_bps
+        {
+            get { return _kbusBps; }
+            set { _kbusBps = value; }
+        }
 
         [MarshalAs(UnmanagedType.ByValArray, SizeConst = 13)]
         private UInt16[] _res;
@@ -240,21 +611,56 @@ namespace DotNetSiemensPLCToolBoxLibrary.Communication.S7_xxx
     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
     public class xy31_2Dataset : SZLDataset
     {
-        public UInt16 Index { get; set; }
+        private ushort _index;
+        public UInt16 Index
+        {
+            get { return _index; }
+            set { _index = value; }
+        }
 
-        public byte funkt_0 { get; set; }
+        private byte _funkt0;
+        public byte funkt_0
+        {
+            get { return _funkt0; }
+            set { _funkt0 = value; }
+        }
 
-        public byte funkt_1 { get; set; }
+        private byte _funkt1;
+        public byte funkt_1
+        {
+            get { return _funkt1; }
+            set { _funkt1 = value; }
+        }
 
-        public byte funkt_2 { get; set; }
+        private byte _funkt2;
+        public byte funkt_2
+        {
+            get { return _funkt2; }
+            set { _funkt2 = value; }
+        }
 
-        public byte funkt_3 { get; set; }
+        private byte _funkt3;
+        public byte funkt_3
+        {
+            get { return _funkt3; }
+            set { _funkt3 = value; }
+        }
 
-        public byte funkt_4 { get; set; }
+        private byte _funkt4;
+        public byte funkt_4
+        {
+            get { return _funkt4; }
+            set { _funkt4 = value; }
+        }
 
-        public byte funkt_5 { get; set; }
+        private byte _funkt5;
+        public byte funkt_5
+        {
+            get { return _funkt5; }
+            set { _funkt5 = value; }
+        }
 
-         [MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
+        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
         private byte[] _aseg;
         public byte[] aseg
         {
@@ -270,29 +676,89 @@ namespace DotNetSiemensPLCToolBoxLibrary.Communication.S7_xxx
             set { _eseg = value; }
         }
 
-        public byte trgereig_0 { get; set; }
+        private byte _trgereig0;
+        public byte trgereig_0
+        {
+            get { return _trgereig0; }
+            set { _trgereig0 = value; }
+        }
 
-        public byte trgereig_1 { get; set; }
+        private byte _trgereig1;
+        public byte trgereig_1
+        {
+            get { return _trgereig1; }
+            set { _trgereig1 = value; }
+        }
 
-        public byte trgereig_2 { get; set; }
+        private byte _trgereig2;
+        public byte trgereig_2
+        {
+            get { return _trgereig2; }
+            set { _trgereig2 = value; }
+        }
 
-        public byte trgbed { get; set; }
+        private byte _trgbed;
+        public byte trgbed
+        {
+            get { return _trgbed; }
+            set { _trgbed = value; }
+        }
 
-        public byte pfad { get; set; }
+        private byte _pfad;
+        public byte pfad
+        {
+            get { return _pfad; }
+            set { _pfad = value; }
+        }
 
-        public byte tiefe { get; set; }
+        private byte _tiefe;
+        public byte tiefe
+        {
+            get { return _tiefe; }
+            set { _tiefe = value; }
+        }
 
-        public byte systrig { get; set; }
+        private byte _systrig;
+        public byte systrig
+        {
+            get { return _systrig; }
+            set { _systrig = value; }
+        }
 
-        public byte erg_par { get; set; }
+        private byte _ergPar;
+        public byte erg_par
+        {
+            get { return _ergPar; }
+            set { _ergPar = value; }
+        }
 
-        public UInt16 erg_pat_1 { get; set; }
+        private ushort _ergPat1;
+        public UInt16 erg_pat_1
+        {
+            get { return _ergPat1; }
+            set { _ergPat1 = value; }
+        }
 
-        public UInt16 erg_pat_2 { get; set; }
+        private ushort _ergPat2;
+        public UInt16 erg_pat_2
+        {
+            get { return _ergPat2; }
+            set { _ergPat2 = value; }
+        }
 
-        public UInt16 force { get; set; }
+        private ushort _force;
+        public UInt16 force
+        {
+            get { return _force; }
+            set { _force = value; }
+        }
 
-        public UInt16 time { get; set; }
+        private ushort _time;
+        public UInt16 time
+        {
+            get { return _time; }
+            set { _time = value; }
+        }
 
         [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
         private UInt16[] _res;
@@ -306,23 +772,68 @@ namespace DotNetSiemensPLCToolBoxLibrary.Communication.S7_xxx
     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
     public class xy31_3Dataset : SZLDataset
     {
-        public UInt16 Index { get; set; }
+        private ushort _index;
+        public UInt16 Index
+        {
+            get { return _index; }
+            set { _index = value; }
+        }
 
-        public byte funkt_0 { get; set; }
+        private byte _funkt0;
+        public byte funkt_0
+        {
+            get { return _funkt0; }
+            set { _funkt0 = value; }
+        }
 
-        public byte funkt_1 { get; set; }
+        private byte _funkt1;
+        public byte funkt_1
+        {
+            get { return _funkt1; }
+            set { _funkt1 = value; }
+        }
+
+        private byte _funkt2;
+        public byte funkt_2
+        {
+            get { return _funkt2; }
+            set { _funkt2 = value; }
+        }
 
-        public byte funkt_2 { get; set; }
+        private byte _funkt3;
+        public byte funkt_3
+        {
+            get { return _funkt3; }
+            set { _funkt3 = value; }
+        }
 
-        public byte funkt_3 { get; set; }
-        
-        public Int16 Data {get; set; }
+        private short _data;
+        public Int16 Data
+        {
+            get { return _data; }
+            set { _data = value; }
+        }
 
-        public Int16 Anz { get; set; }
+        private short _anz;
+        public Int16 Anz
+        {
+            get { return _anz; }
+            set { _anz = value; }
+        }
 
-        public Int16 Per_Min { get; set; }
+        private short _perMin;
+        public Int16 Per_Min
+        {
+            get { return _perMin; }
+            set { _perMin = value; }
+        }
 
-        public Int16 Per_Max { get; set; }        
+        private short _perMax;
+        public Int16 Per_Max
+        {
+            get { return _perMax; }
+            set { _perMax = value; }
+        }
 
         [MarshalAs(UnmanagedType.ByValArray, SizeConst = 13)]
         private UInt16[] _res;
@@ -336,22 +847,92 @@ namespace DotNetSiemensPLCToolBoxLibrary.Communication.S7_xxx
     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
     public class xy71Dataset : SZLDataset
     {
-        public UInt16 redinf { get; set; }
-        public byte mwstat1 { get; set; }
-        public byte mwstat2 { get; set; }
-        public UInt16 hsfcinfo { get; set; }
-        public UInt16 samfehl { get; set; }
-        public UInt16 bz_cpu_0 { get; set; }
-        public UInt16 bz_cpu_1 { get; set; }
-        public byte cpu_valid { get; set; }
-        public byte hsync_f { get; set; }
+        private ushort _redinf;
+        public UInt16 redinf
+        {
+            get { return _redinf; }
+            set { _redinf = value; }
+        }
+
+        private byte _mwstat1;
+        public byte mwstat1
+        {
+            get { return _mwstat1; }
+            set { _mwstat1 = value; }
+        }
+
+        private byte _mwstat2;
+        public byte mwstat2
+        {
+            get { return _mwstat2; }
+            set { _mwstat2 = value; }
+        }
+
+        private ushort _hsfcinfo;
+        public UInt16 hsfcinfo
+        {
+            get { return _hsfcinfo; }
+            set { _hsfcinfo = value; }
+        }
+
+        private ushort _samfehl;
+        public UInt16 samfehl
+        {
+            get { return _samfehl; }
+            set { _samfehl = value; }
+        }
+
+        private ushort _bzCpu0;
+        public UInt16 bz_cpu_0
+        {
+            get { return _bzCpu0; }
+            set { _bzCpu0 = value; }
+        }
+
+        private ushort _bzCpu1;
+        public UInt16 bz_cpu_1
+        {
+            get { return _bzCpu1; }
+            set { _bzCpu1 = value; }
+        }
+
+        private byte _cpuValid;
+        public byte cpu_valid
+        {
+            get { return _cpuValid; }
+            set { _cpuValid = value; }
+        }
+
+        private byte _hsyncF;
+        public byte hsync_f
+        {
+            get { return _hsyncF; }
+            set { _hsyncF = value; }
+        }
     }
 
     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
     public class xy74Dataset : SZLDataset
     {
-        public UInt16 led_kennung { get; set; }
-        public byte led_on { get; set; }
-        public byte led_blink { get; set; }
+        private ushort _ledKennung;
+        public UInt16 led_kennung
+        {
+            get { return _ledKennung; }
+            set { _ledKennung = value; }
+        }
+
+        private byte _ledOn;
+        public byte led_on
+        {
+            get { return _ledOn; }
+            set { _ledOn = value; }
+        }
+
+        private byte _ledBlink;
+        public byte led_blink
+        {
+            get { return _ledBlink; }
+            set { _ledBlink = value; }
+        }
     }
 }

SZL Bugfixes (Auto propertys don't work with StructLayout)