Exemple #1
0
 /// <summary>
 /// Constructor for a Link_Cfg_Status object.
 /// </summary>
 /// <param name="lpt">The Link Param Type</param>
 /// <param name="th">The threshold</param>
 /// <param name="cfgst">The config Status (false: failure, true: success)</param>
 public Link_Cfg_Status(Link_Param_Type lpt, Threshold th, bool cfgst)
 {
     this.paramType = lpt;
     this.threshold = th;
     this.configStatus = cfgst;
 }
Exemple #2
0
 /// <summary>
 /// The Link_Param_Rpt constructor.
 /// </summary>
 /// <param name="linkParam">The Link_Param.</param>
 /// <param name="threshold">Tha Threshold.</param>
 public Link_Param_Rpt(Link_Param linkParam, Threshold threshold)
 {
     this.LinkParam = linkParam;
     this.Threshold = threshold;
 }
Exemple #3
0
        private void subscribeEvent(Threshold th)
        {
            string dirSymbol;
            if (th.Threshold_dir == Threshold_X_Dir.ABOVE_THRESHOLD)
                dirSymbol = ">";
            else
                dirSymbol = "<";

            wqlquery = new System.Management.WqlEventQuery("__InstanceModificationEvent"
                , new TimeSpan(0, 0, 1)
                , "TargetInstance isa \"Win32_NetworkAdapter\" AND TargetInstance.GUID='" + Information.GenericInfo.InterfaceGUID + "' AND TargetInstance.Speed " + dirSymbol + th.Threshold_Val);
            mw = new System.Management.ManagementEventWatcher(wqlquery);
            mw.EventArrived += new System.Management.EventArrivedEventHandler(mw_EventArrived);
            mw.Start();
        }
Exemple #4
0
 public ActiveThreshold(Threshold t, Link_Param_Abs_Type lpat)
 {
     this.Threshold = t;
     this.Param_Type = lpat;
 }
Exemple #5
0
 public LinkParamGenDataRateEventWatcher(Threshold th)
 {
     this.th = th;
     subscribeEvent(th);
 }