Пример #1
0
        public void addEvent(ref PriorityQueue queue, int eT, int destNodeAdd, double t)
        {
            DVPacket tmpPacket;
            //if((eT == 1)||(eT == 2))
            tmpPacket = prepareDVPacket(destNodeAdd);

            Event tmpEvent = new Event(t, eT, address, destNodeAdd, tmpPacket);
            queue.Enqueue(tmpEvent);
        }
Пример #2
0
 private void debug(Event tmpEvent)
 {
     Console.WriteLine("Time: " + tmpEvent.time);
     Console.WriteLine("Source: " + tmpEvent.sourceIP);
     Console.WriteLine("Destination: " + tmpEvent.destinationIP);
     Console.WriteLine("Type: " + tmpEvent.eventType);
     foreach (KeyValuePair<int, DV> tmp in tmpEvent.packet.getDV())
     {
         Console.WriteLine("\tDestination: " + tmp.Value.destination + "\tCost: " + tmp.Value.cost);
     }
 }
Пример #3
0
 internal void addEvent(ref PriorityQueue queue, int eT, int p, double t, int d)
 {
     Event tmpEvent = new Event(t, eT, address, p, d);
     queue.Enqueue(tmpEvent);
 }