コード例 #1
0
        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;
        }
コード例 #2
0
 public L2NodesIterator(L2Nodes l2nodes)
 {
     index = 0;
     this.l2nodes = l2nodes.NodeQueue;
 }