|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gov.nist.antd.optical.Lambda
The lambda used in a fiber.
The behaviour of the lambda changed to the version 1.6 in the following way:
The Lambda has two internal failure attributes, emitterFailure and
receiverFailure. This ailure attributes replace the attribute
failure. This had to be done to be complient with SSF and multiple
timelines. The Lambda can't change the role of emitter and receiver in the
using ONIC anymore. The setup has to be done in advance and is by default:
host2 of the fiber is the receiving host and the attribute receiverFailure
is assigned to this entity.
the following attributes are only allowed to be accessed by the emitter host:
reserved -> boolean isReserved() - setReserved(boolean) available -> boolean isAvailable() - setAvailable(boolean) protection -> boolean isProtection() - setProtection(boolean)All these attributes are only for usage by the sender, the node with the physical laser diode. Therefore the framework does not check the timeline.
Each Lambda can be configured in the following way:
Lambda [ idThe settings for: receiver, pair, failure, protection, protectionMode, and snr are optional.# Must be unique in the fiber. control # INdicates the usage, ctrl or data wavelength # Value in nm bandwidth # Value in Gps failure pair receiver # Indicates the lambdas direction snr # Signal to noise ratio protection protectionMode ]
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/09/27 - 1.1 - Added FAILURE and CHANGE event.
borchert - 2001/10/05 - Added the attribute reserved.
borchert - 2001/10/26 - 1.2 - Add the interface FailureInformation.
borchert - 2001/10/30 - 1.3 - Add the failure notification for the ONIC.
borchert - 2001/10/31 - Added the check of the ONICS in the method isDepthFailure().
borchert - 2001/11/06 - 1.4 - Fixed bug in isDepthFailure. Changed the order of ONICs.
rouil - 2002/02/14 - Complete documentation
borchert - 2002/03/04 - 1.5 - Moved interface Failureinformation into package gov.nist.antf.ssf borchert - 2002/09/25 - 2.0 - The failure attribute depends on the requesting node and it's timeline. The Attribute is changed to emitterFailure and receiverFailure. - Fixed access of deprecated methods. borchert - 2002/09/28 - Add methods isReceiverOf(ONIC) and isEmitterOf(ONIC). - Changed the implemented interface from FailureInformation to FailureInformation2 borchert - 2002/10/01 - The method isFailure only returns the internal failure value. The method isDepthFailure considders the onic and peer information if nexessary. rouil - 2002/10/01 - Changed method setReceiver from private to protected because it can be called from fiber. borchert - 2002/10/02 - Fixed bug in method isFailure(Entity). borchert - 2002/10/08 - Changed toString() output. borchert - 2002/10/11 - Added method getReceiver(). borchert - 2002/10/16 - Updated failure attributes to be the same as in Fiber and Link. borchert - 2002/10/18 - Removed private method notifyONIC(). borchert - 2002/10/24 - Fixed a bug in setWavelength(double). klink - 2002/11/08 - 2.1 - Added method isReceiver(ProtocolGraph), deprecated method isReceiverOf(ONIC) klink - 2002/11/14 - 2.2 - Added method isEmitter(ProtocolGraph), deprecated method isEmitterOf(ONIC) borchert - 2002/11/14 - The WARNING messages will be printed out only once. borchert - 2002/11/18 - Changed error text in method setWavelength(..).
| Field Summary | |
private boolean |
available
Indicates if the Lambda is available. |
private double |
bandwidth
This value represents the bandwidth of this lambda. |
private boolean |
control
Indicates if this lambda is used for the control plane. |
private com.renesys.raceway.SSF.Entity |
emitterHost
The sending Host. |
private ONIC |
emitterONIC
The emitting ONIC. |
static double |
ERR
Constante value for the precision in computing the wavelength. |
private java.util.Hashtable |
failureTable
This hashtable contains the failure of the emitter and receiver. |
private Fiber |
fiber
The fiber the lambda is asigned to. |
static byte |
HOST1
Constant value that specify the receiver host HOST1. |
static byte |
HOST2
Constant value that specify the receiver host HOST1. |
private int |
id
The id of the lambda. |
protected boolean |
inConfiguration
Indicator if the class is in the configuration mode (true). |
private Lambda |
pair
The pair lambda assiociated to this lambda. |
private static boolean |
PRN_DEPFAIL
Will be set to false after the warning first print of isDephFauilure(). |
private static boolean |
PRN_ISFAIL
Will be set to false after the warning first print of isFauilure(). |
private static boolean |
PRN_SETFAIL
Will be set to false after the warning first print of isFauilure(). |
private boolean |
protection
Indicates if this Lambda is used as a protection for an other Lambda. |
private int |
protectionMode
The mode of Protection ProtectionMode.NEVER, ProtectionMode.ONLY, or ProtectionMode.SHARED |
private byte |
receiver
The Entity that used the Lambda as receiver (default is HOST2). |
private com.renesys.raceway.SSF.Entity |
receiverHost
The receiving Host. |
private ONIC |
receiverONIC
The receiving ONIC. |
private boolean |
reserved
Indicates if the Lambda is already reserved for later use. |
private double |
snr
This attribute contains the signal to noise ratio. |
private double |
wavelength
The wavelength. |
| Constructor Summary | |
Lambda(Fiber fiber)
Constructs a lambda. |
|
Lambda(Fiber fiber,
int id)
Constructs a lambda. |
|
| Method Summary | |
boolean |
checkData()
This method checks the data of the object. |
boolean |
compareCharacteristics(Lambda otherLambda)
Compare the attribute wavelength of two lambda's. |
void |
config(com.renesys.raceway.DML.Configuration cfg)
Configure the Fiber. |
protected void |
configureBandwidth(java.lang.String value)
Configures the bandwidth from the DML |
private void |
configureControl(java.lang.String value)
Configures the control status. |
private void |
configureID(java.lang.String value)
Configures the id. |
protected void |
configurePair(java.lang.String value)
Configures the pairing. |
protected void |
configureWaveLength(java.lang.String value)
Configures the wavelength. |
double |
getBandwidth()
Get the bandwidth of this lambda. |
Fiber |
getFiber()
Get the Fiber this lambda is assigned. |
int |
getID()
Get the id of this lambda. |
Lambda |
getPair()
Get the pair lambda attached to this lambda. |
int |
getProtectionMode()
Returns the protection mode of the lambda. |
byte |
getReceiver()
Returns the registered receiver value. |
double |
getSNR()
Get the value of the signal to noise ratio. |
double |
getWavelength()
Get the value of the wavelength. |
private boolean |
has2TimeLines()
Checks the timeline of both connecton onics. |
boolean |
isAvailable()
Informs if this lambda is used. |
boolean |
isControl()
Indicates if the lambda is used for control. |
boolean |
isDepthFailure()
Deprecated. Don't use this method anumore. |
boolean |
isDepthFailure(com.renesys.raceway.SSF.Entity forHost)
Is doing the same as isFailure(Entity) excpet the fiber, link and onic will be tested too. |
boolean |
isEmitter(ProtocolGraph pg)
Returns if this lambda is in the role of an emitter for this ONIC. |
boolean |
isEmitterOf(ONIC onic)
Deprecated. Use isReceiver(ProtocolGraph) instead |
boolean |
isFailure()
Deprecated. This method should not be used longer. It could produce a time based data integrity problem. |
boolean |
isFailure(com.renesys.raceway.SSF.Entity forHost)
Returns true if is this lambda component is failed. |
boolean |
isProtection()
Informs if this lambda is used as a protection lambda. |
boolean |
isReceiver(ProtocolGraph pg)
Returns if this lambda is in the role of a receiver for this ONIC. |
boolean |
isReceiverOf(ONIC onic)
Deprecated. Use isReceiver(ProtocolGraph) instead |
boolean |
isReserved()
Informs if the lambda is already reserved. |
protected void |
sendMessage(short messageType)
Deprecated. DON'T USE THIS ANYMORE |
void |
setAvailable(boolean available)
Set the attribute available. |
void |
setBandwidth(double newBandwidth)
Define the bandwidth for this lambda. |
void |
setControl(boolean control)
Set the attribute control. |
void |
setFailure(boolean failure)
Deprecated. This method should not be used longer. It could produce a time based data integrity problem. |
void |
setFailure(com.renesys.raceway.SSF.Entity forHost,
boolean failure)
Set the attribute for the emitterFailure and/or receiverFailure. |
protected void |
setFiber(Fiber newFiber)
Set the fiber of this Lambda. |
void |
setID(int newID)
Set the id for this lambda. |
void |
setPair(Lambda pair)
Create a relation between two lambdas. |
void |
setProtection(boolean protection)
Set the attribute protection. |
void |
setProtectionMode(int newMode)
Set the protection mode. |
void |
setReceiver(byte newReceiver)
This method set and initialize the Lambda-receiver. |
void |
setReserved(boolean reserved)
Set the attribute reserved. |
void |
setSNR(double newSnr)
Set the attribute signal to noise ratio. |
void |
setWavelength(double newWavelength)
Set the wavelength value of this lambda in nm. |
java.lang.String |
toString()
Textual representation of the lambda. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private static boolean PRN_DEPFAIL
private static boolean PRN_ISFAIL
private static boolean PRN_SETFAIL
public static final double ERR
public static final byte HOST1
public static final byte HOST2
private boolean available
private boolean reserved
private boolean control
private java.util.Hashtable failureTable
private int id
private boolean protection
private int protectionMode
private double bandwidth
private double snr
private double wavelength
protected boolean inConfiguration
private byte receiver
private Lambda pair
private Fiber fiber
private com.renesys.raceway.SSF.Entity emitterHost
private com.renesys.raceway.SSF.Entity receiverHost
private ONIC emitterONIC
private ONIC receiverONIC
| Constructor Detail |
public Lambda(Fiber fiber)
throws DataIntegrityException
fiber - The fiber that contains this lambda.
DataIntegrityException - The Lambda could not be created for the
link.
public Lambda(Fiber fiber,
int id)
throws DataIntegrityException
fiber - The fiber that contains this lambda.id - The id of the lambda. This id must be unique in the fiber.
DataIntegrityException - The Lambda could not be created for the
link.| Method Detail |
public boolean compareCharacteristics(Lambda otherLambda)
wavelength, protection, and signalType
otherLambda - The second lambda.
public Fiber getFiber()
public int getID()
getID in interface LambdaInterfacepublic Lambda getPair()
public double getBandwidth()
public double getSNR()
public double getWavelength()
public boolean isAvailable()
public boolean isReserved()
public boolean isControl()
public boolean isProtection()
public int getProtectionMode()
public void setAvailable(boolean available)
available - True if the lambda is not used.public void setReserved(boolean reserved)
reserved - True if the lambda is reserved.public void setControl(boolean control)
control - True if this lambda is used by control plane.
public void setID(int newID)
throws DuplicateIDException
newID - The new id.
DuplicateIDException - The ID is already used in the fiber.
public void setPair(Lambda pair)
throws DataIntegrityException
pair - The lambda attached to this one.
DataIntegrityException - If the dataintegrity is not given.public void setProtection(boolean protection)
protection - The new status.
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 setBandwidth(double newBandwidth)
newBandwidth - The new bandwidth.public void setSNR(double newSnr)
newSnr - The new value.
public void setWavelength(double newWavelength)
throws IllegalDataException,
DataIntegrityException
newWavelength - The value of the wavelength.
IllegalDataException
DataIntegrityException
public boolean isFailure()
throws TimelineException
isFailure in interface FailureInformationTimelineException - Will be thrown if the timeline of both ONICS
is different.isFailure(Entity)
public boolean isFailure(com.renesys.raceway.SSF.Entity forHost)
throws TopologyException
isFailure in interface FailureInformation2forHost - The host the failure has to be set for.
TopologyException - Will be thrown when no information for the
given host/entity is found.public boolean isDepthFailure()
TimelineException - Will be thrown if the timeline of both ONICS
is different.isDepthFailure(Entity)public boolean isDepthFailure(com.renesys.raceway.SSF.Entity forHost)
TopologyException - Will be thrown if the timeline of both ONICS
is different.
public void setFailure(boolean failure)
throws TimelineException
failure - The new failure value.
TimelineException - If both ONICS are in a different timeline.setFailure(Entity,boolean)
public void setFailure(com.renesys.raceway.SSF.Entity forHost,
boolean failure)
failure - The new failure value.public java.lang.String toString()
toString in class java.lang.Object
protected void setFiber(Fiber newFiber)
throws DataIntegrityException
newFiber - The fiber the lambda is assigned to.
DataIntegrityException - will be thrown, if the data integrity
is not given anymore.
public boolean checkData()
throws DataIntegrityException
DataIntegrityException - This exception will be thrown only in
the case that stored data are damaging the data integrity.
public void config(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 configureID(java.lang.String value)
throws com.renesys.raceway.DML.configException,
DataIntegrityException
value - the id value.
com.renesys.raceway.DML.configException - an configException occured.
DataIntegrityException - an DataIntegrityException occured.
private void configureControl(java.lang.String value)
throws com.renesys.raceway.DML.configException,
DataIntegrityException
value - the control value.
com.renesys.raceway.DML.configException - an configException occured.
DataIntegrityException - an DataIntegrityException occured.
protected void configureWaveLength(java.lang.String value)
throws DataIntegrityException
value - the wavelength value.
DataIntegrityException - an DataIntegrityException occured.
protected void configurePair(java.lang.String value)
throws com.renesys.raceway.DML.configException,
DataIntegrityException
value - the pair value.
com.renesys.raceway.DML.configException - an configException occured.
DataIntegrityException - an DataIntegrityException occured.
protected void configureBandwidth(java.lang.String value)
throws IllegalDataException
value - the string representing the bandwidth from the DML
IllegalDataException - thrown if value is not a valid bandwidthprotected void sendMessage(short messageType)
messageType - the type of the message. The types are specified in the
class gov.nist.antd.optical.event.monitor.EventHandler.public void setReceiver(byte newReceiver)
newReceiver - Set the receiver value.private boolean has2TimeLines()
public boolean isReceiverOf(ONIC onic)
throws TopologyException
onic - The ONIC that has to be checked.
TopologyException - If the ONIC is unknown to the lambda.
public boolean isReceiver(ProtocolGraph pg)
throws TopologyException
pg - The ProtocolGraph that has to be checked.
TopologyException - If the ONIC is unknown to the lambda.
public boolean isEmitterOf(ONIC onic)
throws TopologyException
onic - The ONIC that has to be checked.
TopologyException - If the ONIC is unknown to the lambda.
public boolean isEmitter(ProtocolGraph pg)
throws TopologyException
pg - The ProtocolGraph that has to be checked.
TopologyException - If the ONIC is unknown to the lambda.public byte getReceiver()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||