Example #1
0
        public double getPercentageUsageUoStream()
        {
            WANInfo           info     = this.sender.GetWANInfo();
            OnlineMonitorInfo currinfo = this.sender.GetOnlineMonitorInfo();

            var ul        = info.getUpstreamRate() * 1000;            // MaxRate format is kbit/s
            var currentul = currinfo.getCurrentUpstreamRate()[0] * 8; //CurrentRate is Bits per second

            double percentage = ((double)currentul / (double)ul);

            return(percentage * 100);
        }
Example #2
0
        /// <summary>
        /// Retunrs Current UploadSpeed in Bits per second
        /// </summary>
        /// <returns></returns>
        public long getCurrentUpSpeed()
        {
            OnlineMonitorInfo currinfo = this.sender.GetOnlineMonitorInfo();

            return(currinfo.getCurrentUpstreamRate()[0] * 8);
        }
Example #3
0
        public string getDlAmount()
        {
            OnlineMonitorInfo currinfo = this.sender.GetOnlineMonitorInfo();

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