/* / \ * // | \\ * / | \ * | */ public void Initialize(IEventManager eventMgr, INodes nodes, IRandomizer randomizer, ILocation[] field) { this.eventMgr = eventMgr; this.nodes = nodes; this.randomizer = randomizer; if (field is XYDoubleLocation[]) this.field = (XYDoubleLocation[])field; else { isInitialized = false; return; } panelObjsHelper = new PanelObjHelper(panelObjs); this.eventSize = panelObjsHelper.GetDoubleByName("EventSize"); this.eventMeanTime = panelObjsHelper.GetDoubleByName("EventMeanTime"); this.eventFreq = panelObjsHelper.GetDoubleByName("EventFreq"); this.numOccurances = panelObjsHelper.GetIntByName("NumOccurances"); //this.finalEvent = panelObjsHelper.GetBoolByName("FinalEvent"); isInitialized = true; }
public void Initialize(IEventManager eventMgr, INodes nodes, IRandomizer randomizer, ILocation[] field) { panelObjsHelper = new PanelObjHelper(panelObjs); this.eventMgr = eventMgr; this.nodes = nodes; this.randomizer = randomizer; this.field = (XYDoubleLocation[])field; this.endTime = panelObjsHelper.GetDoubleByName("EndTime"); }
/* / \ * // | \\ * / | \ * | */ public void Initialize(IEventManager eventMgr, IPhysicalProcessor physProc, IRandomizerFactory randomizerFactory, IReportObserver reporter) { _eventManager = eventMgr; _physicalProcessor = physProc; _randomizerFactory = randomizerFactory; _reporter = reporter; _isInitialized = true; panelObjsHelper = new PanelObjHelper(panelObjs); _NUM_ID_BYTES = panelObjsHelper.GetIntByName("NUM_ID_BYTES"); _RANDOM_WAIT = panelObjsHelper.GetDoubleByName("RANDOM_WAIT"); _TIMER_ACK = panelObjsHelper.GetDoubleByName("TIMER_ACK"); _TIMER_BUILDTREE = panelObjsHelper.GetDoubleByName("TIMER_BUILDTREE"); _TIMER_HELLO = panelObjsHelper.GetDoubleByName("TIMER_HELLO"); _TIMER_SEARCH = panelObjsHelper.GetDoubleByName("TIMER_SEARCH"); _TIMER_SUBSCRIBE = panelObjsHelper.GetDoubleByName("TIMER_SUBSCRIBE"); _HELLO_SUPPRESS_REPORT = panelObjsHelper.GetBoolByName("CHECK_HELLOSUPPRESS"); _EXPLICIT_COLLISIONS = panelObjsHelper.GetBoolByName("CHECK_EXPLICIT_COLLISIONS"); //_INFO_REPORTS = panelObjsHelper.GetBoolByName("INFO_REPORTS"); _NODE_REPORTS = panelObjsHelper.GetBoolByName("NODE_REPORTS"); _SINK_REPORTS = panelObjsHelper.GetBoolByName("SINK_REPORTS"); }
public void Initialize(INodes nodes, INodeFactory nodeFactory, ILocation[] field, IRandomizerFactory randFactory) { this.nodes = nodes; this.nodeFactory = nodeFactory; this.randFactory = randFactory; if (field is XYDoubleLocation[]) this.field = (XYDoubleLocation[])field; else throw new InvalidCastException("RandomDeployer must take XYDoubleLocation field"); panelObjsHelper = new PanelObjHelper(panelObjs); a = panelObjsHelper.GetIntByName("a"); b = panelObjsHelper.GetDoubleByName("b"); nodeDistance = panelObjsHelper.GetDoubleByName("NodeDistance"); isInitialized = true; }
public void Initialize(INodes nodes, IEventManager eventMgr) { panelObjsHelper = new PanelObjHelper(panelObjs); c = panelObjsHelper.GetDoubleByName("SoundSpeed"); bitrate = panelObjsHelper.GetDoubleByName("Bitrate"); processingDelay = panelObjsHelper.GetDoubleByName("ProcessingDelay"); overheadBytes = panelObjsHelper.GetIntByName("OverheadBytes"); freq = panelObjsHelper.GetDoubleByName("frequency"); transmitPower = panelObjsHelper.GetDoubleByName("transmitPower"); minReceivePower = panelObjsHelper.GetDoubleByName("receivePower"); noiseLevel = panelObjsHelper.GetDoubleByName("noiseLevel"); k = panelObjsHelper.GetDoubleByName("spreadingCoef"); this.nodes = nodes; this.eventMgr = eventMgr; maxRange = getMaxRange(transmitPower, minReceivePower); l2nodes = new L2Nodes(); NodesIterator nodesIterator = new NodesIterator(this.nodes); while (!nodesIterator.IsDone()) l2nodes.AddL2Node(new L2Node(nodesIterator.Next().ID, minReceivePower, noiseLevel)); isInitialized = true; }