GridSim 5.0 beta

gridsim.net.fnb
Class source_pktNum

Object
  extended by source_pktNum

public class source_pktNum
extends Object

This class is used by the FnbInput entity, to make sure that all Gridlet packets arrive at the destination.

Since:
GridSim Toolkit 4.2
Author:
Agustin Caminero
See Also:
FnbInput

Constructor Summary
source_pktNum(int sourceID, int gridletID)
          Creates an object of this class.
 
Method Summary
 void addNumOfArrivedPkts()
          Adds the number of received packets by 1.
 int getGridletID()
          Gets the gridlet id
 int getNumOfPacket()
          Gets the number of packets already received
 int getSourceID()
          Gets the source ID of the gridlet
 boolean getStatus()
          Checks if the gridlet packets have arrived properly or not.
 void setGridletID(int gridletID)
          Sets the gridlet id
 void setNumOfPacket(int num)
          Sets the number of packets
 void setSourceID(int sourceID)
          Sets the source ID
 void setStatus(boolean status)
          Sets the status of the incoming gridlet packets.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

source_pktNum

public source_pktNum(int sourceID,
                     int gridletID)
Creates an object of this class.

Parameters:
sourceID - the source ID
gridletID - the gridlet ID that this packet belongs to
Method Detail

getSourceID

public int getSourceID()
Gets the source ID of the gridlet

Returns:
source ID of the gridlet

getNumOfPacket

public int getNumOfPacket()
Gets the number of packets already received

Returns:
number of packets already received

getStatus

public boolean getStatus()
Checks if the gridlet packets have arrived properly or not.

Returns:
true if all the packets of a gridlet have arrived properly, false otherwise.

setSourceID

public void setSourceID(int sourceID)
Sets the source ID

Parameters:
sourceID - the source ID of this gridlet

setStatus

public void setStatus(boolean status)
Sets the status of the incoming gridlet packets.

Parameters:
status - true if all the packets of a gridlet have arrived properly, false otherwise.

setNumOfPacket

public void setNumOfPacket(int num)
Sets the number of packets

Parameters:
num - the number of packets of a gridlet

setGridletID

public void setGridletID(int gridletID)
Sets the gridlet id

Parameters:
gridletID - gridlet id

getGridletID

public int getGridletID()
Gets the gridlet id

Returns:
gridlet id

addNumOfArrivedPkts

public void addNumOfArrivedPkts()
Adds the number of received packets by 1.


GridSim 5.0 beta

The University of Melbourne, Australia, 2009