edu.colorado.cs.ns2.agents
Class ParetoAgent

java.lang.Object
  extended by edu.colorado.cs.ns2.agents.Application
      extended by edu.colorado.cs.ns2.agents.ParetoAgent
All Implemented Interfaces:
java.io.Serializable

public class ParetoAgent
extends Application

This is the implemenation of NS2's Pareto traffic generator for UDP.

Author:
Kevin Bauer, Pushkar Sambhoos
See Also:
Serialized Form

Nested Class Summary
 class ParetoAgent.ParetoPropertiesDialog
          This nested class allows the user to specify the Pareto traffic generator's properties.
 
Field Summary
private  double burstTime_
          TCL burstTime_ variable.
private  double idleTime_
          TCL idleTime_ variable.
private  double rate_
          TCL rate_ variabile.
private static long serialVersionUID
          Generated serial version uid.
private  double shape_
          TCL shape_ variable.
private  java.lang.String type_
          TCL type_ variable.
 
Fields inherited from class edu.colorado.cs.ns2.agents.Application
acceptableConnectAgents, agentId, applicationId, applicationName, nodeId, startEventScheduled, stopEventScheduled, variableName
 
Constructor Summary
ParetoAgent(int nextId, int nodeId, int agentId)
          Default Constructor
 
Method Summary
 java.lang.String addApplicationToScript(NsNode node, int agentElement)
          Returns the String to be Written for the CBR Application
 double getBurstTime_()
          Returns the value of the TCL burstTime_ variable.
 double getIdleTime_()
          Returns the value of the idleTime_ TCL variable.
 double getRate_()
          Returns the value of the TCL rate_ variable.
 double getShape_()
          Returns the value of the TCL shape_ variable.
 java.lang.String getType_()
          Returns the value of the type_ TCL variaible.
protected  void setAcceptableConnectAgents()
          Sets the list of acceptable agents on which this Application can reside.
 void setBurstTime_(double burstTime_)
          Sets the value of the TCL burstTime_ variable.
 void setIdleTime_(double idleTime_)
          Sets the value of the idleTime_ TCL variable.
 void setProperties()
          Sets the properties for this application.
 void setRate_(double rate_)
          Sets the value of the TCL rate_ variable.
 void setShape_(double shape_)
          Sets the value of the TCL shape_ variable.
 void setType_(java.lang.String type_)
          Sets the value of the type_ TCL variable.
 java.lang.String toString()
          Returns a String representation of this object.
 
Methods inherited from class edu.colorado.cs.ns2.agents.Application
getAcceptableAgents, getAgentId, getApplicatinName, getApplicationId, getApplicationName, getNodeId, getVariableName, isStartEventScheduled, isStopEventScheduled, setAgentId, setApplicatioName, setApplicationId, setApplicationName, setNodeId, setStartEventScheduled, setStopEventScheduled, setVariableName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Generated serial version uid.

See Also:
Constant Field Values

type_

private java.lang.String type_
TCL type_ variable.


rate_

private double rate_
TCL rate_ variabile.


burstTime_

private double burstTime_
TCL burstTime_ variable.


idleTime_

private double idleTime_
TCL idleTime_ variable.


shape_

private double shape_
TCL shape_ variable.

Constructor Detail

ParetoAgent

public ParetoAgent(int nextId,
                   int nodeId,
                   int agentId)
Default Constructor

Parameters:
nextId - Agent / Application id - Globally Incremented.
nodeId - Associates with this Node.
agentId - The identifier of the Agent on which this traffic generator resides.
Method Detail

getShape_

public double getShape_()
Returns the value of the TCL shape_ variable.

Returns:
The value of the TCL shape_ variable.

setShape_

public void setShape_(double shape_)
Sets the value of the TCL shape_ variable.

Parameters:
shape_ - A new shape value.

getBurstTime_

public double getBurstTime_()
Returns the value of the TCL burstTime_ variable.

Returns:
The value of the TCL burstTime_ variable.

setBurstTime_

public void setBurstTime_(double burstTime_)
Sets the value of the TCL burstTime_ variable.

Parameters:
burstTime_ - A new burst time value.

getIdleTime_

public double getIdleTime_()
Returns the value of the idleTime_ TCL variable.

Returns:
The value of the idelTime_ TCL variable.

setIdleTime_

public void setIdleTime_(double idleTime_)
Sets the value of the idleTime_ TCL variable.

Parameters:
idleTime_ - A new idle time value.

setAcceptableConnectAgents

protected void setAcceptableConnectAgents()
Sets the list of acceptable agents on which this Application can reside.

Specified by:
setAcceptableConnectAgents in class Application

addApplicationToScript

public java.lang.String addApplicationToScript(NsNode node,
                                               int agentElement)
Returns the String to be Written for the CBR Application

Specified by:
addApplicationToScript in class Application
Parameters:
node - The Node to Attach Application To
agentElement - Index of Agent to which Application is to be attached.
Returns:
String to be written to Script.

getRate_

public double getRate_()
Returns the value of the TCL rate_ variable.

Returns:
The value of the TCL rate_ variable.

setRate_

public void setRate_(double rate_)
Sets the value of the TCL rate_ variable.

Parameters:
rate_ - A new rate value.

getType_

public java.lang.String getType_()
Returns the value of the type_ TCL variaible.

Returns:
The value of the type_ TCL variable.

setType_

public void setType_(java.lang.String type_)
Sets the value of the type_ TCL variable.

Parameters:
type_ - A new type value.

toString

public java.lang.String toString()
Returns a String representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
A String representation of this object.

setProperties

public void setProperties()
Sets the properties for this application.

Specified by:
setProperties in class Application