|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--SSF.OS.ProtocolSession
|
+--gov.nist.antd.merlin.protocol.sample.SimpleProtocol
This class implements a protocol that sends a message to an other node (for test only).
This class was developed at the National Institute of Standards and Technology by employees of the Federal Government in the course of their official duties. Pursuant to title 17 Section 105 of the United States Code this software is not subject to copyright protection and is in the public domain. NIST assumes no responsibility whatsoever for its use by other parties, and makes no guarantees, expressed or implied, about its quality, reliability, or any other characteristic.
We would appreciate acknowledgement if the software is used.
NIST ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION AND DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
| Field Summary | |
private double |
bandwidth
The bandwidth for the connection request (default = 2.5 Gig). |
private double |
delay
The delay between retransmission. |
private int |
destination
Destination of the message. |
private OpticalConnection |
route
The current optical route used. |
private java.lang.String |
routingAlgo
The name of the routing algorithm (default = ShortestPathDistance). |
private boolean |
send
Define if we should send or not. |
private java.lang.String |
wavelengthAlgo
The name of the wavelength assignment algorithm (default = BestFit). |
| Fields inherited from class SSF.OS.ProtocolSession |
name, use |
| Constructor Summary | |
SimpleProtocol()
Default constructor. |
|
| Method Summary | |
void |
config(com.renesys.raceway.DML.Configuration cfg)
Configuration |
double |
getBandwidth()
Get the requested bandwidth |
double |
getDelay()
Get the delay between two transmissions |
int |
getDestination()
Return the destination ID |
java.lang.String |
getRoutingAlgorithm()
Return the name of the routing algorithm to be used |
java.lang.String |
getWavelengthAlgorithm()
Return the name of the wavelength algorithm to be used |
void |
go()
Function called after the timer is out |
void |
init()
Initialization routine, called by the ProtocolGraph after instantiation. |
boolean |
push(ProtocolMessage message,
ProtocolSession fromSession)
Print the message received. |
boolean |
send(java.lang.String message)
send the message. |
void |
setBandwidth(double bandwidth)
Set the bandwidth requested |
void |
setDelay(double delay)
Set the delay between two transmissions |
void |
setDestination(int id)
Set the destination node |
void |
setRoutingAlgorithm(java.lang.String name)
Set the routing algorithm |
void |
setWavelengthAlgorithm(java.lang.String name)
Set the wavelength algorithm |
java.lang.String |
toDML()
This method generates the DML configuration for the options of this class. |
| Methods inherited from class SSF.OS.ProtocolSession |
close, closed, debugIdentifier, inGraph, open, opened, pushAfterDelay, pushAfterDelayFailed, setGraph, version |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private java.lang.String routingAlgo
private java.lang.String wavelengthAlgo
private double bandwidth
private int destination
private boolean send
private OpticalConnection route
private double delay
| Constructor Detail |
public SimpleProtocol()
| Method Detail |
public void config(com.renesys.raceway.DML.Configuration cfg)
throws com.renesys.raceway.DML.configException
config in interface com.renesys.raceway.DML.Configurableconfig in class ProtocolSessioncfg - The DML configuration
if - a configuration error occurs
com.renesys.raceway.DML.configException
public void init()
throws ProtocolException
init in class ProtocolSessionProtocolExceptionpublic void go()
public boolean send(java.lang.String message)
message - The message to be sent.
public boolean push(ProtocolMessage message,
ProtocolSession fromSession)
throws ProtocolException
push in class ProtocolSessionmessage - The message received.fromSession - The protocol session which sent the message.
ProtocolException - If a protocol session exception occurs.public void setDestination(int id)
id - The destination node IDpublic int getDestination()
public void setBandwidth(double bandwidth)
bandwidth - The requested bandwidthpublic double getBandwidth()
public void setRoutingAlgorithm(java.lang.String name)
name - The name of the routing algorithm to be usedpublic java.lang.String getRoutingAlgorithm()
public void setWavelengthAlgorithm(java.lang.String name)
name - The name of the wavelength algorithm to be usedpublic java.lang.String getWavelengthAlgorithm()
public void setDelay(double delay)
delay - The delay between two transmissionspublic double getDelay()
public java.lang.String toDML()
toDML in interface DMLDump
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||