|
From: <sul...@us...> - 2008-10-06 08:08:17
|
Revision: 251
http://gridsim.svn.sourceforge.net/gridsim/?rev=251&view=rev
Author: sulistio
Date: 2008-10-06 08:08:03 +0000 (Mon, 06 Oct 2008)
Log Message:
-----------
fix few javadoc issues.
Modified Paths:
--------------
trunk/source/gridsim/net/fnb/FnbInput.java
trunk/source/gridsim/net/fnb/FnbNetworkReader.java
trunk/source/gridsim/net/fnb/FnbOutput.java
Modified: trunk/source/gridsim/net/fnb/FnbInput.java
===================================================================
--- trunk/source/gridsim/net/fnb/FnbInput.java 2008-09-29 10:31:58 UTC (rev 250)
+++ trunk/source/gridsim/net/fnb/FnbInput.java 2008-10-06 08:08:03 UTC (rev 251)
@@ -8,6 +8,12 @@
* Organization: Universidad de Castilla La Mancha (UCLM), Spain.
* Copyright (c) 2008, The University of Melbourne, Australia and
* Universidad de Castilla La Mancha (UCLM), Spain
+ *
+ * This class is based on Input class, by Manzur Murshed and Rajkumar Buyya.
+ * Things added or modifyed:
+ * - getDataFromLink(...)
+ * - source_PktNum_array
+ * - FnbNetPacket instead of NetPacket
*/
package gridsim.net.fnb;
@@ -21,26 +27,22 @@
import gridsim.util.TrafficGenerator;
/**
- * GridSim FnbInput class defines a port through which a simulation entity
- * receives data from the simulated network.
+ * Thiss class defines a port through which a simulation entity
+ * receives data from the simulated network. Note that this class is based on
+ * {@link gridsim.net.Input} class.
* <p>
* It maintains an event queue
* to serialize the data-in-flow and delivers to its parent entity.
- * It accepts messages that comes from GridSim entities 'FnbOutput' entity
+ * It accepts messages that comes from GridSim entities
+ * {@link gridsim.net.fnb.FnbOutput} entity
* and passes the same to the GridSim entity.
* It simulates Network communication delay depending on Baud rate
* and data length. Simultaneous inputs can be modeled using multiple
* instances of this class.
*
- * @author Agustin Caminero, Universidad de Castilla La Mancha (Spain).
- * Based on Input class, by Manzur Murshed and Rajkumar Buyya.
+ * @author Agustin Caminero, Universidad de Castilla La Mancha (Spain).
* @since GridSim Toolkit 4.2
- *
- * Things added or modifyed:
- * - getDataFromLink(...)
- * - source_PktNum_array
- * - FnbNetPacket instead of NetPacket
- *
+ * @see gridsim.net.Input
*/
public class FnbInput extends Sim_entity implements NetIO
{
@@ -88,20 +90,9 @@
/**
* Gets the baud rate
* @return the baud rate
- * @deprecated As of GridSim 2.1, replaced by {@link #getBaudRate()}
* @pre $none
* @post $result >= 0.0
*/
- public double GetBaudRate() {
- return this.getBaudRate();
- }
-
- /**
- * Gets the baud rate
- * @return the baud rate
- * @pre $none
- * @post $result >= 0.0
- */
public double getBaudRate() {
return baudRate_;
}
@@ -110,21 +101,9 @@
* Gets the I/O real number based on a given value
* @param value the specified value
* @return real number
- * @deprecated As of GridSim 2.1, replaced by {@link #realIO(double)}
* @pre value >= 0.0
* @post $result >= 0.0
*/
- public double real_io(double value) {
- return this.realIO(value);
- }
-
- /**
- * Gets the I/O real number based on a given value
- * @param value the specified value
- * @return real number
- * @pre value >= 0.0
- * @post $result >= 0.0
- */
public double realIO(double value) {
return GridSimRandom.realIO(value);
}
@@ -320,14 +299,15 @@
int src_outputPort = ((FnbNetPacket) np).getSrcID();
//String src_outputPort_str = GridSim.getEntityName(src_outputPort);
- /*
+ /********
// Uncomment this for more info on the progress of sims
if (name.compareTo("Input_SIM_0_Res_0") == 0)
System.out.println(super.get_name() +
": packet arrived to the res" +
". Pkt num: " +
((FnbNetPacket) np).getPacketNum() +
- " from " + src_outputPort_str);*/
+ " from " + src_outputPort_str);
+ ***********/
//int pktID = ((FnbNetPacket) np).getID();
//int PrevPktNum; // The pkt Num of the previous packet
@@ -394,8 +374,6 @@
// convert the packets into IO_data
Object data = np.getData();
-
-
IO_data io = new IO_data(data, np.getSize(),
inPort_.get_dest());
@@ -412,6 +390,7 @@
" from " + src_outputPort_str +
"\n");*/
+ /*********** // NOTE: redundant
name = super.get_name();
if (name.indexOf("Input_SIM_0_Res_5") != -1)
{
@@ -419,13 +398,14 @@
"Data (maybe a gridlet) arrived at the Resource\n",
super.get_name());
- /*System.out.println("\n*********" +
+ System.out.println("\n*********" +
super.get_name() +
": Data (maybe a gridlet) arrived at the Resource. Pkt num: " +
((FnbNetPacket) np).getPacketNum() +
" from " + src_outputPort_str +
- "\n");*/
+ "\n");
}
+ ***********************/
} // if (srcPktNum.getOk() == true)
Modified: trunk/source/gridsim/net/fnb/FnbNetworkReader.java
===================================================================
--- trunk/source/gridsim/net/fnb/FnbNetworkReader.java 2008-09-29 10:31:58 UTC (rev 250)
+++ trunk/source/gridsim/net/fnb/FnbNetworkReader.java 2008-10-06 08:08:03 UTC (rev 251)
@@ -110,7 +110,7 @@
* Gets a {@link gridsim.net.Router} object from the list
* @param name a router name
* @param routerList a list containing the finiteBufferRouter objects
- * @return a {@link gridsim.net.fnb.FnbRouter} object or
+ * @return a {@link gridsim.net.Router} object or
* <tt>null</tt> if not found
*/
public static Router getRouter(String name, LinkedList routerList)
Modified: trunk/source/gridsim/net/fnb/FnbOutput.java
===================================================================
--- trunk/source/gridsim/net/fnb/FnbOutput.java 2008-09-29 10:31:58 UTC (rev 250)
+++ trunk/source/gridsim/net/fnb/FnbOutput.java 2008-10-06 08:08:03 UTC (rev 251)
@@ -29,8 +29,9 @@
/**
- * GridSim FnbOutput defines a port through which a simulation entity sends
- * data to the simulated network.
+ * This class defines a port through which a simulation entity sends
+ * data to the simulated network. Note that this class is based on
+ * {@link gridsim.net.Output} class.
* <p>
* It maintains an event queue to serialize
* the data-out-flow and delivers to the destination entity.
@@ -242,21 +243,9 @@
/**
* Gets the baud rate
* @return the baud rate
- * @deprecated As of GridSim 2.1, replaced by {@link #getBaudRate()}
* @pre $none
* @post $result >= 0.0
*/
- public double GetBaudRate()
- {
- return this.getBaudRate();
- }
-
- /**
- * Gets the baud rate
- * @return the baud rate
- * @pre $none
- * @post $result >= 0.0
- */
public double getBaudRate()
{
return baudRate_;
@@ -266,22 +255,9 @@
* Gets the I/O real number based on a given value
* @param value the specified value
* @return real number
- * @deprecated As of GridSim 2.1, replaced by {@link #realIO(double)}
* @pre $none
* @post $result >= 0.0
*/
- public double real_io(double value)
- {
- return this.realIO(value);
- }
-
- /**
- * Gets the I/O real number based on a given value
- * @param value the specified value
- * @return real number
- * @pre $none
- * @post $result >= 0.0
- */
public double realIO(double value)
{
return GridSimRandom.realIO(value);
@@ -354,7 +330,7 @@
* What we do is just set the gridlet as failed. We do not resubmit the gridlet.
* @param ev an incoming event
* */
- public void processPacketDropped(Sim_event ev)
+ private void processPacketDropped(Sim_event ev)
{
FnbDroppedUserPacket userPkt = (FnbDroppedUserPacket) ev.get_data();
int pkt_dropped_id = userPkt.getID();
@@ -731,10 +707,11 @@
pktID_++; // increments packet ID
}
- /**Returns the my_id of the file.
+ /** Returns my_id of the file.
* @param fname the name of the file
- * @return the my_id of the file*/
- int checkFilename(String fname)
+ * @return my_id of the file
+ */
+ private int checkFilename(String fname)
{
FileName_FileMyID fname_fid;
int last_fileID = 0;
@@ -758,10 +735,11 @@
return last_fileID + 1;
}
- /**Returns the file name of the file with the given my_id
+ /** Returns the file name of the file with the given my_id
* @param fileID the id of the file
- * @return the name of the file*/
- String getFilename(int fileID)
+ * @return the name of the file
+ */
+ private String getFilename(int fileID)
{
FileName_FileMyID fname_fid;
int last_fileID = 0;
@@ -1036,20 +1014,20 @@
}
}
- /**This functions returns the packetsGridletsList_. This is used by the user
+ /** This functions returns the packetsGridletsList_. This is used by the user
* to know which gridlet a packet belongs to.
* @return the packetsGridletsList_ of this output entity
- * */
- ArrayList getPacketsGridletsList()
+ */
+ private ArrayList getPacketsGridletsList()
{
return packetsGridletsList_;
}
- /**This function returns the entity (gridlet/file) to which a packet belongs
+ /** This function returns the entity (gridlet/file) to which a packet belongs
* @param pktID the ID of the packet of interest
* @return a FnbMessage object
- * */
- FnbMessage lookForEntity(int pktID)
+ */
+ private FnbMessage lookForEntity(int pktID)
{
FnbMessage msgDrop = null; // = new FnbMessage(9999, false);
for (int i = 0; i < packetsGridletsList_.size(); i++)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|