public RLS()
        {
            this.Name        = "РЛС 1";
            this.Type        = RLSType.PRL;
            this.ChNmb       = 0;
            this.ReqSignal   = RLSReqSignal.IndvNumb;
            this.Distance    = 400.0;
            this.DStep       = 100.0;
            this.AStep       = 30.0;
            this.Rate        = 1.0;
            this.Width       = 12;
            this.Trsh        = 30.0;
            this.Visir       = 0.0;
            this.DiagType    = RLSDiagType.Uniform;
            this.StrDuration = 4.0;
            this.StatNRZ     = new bool[consts.NRZ_STO_WDT];

            this.RateTransform = new RotateTransform(0.0);
            this.RateAnimation = new DoubleAnimation(0.0, 360.0,
                                                     TimeSpan.FromMinutes(1 / this.Rate));
            this.Ctgs = new Category[consts.MAX_CTG];
            for (int i = 0; i < consts.MAX_CTG; i++)
            {
                this.Ctgs[i]          = new Category();
                this.Ctgs[i].EndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 6000);
                this.Ctgs[i].CdgList  = new List <Cdg> {
                };
            }
        }
        public bool Set(ref RLS_UI rls_ui)
        {
            this.Name = rls_ui.Name;
            switch (rls_ui.Type)
            {
            case 0: { this.Type = RLSType.PRL; } break;

            case 1: { this.Type = RLSType.VRL; } break;

            case 2: { this.Type = RLSType.NRZ; } break;

            default: { return(false); }
            }
            this.ChNmb = rls_ui.ChNmb;
            switch (rls_ui.ReqSignal)
            {
            case 0: { this.ReqSignal = RLSReqSignal.IndvNumb; } break;

            case 1: { this.ReqSignal = RLSReqSignal.HT; } break;

            default: { return(false); }
            }
            this.Distance = rls_ui.Distance;
            switch (rls_ui.DStep)
            {
            case 0: { this.DStep = 50.0; } break;

            case 1: { this.DStep = 100.0; } break;

            case 2: { this.DStep = 150.0; } break;

            case 3: { this.DStep = 200.0; } break;

            default: { return(false); }
            }
            switch (rls_ui.AStep)
            {
            case 0: { this.AStep = 15.0; } break;

            case 1: { this.AStep = 30.0; } break;

            case 2: { this.AStep = 45.0; } break;

            case 3: { this.AStep = 90.0; } break;

            default: { return(false); }
            }
            this.Rate  = rls_ui.Rate;
            this.Visir = rls_ui.Visir;
            this.Width = (int)rls_ui.Width;
            this.Trsh  = rls_ui.Trsh;
            rls_ui.statNRZ.CopyTo(this.StatNRZ, 0);
            this.RateAnimation.Duration = TimeSpan.FromMinutes(1 / this.Rate);
            for (int i = 0; i < consts.MAX_CTG; i++)
            {
                this.Ctgs[i].IsEnabled        = rls_ui.ctgEn[i];
                this.Ctgs[i].EndPoint.Address = IPAddress.Parse(rls_ui.ipAddress[i]);
                this.Ctgs[i].EndPoint.Port    = int.Parse(rls_ui.ipPort[i]);
            }
            switch (rls_ui.DiagType)
            {
            case 0: { this.DiagType = RLSDiagType.Uniform; } break;

            case 1: { this.DiagType = RLSDiagType.SinX; } break;

            default: { return(false); }
            }
            this.StrDuration = rls_ui.StrDuration;
            return(true);
        }