|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.renesys.raceway.SSF.Entity
|
+--SSF.Net.link
|
+--SSF.Net._link
|
+--gov.nist.antd.optical.OpticalLink
The optical link contains a number of Fibers and Lambdas. This link only can
be used with ONICs and OpticalLinkLayer. The default delay of this link is
distance {in km} * 1000 / speed of light in glass {meter / seconds}.
The speed of light in glass is 199,861,638 m/s (vacuumspeed / refractive
index of 1.5).
By specifying the delay in the DML the automatic configuration will be
skipped.
The following DML parameters can be used:
OpticalLink [ idOnly 2 attache statements are allolwed in the optical link!# Must be unique in the net.
attach# The nhi of the firs host and the interface in # brackets. Example attach 4(0) attach # The nhi of the second host and the interface in # brackets. Example attach 3(1) (OPTIONAL inherited from link) distance # Distance in km, affects the delay if no delay # is specified. delay # In seconds. If no delay is specified, it will # be calculated automatically. ber # Bit Error Rate / just as attribute noAmplifiers noRegenerators srlg # The Shared Risk Link Group is a comma separated # list of positive integer values. protection protectionMode cidr # The cidr block address. ip # The ip of the link. tcpdump # Name of the dump output file. Fiber [ # The fiber section can be repeated multiple times ... # If no fiber is specified, 2 unidirectional fibers will be # created, each one has 1 control and 9 data lambdas. Each lambda # has a bandwidth of 2.5 Gbps. ] ] 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.
VERSION CONTROL
-----------------------------------------------------------------------------
Name - YYYY/MM/DD - VERSION - ACTION
borchert - 2001/05/29 - 1.0 - Source created.
borchert - 2001/06/06 - 1.1 - upgrade to ssf 1.2.2 - change of ssf core.
borchert - 2001/09/13 removed deprecated function calls in method
checkConfig()
and getFiber (int hostID, int portID).
borchert - 2001/09/15 removed function getBandwidth.
borchert - 2001/09/19 fixed the configuration bug of bidirectional
fibers.
borchert - 2001/09/27 Added FAILURE and CHANGE event into the method
setFailure.
borchert - 2001/10/26 Add the interface FailureInformation.
borchert - 2001/10/26 - 1.2 - Add failure notification.
rouil - 2002/02/14 - - Complete documentation.
borchert - 2002/03/04 - 1.3 - Moved interface Failureinformation into package
gov.nist.antf.ssf.
borchert - 2002/03/12 - 1.4 - Removed interface FailureInformation. moved it
into the superclass _link.
- Changed the method setFailure. The ONIC
notification is moved in _link nic
notification.
- Removed method isFailure. Moved to _link.
- Removed attribute failure. Moved to _link.
- Attribute id moved to _link.
- Renamed private method notifyONIC to notifyNIC
and changed the visibility modifier to
protected.
rouil - 2002/03/26 - 1.5 - Updated according to SSF 1.4
borchert - 2002/04/25 - Removed obsolete import statements.
rouil - 2002/04/29 - 1.6 - Moved attribute inConfiguration to super class.
Updated call of deprecated methods.
rouil - 2002/06/08 - 1.7 - Removed duplicate call to setID.
rouil - 2002/06/18 - 1.8 - Extended OXCEdgeRouter to ExtRouter
rouil - 2002/07/08 - - Fixed bug in setFailure.
rouil - 2002/07/17 - - Fixed bug by moving the call to the options
before the creation of the OpticalLinkLayer.
rouil - 2002/08/14 - 1.9 - Added getSrlgString for saving
- getDelay() return the delay in seconds and delay()
the delay in ticks.
rouil - 2002/09/25 - 2.0 - Deprecated the methods using ID to identify a
node and created methods using NHI address.
rouil - 2002/10/01 - 2.1 - Updated methods accessing fiber.
rouil - 2002/10/03 - Updated call to isDuplicateNodeId.
borchert - 2002/10/08 - Fix bug in configuration of the delay.
If no delay is specified the delay will be
calculated.
- Removed method notifyNIC. This method violated
the SSF principles.
borchert - 2002/10/15 - Removed unused code and changed toString
method.
klink - 2002/11/04 - fixed bug, autoconfiguration of fiber
borchert - 2002/12/31 - Moved the conifguration of the distance to be
configured before the delay will be calculated.
- Added the DML documentation.
borchert - 2003/01/05 - 2.2 - Reconnected the channels by changing the link
delay.
rouil - 2003/01/05 - 2.3 - Fixed autogeneration of fibers.
Updated reMap method.
| Field Summary | |
private double |
ber
Bit Error Rate of the link. |
private double |
delay
Delay of the link in ticks. |
private double |
delaySecond
The delay of the link is seconds (Default 0.0) |
private double |
distance
Distance between the two connected ONICs. |
private Fiber[] |
fibers
The fibers contained in the link. |
static int |
INITIAL_ARRAY_SIZE
Constant for the fiber array. |
static double |
LIGHTSPEED
Speed of light (m/s) in glass with refractive index of 1.5 |
private int |
noAmplifiers
Number of amplifiers between the ONICs. |
private int |
noFibers
Number of fibers stored in the array. |
private int |
noRegenerators
Number of regenerators between the ONICs. |
private boolean |
protection
Indicates if this link is used as a protection link. |
private int |
protectionMode
The mode of Protection ProtectionMode.NEVER, ProtectionMode.ONLY, or ProtectionMode.SHARED. |
private java.util.Vector |
srlg
This vector contains integers. |
| Fields inherited from class SSF.Net._link |
inConfiguration |
| Fields inherited from class SSF.Net.link |
|
| Fields inherited from class com.renesys.raceway.SSF.Entity |
|
| Constructor Summary | |
OpticalLink(Net net,
java.lang.String use_nhi)
Creates a link with the given nhi. |
|
| Method Summary | |
void |
addFiber(Fiber fiber)
Add a fiber to this link. |
void |
addLambda(Fiber fiber,
Lambda lambda)
Add a lambda to the given fiber of this link. |
void |
addSrlg(int newSrlg)
Set the Shared Risk Link Group for this optical link. |
void |
addSrlg(java.lang.Integer newSrlg)
Set the Shared Risk Link Group for this optical link. |
void |
addSrlg(java.util.Vector newSrlg)
Add the Shared Risk Link Group for this optical link. |
private void |
checkConfig()
Check if the configuration of link, if enough fibers are available to provide bidirectional signaling. |
private void |
checkPair(com.renesys.raceway.DML.Configuration cfg)
Checks the lamda pairs in this link. |
protected void |
clear()
Removes all fibers of the link. |
void |
config(com.renesys.raceway.DML.Configuration cfg)
Configure the OpticalLink. |
protected void |
configFiber(Fiber fiber)
Find the port ID for the new fibers. |
protected void |
configFibers(com.renesys.raceway.DML.Configuration cfg)
Configure the fibers in this link. |
void |
configOptional(com.renesys.raceway.DML.Configuration cfg)
Configure the optional parameters of the OpticalLink. |
long |
delay()
Get the delay of this link in Ticks. |
double |
getAvailableBandwidthFor(int hostID)
Deprecated. Use getAvailableBandwidthFor (String hostNhi) |
double |
getAvailableBandwidthFor(java.lang.String hostNhi)
Determines the maximum available bandwidth for the the sending host. |
double |
getBer()
Return the Bit Error Rate. |
double |
getDelay()
Get the delay of this link in second (to match the setDelay). |
double |
getDistance()
Get the distance between the two ONIC's connected by this link. |
Fiber |
getFiber(int id)
Return the specific fibers of this optical link. |
Fiber |
getFiber(int hostID,
int portID)
Deprecated. Use getFiber (String hostNhi, int portID) |
Fiber |
getFiber(java.lang.String hostNhi,
int portID)
Return the specific fiber that has this port number in this Onic. |
Fiber[] |
getFibers()
Return the fibers which belong to this optical link. |
Lambda[] |
getLambdas(Fiber fiber)
Return the lambdas that belong the fiber. |
double |
getMaxBandwidthFor(int hostID)
Determines the maximum bandwidth for the the sending host. |
int |
getNoAmplifiers()
Return the number of amplifiers on this optical link. |
int |
getNoFibers()
Return the number of fibers which belong to this optical link. |
int |
getNoRegenerators()
Return the number of regenerators on this optical link. |
int |
getProtectionMode()
Returns the protection mode of the link. |
java.util.Vector |
getSrlg()
Return the Shared Risk Link Groups of this optical link. |
java.lang.String |
getSrlgString()
Return the Shared Risk Link Groups of this optical link. |
boolean |
isBidirectional()
Determines if this link is a bidirectional link or not. |
boolean |
isInSrlg(int srlg)
Determines if the link belongs to the given shared risk link group. |
boolean |
isInSrlg(java.lang.Integer srlg)
Determines if the link belongs to the given shared risk link group. |
boolean |
isProtection()
Indicates if the link is used as a protection link. |
protected void |
reMap(ONIC outONIC,
ONIC inONIC)
Reattaches the channels of the given NICs. |
void |
removeFiber(Fiber fiber)
Removes the given fiber from the link. |
void |
removeSrlg(int srlg)
Remove the Shared Risk Link Group for this optical link. |
void |
removeSrlg(java.lang.Integer srlg)
Remove the Shared Risk Link Group for this optical link. |
private void |
sendConfigMessage(com.renesys.raceway.DML.Configuration cfg)
Checks if the Eventhandler has receivers and if so this message will send to them, otherwise not. |
protected void |
sendMessage(short messageType)
Checks if the Eventhandler has receivers and this object is not in the configuration mode, this message will send the specified event. |
void |
setBer(double ber)
Set the Bit Error Rate. |
void |
setDelay(double value)
Get the delay of this link. |
void |
setDistance(double distance)
Set the link's length. |
void |
setFailure(boolean newValue)
Modify the failure attribute. |
void |
setNoAmplifiers(int newNoAmplifiers)
Set the number of amplifiers on this optical link. |
void |
setNoRegenerators(int newNoRegenerators)
Set the number of regenerators on this optical link. |
void |
setProtection(boolean protection)
Set the attribute protection. |
void |
setProtectionMode(int newMode)
Set the protection mode. |
void |
setSRLG(java.util.Vector newSRLG)
Replaces the internal Vector with a clone of the new one. |
java.lang.String |
toString()
Return the informations of the optical link. |
| Methods inherited from class SSF.Net._link |
getAttachedCount, getAttachedCount, getAttachedInterfaces, getAttachedInterfaces, getCidr, getDumpTo, getID, getIp, getIp, getIpaddr, getIpaddr, getLinkLayer, getLinkLayer, getNet, getNhi, getNhi, getNICs, getPrefix, getPrefix, hasMultipleTimeLines, isFailure, isFailure, reMap, setAttachedCount, setAttachedCount, setAttachedInterfaces, setAttachedInterfaces, setCidr, setDumpTo, setFailure, setID, setIp, setIp, setIpaddr, setIpaddr, setLinkLayer, setLinkLayer, setNet, setNhi, setPrefix, setPrefix |
| Methods inherited from class com.renesys.raceway.SSF.Entity |
alignment, alignTo, coalignedEntities, inChannels, init, joinAll, makeIndependent, now, outChannels, pauseAll, playRole, processes, reset, resumeAll, startAll, startAll, startClient, startClient, startServer, wx, Yx |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int INITIAL_ARRAY_SIZE
public static final double LIGHTSPEED
private double ber
private double delay
private double delaySecond
private double distance
private int noAmplifiers
private int noRegenerators
private boolean protection
private int protectionMode
private int noFibers
private Fiber[] fibers
private java.util.Vector srlg
| Constructor Detail |
public OpticalLink(Net net,
java.lang.String use_nhi)
net - The top-level modeling class that initiates this link.use_nhi - NHI address of point of link definition| Method Detail |
public void addFiber(Fiber fiber)
fiber - The fiber to add.
public void removeFiber(Fiber fiber)
throws DataIntegrityException
fiber - The fiber that has to be removed
DataIntegrityException - if the links data integrity is damaged.protected void clear()
public void addLambda(Fiber fiber,
Lambda lambda)
throws DataIntegrityException
fiber - The fiber where we add the lambda.lambda - The lambda to add.
DataIntegrityException - The lambda and fiber don't fit together.
public void configOptional(com.renesys.raceway.DML.Configuration cfg)
throws com.renesys.raceway.DML.configException
configOptional in class _linkcfg - The configuration object.
com.renesys.raceway.DML.configException - when a configuration error occured.
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 _linkcfg - The configuration object.
com.renesys.raceway.DML.configException - when a configuration error occured.
protected void configFibers(com.renesys.raceway.DML.Configuration cfg)
throws com.renesys.raceway.DML.configException
cfg - The DML configuration
when - a configException occurs
com.renesys.raceway.DML.configExceptionprotected void configFiber(Fiber fiber)
fiber - The fiber to configureprivate void sendConfigMessage(com.renesys.raceway.DML.Configuration cfg)
cfg - The configuration instance.
private void checkPair(com.renesys.raceway.DML.Configuration cfg)
throws com.renesys.raceway.DML.configException
cfg - The configuration object.
com.renesys.raceway.DML.configException - An configuration exception occured.
private void checkConfig()
throws com.renesys.raceway.DML.configException
com.renesys.raceway.DML.configException - if the configuration is not coorect.public double getBer()
public double getDistance()
public long delay()
delay in class _linkpublic double getDelay()
getDelay in class _linkpublic void setDelay(double value)
setDelay in class _linkvalue - The optical link's delay.
protected void reMap(ONIC outONIC,
ONIC inONIC)
outONIC - The NIC where the outChannel has to be connected.inONIC - The NIC where the inChannel has to be connected.public Fiber[] getFibers()
public Fiber getFiber(int id)
throws IllegalIDException
id - The fiber ID.
IllegalIDException - The passed ID is invalid.
public Fiber getFiber(int hostID,
int portID)
throws IllegalIDException
hostID - the id of the node that see portIDportID - the portID of the fiber on the side of the host hostID
IllegalIDException - The passed ID is invalid.
public Fiber getFiber(java.lang.String hostNhi,
int portID)
throws IllegalIDException
portID - the portID of the fiber on the side of the host hostID
IllegalIDException - The passed ID is invalid.public Lambda[] getLambdas(Fiber fiber)
fiber - One of the fiber that belong this optical link.
public int getNoAmplifiers()
public int getNoRegenerators()
public java.util.Vector getSrlg()
public java.lang.String getSrlgString()
public boolean isInSrlg(int srlg)
srlg - The number of the shared risk link group.
public boolean isInSrlg(java.lang.Integer srlg)
srlg - The number of the shared risk link group.
public boolean isProtection()
public int getProtectionMode()
public double getMaxBandwidthFor(int hostID)
hostID - the id of the sending host.
public double getAvailableBandwidthFor(int hostID)
throws TopologyException
hostID - the id of the sending host.
TopologyException - when duplicate node IDs.public double getAvailableBandwidthFor(java.lang.String hostNhi)
hostNhi - the NHI of the sending host.
public void setBer(double ber)
ber - The ber for this link.public void setDistance(double distance)
distance - The length of this link.public void setFailure(boolean newValue)
setFailure in class _linknewValue - True if the link becomes failed._link.setFailure(Entity,boolean)public void setNoAmplifiers(int newNoAmplifiers)
newNoAmplifiers - number of amplifiers.public void setNoRegenerators(int newNoRegenerators)
newNoRegenerators - The number of regenerators.public void setProtection(boolean protection)
protection - True if the link becomes a protection one.
public void setProtectionMode(int newMode)
throws IllegalDataException,
DataIntegrityException
newMode - the protection mode.
IllegalDataExcetion - The given mode is not known.
DataIntegrityException - The given mode and the protection value
is invalid (i.e. ProtectionMode.NEVER and
isProtection()==true.
IllegalDataExceptionpublic void addSrlg(java.util.Vector newSrlg)
newSrlg - A vector of SRLG that the link share.public void addSrlg(int newSrlg)
newSrlg - The number of the srlg that has to be addedpublic void addSrlg(java.lang.Integer newSrlg)
newSrlg - The number of the srlg that has to be addedpublic void removeSrlg(int srlg)
srlg - The number of the srlg that has to be addedpublic void removeSrlg(java.lang.Integer srlg)
srlg - The number of the srlg that has to be addedpublic void setSRLG(java.util.Vector newSRLG)
newSRLG - The new shared risk link group Vector
java.lang.NullPointerException - If the given SRLG is nullpublic int getNoFibers()
public boolean isBidirectional()
public java.lang.String toString()
toString in class java.lang.Objectprotected void sendMessage(short messageType)
messageType - the type of the message. The types are specified in the
class gov.nist.antd.optical.event.monitor.EventHandler.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||