edu.colorado.cs.ns2.agents
Class TCPRenoAgent

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

public class TCPRenoAgent
extends Agent

This is the implementation of the TCPRenoAgent.

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

Field Summary
private  int class_
          NS2's TCPReno class_ TCL variaible.
private  int fid_
          NS2's TCPReno fid_ (flow identifier) TCL variaible.
private static long serialVersionUID
          Generated serial version UID.
 
Fields inherited from class edu.colorado.cs.ns2.agents.Agent
acceptableConnectAgents, agentId, agentName, applications, isConnected, nodeId, variableName
 
Constructor Summary
TCPRenoAgent(int nextId, int NodeId)
          Constructor.
 
Method Summary
 java.lang.String addAgentToScript(java.lang.String agentVariableName, int nodeId)
          Returns a String containing the TCL code for the instantiation of a TCPReno object.
 int getClass_()
          Returns the value of the TCL class_ variable.
 int getFid_()
          Returns the flow identifier.
private  void setAcceptableAgents()
          Sets the list of acceptable agents to which this agent can be connected.
 void setAgentProperties()
          Sets the Agent's properties.
 void setClass_(int class_)
          Sets the value of the TCL class_ variable.
 void setFid_(int fid_)
          Sets the flow identifier.
 java.lang.String toString()
          Returns a String representation of this object.
 java.lang.String writeAgentProperties()
          Returns a TCP representation of the Agent's properties.
 
Methods inherited from class edu.colorado.cs.ns2.agents.Agent
addAgentToScript, canConnectToAgent, canHaveMultipleConnections, getAgentId, getAgentName, getApplications, getApplicationsElementAt, getNodeId, getVariableName, isConnected, removeApplicationsElement, removeApplicationsElementAt, setAgentId, setApplications, setConnected
 
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

class_

private int class_
NS2's TCPReno class_ TCL variaible.


fid_

private int fid_
NS2's TCPReno fid_ (flow identifier) TCL variaible.

Constructor Detail

TCPRenoAgent

public TCPRenoAgent(int nextId,
                    int NodeId)
Constructor.

Parameters:
nextId - The next available globally unique identifier.
NodeId - The node id on which this agent resides.
Method Detail

setAcceptableAgents

private void setAcceptableAgents()
Sets the list of acceptable agents to which this agent can be connected.


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.

getClass_

public int getClass_()
Returns the value of the TCL class_ variable.

Returns:
The value of the TCL class_ variable.

setClass_

public void setClass_(int class_)
Sets the value of the TCL class_ variable.

Parameters:
class_ - A new class value.

getFid_

public int getFid_()
Returns the flow identifier.

Returns:
The flow identifier.

setFid_

public void setFid_(int fid_)
Sets the flow identifier.

Parameters:
fid_ - A new flow identifier.

addAgentToScript

public java.lang.String addAgentToScript(java.lang.String agentVariableName,
                                         int nodeId)
Returns a String containing the TCL code for the instantiation of a TCPReno object.

Parameters:
agentVariableName - The agent's TCL variable name.
nodeId - The node identifier on which the TCPReno Agent resides.
Returns:

setAgentProperties

public void setAgentProperties()
Sets the Agent's properties.

Specified by:
setAgentProperties in class Agent

writeAgentProperties

public java.lang.String writeAgentProperties()
Description copied from class: Agent
Returns a TCP representation of the Agent's properties.

Specified by:
writeAgentProperties in class Agent
Returns:
Returns a TCP representation of the Agent's properties.