edu.colorado.cs.ns2.agents
Class TCPVegasAgent

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

public class TCPVegasAgent
extends Agent

This is the implementation of the TCPVegas Agent.

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

Field Summary
private  int class_
          NS2's TCPVegas class_ TCL variable.
private  int fid_
          NS2's TCPVegas fid_ (flow identifier) TCL variable.
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
TCPVegasAgent(int nextId, int NodeId)
          Constructor.
 
Method Summary
 int getClass_()
          Returns the value of the class_ TCL variable.
 int getFid_()
          Returns the flow identifier.
private  void setAcceptableAgents()
          Sets the list of acceptable agents to which a TCPVegas Agent may connect.
 void setAgentProperties()
          Sets the TCPVegas Agent's properties.
 void setClass_(int class_)
          Sets the value of hte class_ TCL variable.
 void setFid_(int fid_)
          Sets the flow identifier.
 java.lang.String toString()
          Returns a String representation of the current 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 TCPVegas class_ TCL variable.


fid_

private int fid_
NS2's TCPVegas fid_ (flow identifier) TCL variable.

Constructor Detail

TCPVegasAgent

public TCPVegasAgent(int nextId,
                     int NodeId)
Constructor.

Parameters:
nextId - The next available globally unique identifier.
NodeId - The identifier of the node on which this Agent resides.
Method Detail

setAcceptableAgents

private void setAcceptableAgents()
Sets the list of acceptable agents to which a TCPVegas Agent may connect.


toString

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

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

getClass_

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

Returns:
The value of the clasS_ TCL variable.

setClass_

public void setClass_(int class_)
Sets the value of hte class_ TCL 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.

setAgentProperties

public void setAgentProperties()
Sets the TCPVegas 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.