VmPacket

public class VmPacket implements NetworkPacket<Vm>

Represents a packet that travels from a Vm to another, through the virtual network within a Host. It contains information about Cloudlets which are communicating.

Please refer to following publication for more details:

Author:Saurabh Kumar Garg, Manoel Campos da Silva Filho

Constructors

VmPacket

public VmPacket(Vm sourceVm, Vm destinationVm, long size, Cloudlet senderCloudlet, Cloudlet receiverCloudlet)

Creates a packet to be sent to to a VM inside the Host of the sender VM.

Parameters:
  • sourceVm – id of the VM sending the packet
  • destinationVm – id of the VM that has to receive the packet
  • size – data length of the packet in bytes
  • senderCloudlet – cloudlet sending the packet
  • receiverCloudlet – cloudlet that has to receive the packet

Methods

getDestination

public Vm getDestination()

Gets the id of the VM that has to receive the packet. This is the VM where th receiver cloudlet is running.

getReceiveTime

public double getReceiveTime()

getReceiverCloudlet

public Cloudlet getReceiverCloudlet()

Gets the cloudlet that has to receive the packet.

getSendTime

public double getSendTime()

getSenderCloudlet

public Cloudlet getSenderCloudlet()

Gets the cloudlet sending the packet.

getSize

public long getSize()

getSource

public Vm getSource()

Gets the VM sending the packet. This is the VM where the sending cloudlet is running.

setDestination

public void setDestination(Vm destinationVmId)

Sets the id of the VM that has to receive the packet. This is the VM where th receiver cloudlet is running.

Parameters:
  • destinationVmId – the destination VM id to set

setReceiveTime

public void setReceiveTime(double receiveTime)

setSendTime

public void setSendTime(double sendTime)

setSource

public void setSource(Vm sourceVmId)

Sets the id of the VM sending the packet. This is the VM where the sending cloudlet is running.

Parameters:
  • sourceVmId – the source VM id to set