Ejemplo n.º 1
0
        public async Task <CommonLinkProperties> GetCommonLinkProperties(CancellationToken cancel_token)
        {
            var result = await SendActionAsync("GetCommonLinkProperties", cancel_token).ConfigureAwait(false);

            if (!result.IsSucceeded)
            {
                return(null);
            }
            string        value;
            WANAccessType wan_access_type = WANAccessType.Unknown;

            if (result.Parameters.TryGetValue("NewWANAccessType", out value))
            {
                Enum.TryParse(value, out wan_access_type);
            }
            int layer1_upstream_max_bitrate = 0;

            if (result.Parameters.TryGetValue("NewLayer1UpstreamMaxBitRate", out value))
            {
                Int32.TryParse(value, out layer1_upstream_max_bitrate);
            }
            int layer1_downstream_max_bitrate = 0;

            if (result.Parameters.TryGetValue("NewLayer1DownstreamMaxBitRate", out value))
            {
                Int32.TryParse(value, out layer1_downstream_max_bitrate);
            }
            PhysicalLinkStatus physical_link_status = PhysicalLinkStatus.Unknown;

            if (result.Parameters.TryGetValue("NewPhysicalLinkStatus", out value))
            {
                Enum.TryParse(value, out physical_link_status);
            }
            return(new CommonLinkProperties(wan_access_type, layer1_upstream_max_bitrate, layer1_downstream_max_bitrate, physical_link_status));
        }
Ejemplo n.º 2
0
 public CommonLinkProperties(
     WANAccessType wan_access_type,
     int layer1_upstream_max_bitrate,
     int layer1_downstream_max_bitrate,
     PhysicalLinkStatus physical_link_status)
 {
     this.WANAccessType              = wan_access_type;
     this.Layer1UpstreamMaxBitRate   = layer1_upstream_max_bitrate;
     this.Layer1DownstreamMaxBitRate = layer1_downstream_max_bitrate;
     this.PhysicalLinkStatus         = physical_link_status;
 }
Ejemplo n.º 3
0
 public CommonLinkProperties(
   WANAccessType wan_access_type,
   int layer1_upstream_max_bitrate,
   int layer1_downstream_max_bitrate,
   PhysicalLinkStatus physical_link_status)
 {
   this.WANAccessType              = wan_access_type;
   this.Layer1UpstreamMaxBitRate   = layer1_upstream_max_bitrate;
   this.Layer1DownstreamMaxBitRate = layer1_downstream_max_bitrate;
   this.PhysicalLinkStatus         = physical_link_status;
 }