public LinkSAP80211(string GUID, ushort rcvPort, System.Net.IPAddress mihAddr) { Information.GenericInfo.InterfaceGUID = GUID; Init(rcvPort, mihAddr); #region # Tests ############################# #region Parameters Testing Parameters.PeriodicParameters periodicParams = new Parameters.PeriodicParameters(); //// A link Configuration parameter to subscribe periodic thresholds //LINK_SAP_CSHARP.Events.EventClasses.Link_Cfg_Param aLinkCfg = new LINK_SAP_CSHARP.Events.EventClasses.Link_Cfg_Param(); //// Param Type //aLinkCfg.Link_Param_Type = LINK_SAP_CSHARP.Events.EventClasses.Link_Param_Types.LINK_PARAM_GEN; //// Param Subtype 0=DataRate, 1=SignalStrength, etc //aLinkCfg.Link_Param_SubType = (int)LINK_SAP_CSHARP.Events.EventClasses.LINK_PARAM_GEN_SUBTYPES.DataRate; //// Timer Interval in miliseconds //aLinkCfg.Timer_Interval = 2000; //// Threshold Action (One-Shot, normal, etc) //aLinkCfg.Th_Action = LINK_SAP_CSHARP.Events.EventClasses.TH_Action.NORMAL_THRESHOLD; //// Threshold EventList, can be null //aLinkCfg.ThresholdList = null; //// The registration of the link configuration parameter //periodicParams.RegisterLinkCfgParam(aLinkCfg); //LINK_SAP_CSHARP.Events.EventClasses.Link_Cfg_Param anotherLinkCfg = new LINK_SAP_CSHARP.Events.EventClasses.Link_Cfg_Param(LINK_SAP_CSHARP.Events.EventClasses.Link_Param_Types.LINK_PARAM_GEN, // 1, 500, LINK_SAP_CSHARP.Events.EventClasses.TH_Action.NORMAL_THRESHOLD, null); //periodicParams.RegisterLinkCfgParam(anotherLinkCfg); //aLinkCfg.Th_Action = LINK_SAP_CSHARP.Events.EventClasses.TH_Action.CANCEL_THRESHOLD; //periodicParams.RegisterLinkCfgParam(aLinkCfg); //////////////////// //Parameters.ParametersHandler ph = new Parameters.ParametersHandler(); //List<Link_Cfg_Param> EventList = new List<Link_Cfg_Param>(); //Link_Cfg_Param lcp = new Link_Cfg_Param(); //lcp.Link_Param_Type = (int)Link_Param_Type.LINK_PARAM_GEN; //lcp.Link_Param_SubType = (int)LINK_PARAM_GEN_SUBTYPES.DataRate; //lcp.Timer_Interval = 0; //lcp.ThresholdList = new List<Threshold>(); //lcp.ThresholdList.Add(new Threshold(54000000,Threshold_X_Dir.BELOW_THRESHOLD)); //lcp.ThresholdList.Add(new Threshold(20000000, Threshold_X_Dir.ABOVE_THRESHOLD)); //EventList.Add(lcp); //ph.linkConfigureThresholds(EventList); #endregion #region Actions Testing //Actions.ActionsHandler ah = new Actions.ActionsHandler(); //LINK_SAP_CSHARP.Actions.ActionClasses.Link_Action_Request larPowerDown = new LINK_SAP_CSHARP.Actions.ActionClasses.Link_Action_Request(); //larPowerDown.ExecutionDelay = 0; //larPowerDown.LinkAction = LINK_SAP_CSHARP.Actions.ActionClasses.Actions.LINK_POWER_DOWN; //ah.registerLinkActionRequest(larPowerDown); //LINK_SAP_CSHARP.Actions.ActionClasses.Link_Action_Request larPowerUp = new LINK_SAP_CSHARP.Actions.ActionClasses.Link_Action_Request(); //larPowerUp.ExecutionDelay = 2000; //larPowerUp.LinkAction = LINK_SAP_CSHARP.Actions.ActionClasses.Actions.LINK_POWER_UP; //ah.registerLinkActionRequest(larPowerUp); //LINK_SAP_CSHARP.Actions.ActionClasses.Link_Action_Request larDisconnect = new LINK_SAP_CSHARP.Actions.ActionClasses.Link_Action_Request(); //larDisconnect.ExecutionDelay = 2000; //larDisconnect.LinkAction = LINK_SAP_CSHARP.Actions.ActionClasses.Actions.LINK_DISCONNECT; //ah.registerLinkActionRequest(larDisconnect); #endregion #region Events Testing //EventsHandler eh = new EventsHandler(); //Link_Event_Subscribe_Request lesr = new Link_Event_Subscribe_Request(); //bool[] linkEventListInBool = new bool[32] //{ // false, //Link_Detected // true, //Link_Up // true, //Link_Down // false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false }; //lesr.LinkEventList = new BitArray(linkEventListInBool); //eh.registerSubscriptionRequest(lesr); #endregion #endregion }
public ParametersHandler() { oneShotParameters = new OneShotParameters(); periodicParameters = new PeriodicParameters(); }