| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.colorado.cs.ns2.agents.Application
edu.colorado.cs.ns2.agents.CBRAgent
public class CBRAgent
Class for Representing Constant Bit Rate Application on top of a UDP Agent.
| Nested Class Summary | |
|---|---|
 class | 
CBRAgent.CBRPropertiesDialog
This nested class is responsible for creating a dialog box and retrieving the CBRAgent's properties from the user.  | 
| Field Summary | |
|---|---|
private  int | 
packetSize_
Stores the CBR Agent's TCL packetSize_ field.  | 
private  boolean | 
random_
Stores the CBR Agent's TCL random_ field.  | 
private  double | 
rate_
Stores the CB Agent's TCL rate_ field.  | 
private static long | 
serialVersionUID
Generated serial version UID.  | 
private  java.lang.String | 
type_
Stores the CBR Agent's TCL type_ field.  | 
| Fields inherited from class edu.colorado.cs.ns2.agents.Application | 
|---|
acceptableConnectAgents, agentId, applicationId, applicationName, nodeId, startEventScheduled, stopEventScheduled, variableName | 
| Constructor Summary | |
|---|---|
CBRAgent(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  | 
 int | 
getPacketSize_()
Returns the TCL packetSize_ value.  | 
 double | 
getRate_()
Returns the value of rate_.  | 
 java.lang.String | 
getType_()
Returns the CBR type_ field.  | 
 boolean | 
isRandom_()
Returns True if random_ should be set.  | 
protected  void | 
setAcceptableConnectAgents()
Sets the Vector of acceptable agents on which a CBRAgent may attach.  | 
 void | 
setPacketSize_(int packetSize_)
Sets the TCL packetSize_ variable.  | 
 void | 
setProperties()
Sets the properties for the CBRAgent via a JDialogBox interface  | 
 void | 
setRandom_(boolean random_)
Sets random_ to True or False.  | 
 void | 
setRate_(double rate_)
Sets the CBR rate_ field.  | 
 void | 
setType_(java.lang.String type_)
Sets the CBR type_ field.  | 
 java.lang.String | 
toString()
Returns a String representation of a CBRAgent 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 | 
|---|
private static final long serialVersionUID
private java.lang.String type_
private int packetSize_
private double rate_
private boolean random_
| Constructor Detail | 
|---|
public CBRAgent(int nextId,
                int nodeId,
                int agentId)
nextId - Agent/ Application id - Globally Incremented.nodeId - Associates with this Node.| Method Detail | 
|---|
protected void setAcceptableConnectAgents()
setAcceptableConnectAgents in class Application
public java.lang.String addApplicationToScript(NsNode node,
                                               int agentElement)
addApplicationToScript in class Applicationnode - The Node to Attach Application ToagentElement - Index of Agent to which Application is to be attached.
public int getPacketSize_()
public void setPacketSize_(int packetSize_)
packetSize_ - A new packet size.public boolean isRandom_()
public void setRandom_(boolean random_)
random_ - New value for random_.public double getRate_()
public void setRate_(double rate_)
rate_ - The new rate_ value.public java.lang.String getType_()
public void setType_(java.lang.String type_)
type_ - A new value for type_.public java.lang.String toString()
toString in class java.lang.Objectpublic void setProperties()
setProperties in class Application
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||