|
||||||||||
| 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 SSF.Net.Net.seconds(getDistance()*0.000000005)
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 |
ber
Bit Error Rate of the link. |
private double |
delay
Delay of the link in ticks. |
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. |
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)
Default constructor. |
|
| 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()
Deprecated. Use the method getDelay(). |
double |
getAvailableBandwidthFor(int hostID)
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. |
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)
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. |
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 |
notifyNIC()
Notifies the ONIC for a failed Lambda. |
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, getNICs, getPrefix, getPrefix, isFailure, setAttachedCount, setAttachedCount, setAttachedInterfaces, setAttachedInterfaces, setCidr, setDumpTo, 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, resumeAll, startAll, startAll, startClient, startClient, startServer, W, Z |
| 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
private double ber
private double delay
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()
public void setDelay(double value)
value - The optical link's delay.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 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 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)
hostID - the id 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.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.protected void notifyNIC()
notifyNIC in class _link
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||