public void run()
	{
		while (!isInterrupted())
		{
//			System.out.println(parentDevice.getDeviceName() + " port" + getIndex() + " send cycle start");
			if (!sendQueue.isEmpty())
			{
				if (oppo != null)
				{
					oppo.ReceiveFrame(sendQueue.poll());
					System.out.println("Frame sent from " + parentDevice.getDeviceName() + " port" + getIndex() + " to " + oppo.getParent().getDeviceName() + " port" + oppo.getIndex());
				}
				else
				{
					sendQueue.poll();
//					System.out.println("Opposite port is null");
				}
			}
			
//			System.out.println(parentDevice.getDeviceName() + " port" + getIndex() + " send cycle over, receive cycle start");
			Frame f = null; 
			if (!recvQueue.isEmpty())
			{
				try {
					f = recvQueue.take();
					System.out.println(parentDevice.getDeviceName() + " port" + getIndex() + " receive queue not empty");
				} catch (InterruptedException e) {}
				if (f != null)
				{
					if (!f.getDestMAC().equals(macAdd))
					{
						//the frame is not for this
						frameIsNotForThis(f);
					}
					else
					{
						//the frame is for this
						frameIsForThis(f);
					}	
				}
			}
//			System.out.println(parentDevice.getDeviceName() + " port" + getIndex() + " receive cycle over");
			try {
				sleep(0, sleepTime());
			} catch (InterruptedException e) {}
		}
	}