HostPacket

public class HostPacket implements NetworkPacket<NetworkHost>

Represents a packet which travels from one Host to another. Each packet contains: IDs of the sender VM into the source Host and receiver VM into the destination Host which are communicating; the time at which it is sent and received; type and virtual IDs of tasks.

Please refer to following publication for more details:

Author:Saurabh Kumar Garg, Manoel Campos da Silva Filho

Constructors

HostPacket

public HostPacket(NetworkHost senderHost, VmPacket vmPacket)

Creates a new packet to be sent through the network between two hosts.

Parameters:
  • senderHost – The id of the host sending the packet
  • vmPacket – The vm packet containing information of sender and receiver Cloudlets and their VMs.

Methods

getDestination

public NetworkHost getDestination()

Gets the ID of the Host that the packet is going to.

getReceiveTime

public double getReceiveTime()

getSendTime

public double getSendTime()

getSize

public long getSize()

getSource

public NetworkHost getSource()

Gets the ID of the Host that this packet is coming from (the sender).

getVmPacket

public VmPacket getVmPacket()

setDestination

public void setDestination(NetworkHost receiverHost)

Sets the ID of the Host that the packet is going to.

Parameters:
  • receiverHost – the receiver Host id to set

setReceiveTime

public void setReceiveTime(double receiveTime)

setSendTime

public void setSendTime(double sendTime)

setSource

public void setSource(NetworkHost senderHost)

Sets the ID of the Host that this packet is coming from (the sender).

Parameters:
  • senderHost – the source Host id to set