Пример #1
0
        public double getPercentageUsageDownStream()
        {
            WANInfo           info     = this.sender.GetWANInfo();
            OnlineMonitorInfo currinfo = this.sender.GetOnlineMonitorInfo();

            var dl        = info.getDownStreamRate() * 1000;            // MaxRate format is kbit/s
            var currentdl = currinfo.getCurrentDownStreamRate()[0] * 8; //CurrentRate is Bytes per second

            double percentage = ((double)currentdl / (double)dl);

            return(percentage * 100);
        }
Пример #2
0
        /// <summary>
        /// Retunrs Current DownloadSpeed in Bits per second
        /// </summary>
        /// <returns></returns>
        public long getCurrentDlSpeed()
        {
            OnlineMonitorInfo currinfo = this.sender.GetOnlineMonitorInfo();

            return(currinfo.getCurrentDownStreamRate()[0] * 8);
        }
Пример #3
0
        public string getDlAmount()
        {
            OnlineMonitorInfo currinfo = this.sender.GetOnlineMonitorInfo();

            return((currinfo.getCurrentDownStreamRate()[0] * 8).ToString()); //CurrentRate is Bits per second
        }