Пример #1
0
        private void OnReloadCommandExecute()
        {
            new Thread(() => {
                SpeedportHybrid.initDSL();

                if (lastReload.Equals(DateTime.MinValue).Equals(false))
                {
                    DateTime now      = DateTime.Now;
                    double difference = Math.Ceiling(Math.Ceiling((DateTime.Now - lastReload).TotalSeconds) / 60);

                    double diffdCRC = Math.Ceiling((Line.dCRC - lastdCRC) / difference);
                    double diffuCRC = Math.Ceiling((Line.uCRC - lastuCRC) / difference);
                    lastCRC         = string.Format("CRC/min (last {0} min) Upstream: {1} Downstream: {2}", difference, diffuCRC, diffdCRC);

                    double diffdHEC = Math.Ceiling((Line.dHEC - lastdHEC) / difference);
                    double diffuHEC = Math.Ceiling((Line.uHEC - lastuHEC) / difference);
                    lastHEC         = string.Format("HEC/min (last {0} min) Upstream: {1} Downstream: {2}", difference, diffuHEC, diffdHEC);

                    double diffdFEC = Math.Ceiling((Line.dFEC - lastdFEC) / difference);
                    double diffuFEC = Math.Ceiling((Line.uFEC - lastuFEC) / difference);
                    lastFEC         = string.Format("FEC/min (last {0} min) Upstream: {1} Downstream: {2}", difference, diffuFEC, diffdFEC);
                }

                lastReload = DateTime.Now;
                lastdCRC   = Line.dCRC;
                lastuCRC   = Line.uCRC;

                lastdHEC = Line.dHEC;
                lastuHEC = Line.uHEC;

                lastdFEC = Line.dFEC;
                lastuFEC = Line.uFEC;
            }).Start();
        }
        private void OnClearCommandExecute()
        {
            MessageBoxResult result = MessageBox.Show("Sollen die System-Informationen wirklich gelöscht werden?", "Confirmation", MessageBoxButton.YesNoCancel, MessageBoxImage.Question);

            if (result.Equals(MessageBoxResult.Yes))
            {
                SpeedportHybridAPI.getInstance().clearSyslog();
                SpeedportHybrid.initSyslog();
                SearchText = string.Empty;
            }
        }
Пример #3
0
        private void timer_Elapsed(object sender, ElapsedEventArgs e)
        {
            SpeedportHybrid.initDSL();

            Application.Current.Dispatcher.BeginInvoke(new Action(() => {
                if (Log.Equals(true))
                {
                    //log
                    string prepare = "State: {0}, Actual Data Rate: up: {1} down: {2}, Attainable Data Rate: up: {3} down: {4}, SNR Margin up: {5} down: {6}, CRC error count: up: {7} down: {8}, HEC error count: up: {9} down: {10}, FEC error count: up: {11} down: {12}";
                    log(string.Format(prepare, Connection.state, Line.uactual, Line.dactual, Line.uattainable, Line.dattainable, Line.uSNR, Line.dSNR, Line.uCRC, Line.dCRC, Line.uHEC, Line.dHEC, Line.uFEC, Line.dFEC));
                    log(string.Format("CRC/min up: {0} down: {1}, HEC/min up: {2} down: {3}, FEC/min up: {4} down: {5}", Line.uCRCsec, Line.dCRCsec, Line.uHECsec, Line.dHECsec, Line.uFECsec, Line.dFECsec));
                }
            }));
        }
Пример #4
0
        void timer_Elapsed(object sender, ElapsedEventArgs e)
        {
            new Thread(() => {
                SpeedportHybrid.initLtePopup();
                Application.Current.Dispatcher.BeginInvoke(new Action(() => {
                    LTECollection.Add(new LTEData()
                    {
                        Date = DateTime.Now, Data = rsrq.ToInt()
                    });
                    LTECollection2.Add(new LTEData()
                    {
                        Date = DateTime.Now, Data = rsrp.ToInt()
                    });

                    if (LogActive.Equals(true))
                    {
                        // log
                        log(string.Concat("Pysical Cell ID: ", phycellid, ", Cell ID: ", cellid, ", RSRP: ", rsrp, ", RSRQ: ", rsrq));
                    }
                }));
            }).Start();
        }
Пример #5
0
 private void OnReloadCommandExecute()
 {
     new Thread(() => { SpeedportHybrid.initLan(); }).Start();
 }
Пример #6
0
 private void OnSwitchToInterfacePageExecute()
 {
     changePage("interface");
     new Thread(() => { SpeedportHybrid.initInterface(); }).Start();
 }
Пример #7
0
 private void OnSwitchToLanPageExecute()
 {
     changePage("lan");
     new Thread(() => { SpeedportHybrid.initLan(); }).Start();
 }
Пример #8
0
 private void OnSwitchToPhonePageExecute()
 {
     changePage("phone");
     new Thread(() => { SpeedportHybrid.initPhone(); }).Start();
 }
Пример #9
0
 private void OnSwitchToTR181PageExecute()
 {
     changePage("tr181");
     new Thread(() => { SpeedportHybrid.initTR181(); }).Start();
 }
Пример #10
0
 private void OnSwitchToSyslogPageExecute()
 {
     changePage("syslog");
     new Thread(() => { SpeedportHybrid.initSyslog(); }).Start();
 }
Пример #11
0
 private void OnSwitchToLteInfoPageExecute()
 {
     changePage("lte");
     new Thread(() => { SpeedportHybrid.initLTE(); }).Start();
 }
Пример #12
0
 private void OnSwitchToDSLPageExecute()
 {
     changePage("dsl");
     new Thread(() => { SpeedportHybrid.initDSL(); }).Start();
 }
Пример #13
0
 private void OnSwitchToOverviewPageExecute()
 {
     changePage("overview");
     new Thread(() => { SpeedportHybrid.initOverview(); }).Start();
 }
Пример #14
0
 private void OnSwitchToStatusPageExecute()
 {
     changePage("status");
     new Thread(() => { SpeedportHybrid.initStatus(); }).Start();
 }