예제 #1
0
        public bool Collide(SlotWindow other)
        {
            if (FirstSlot >= other.FirstSlot && FirstSlot < other.FirstSlot + other.NumberofSlots)
            {
                return(true);
            }

            if (other.FirstSlot >= FirstSlot && other.FirstSlot < FirstSlot + NumberofSlots)
            {
                return(true);
            }

            return(false);
        }
예제 #2
0
        public MyPacket(string Payload, int port, string destinationIP, string sourceIP, SlotWindow inSlot)
        {
            this.Payload            = Payload;
            this.Port               = port;
            this.SourceAddress      = IPAddress.Parse(sourceIP);
            this.DestinationAddress = IPAddress.Parse(destinationIP);
            //0 + 193 000 GHz...
            this.Frequency = 122;
            this.ID        = 111;
            //12.5GHz
            this.Bandwith = 3;

            //predkosc bitowa, z jaka leci pakiet n*12.5Gb/s
            this.BitRate = 4;

            //Jeden symbol koduje 1 bit
            this.Performance = 5;

            this.slotWindow = inSlot;
        }
예제 #3
0
 public RouterMapRecord(SlotWindow slot, int destID )
 {
     slotWindow = slot;
     DestinationID = destID;
 }