|
||||||||||
| 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.optical.OXCSwitch
This class implements switching capabilities for OXC's.
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 java.util.Hashtable |
addDropLambdas
This hashtable contains the add drop lambdas. |
private boolean |
autoCreateAddDrop
This flag is used for the autocreation of the add drop lambda |
private int |
concatType
Concatenation type of this ExtRouter. |
private boolean |
debug
Indicates if debug information are displayed. |
private int |
hostID
The id of the assigned host. |
static int |
INTERFACE_SET_STARTING_SIZE
The initial size of the interface set (interfaceSet). |
private int |
interfaceCount
Number of interfaces used by this controller. |
private ONIC[] |
interfaceSet
The interfaces used by this controller. |
static int |
NO_CONCATENATION
Value of the concatenation type. |
private int |
noConverters
Number of available converters in this switch. |
private int |
noUsedAddLambdas
Keeps track about the used add lambdas. |
private int |
noUsedConverters
Number of used converters in this switch. |
private int |
noUsedDropLambdas
Keeps track about the used drop lambdas. |
static java.lang.String |
SESSION_NAME
The name (oxcswitch) of this protocolsession in the network. |
static int |
STANDARD_CONCATENATION
Value of the concatenation type. |
private SwitchingTable |
switchingTable
The used switching table that stores connection information. |
static int |
VIRTUAL_CONCATENATION
Value of the concatenation type. |
| Fields inherited from class SSF.OS.ProtocolSession |
name, use |
| Constructor Summary | |
OXCSwitch()
Default constructor. |
|
| Method Summary | |
void |
config(com.renesys.raceway.DML.Configuration cfg)
Configure the OXC switch. |
void |
connect(Fiber inFiber,
Fiber outFiber)
Try to connect the input fiber to the output fiber. |
void |
connect(Lambda inLambda,
Lambda outLambda)
Try to connect the input lambda to the output lambda. |
void |
connectAddPort(int addDropLambdaID,
int onicID,
int fiberID,
int lambdaID)
Command sent from the router to the OXC switching requesting that it crossconnects the virtual input lambda to output lambda (add port). |
void |
connectDropPort(int addDropLambdaID,
int onicID,
int fiberID,
int lambdaID)
Command sent from the router to the OXC switching requesting that it crossconnect input lambda to the virtual output lambda (drop port). |
int |
createNewAddDropLambda()
Creates a new AddDropLambda. |
private void |
decUsedConverters()
Decreases the number of used converters. |
boolean |
deleteAddDropLambda(int id)
Request the deletion of the specified add-drop-lambda. |
void |
disconnect(Fiber fiber)
Disconnects the lambdas inside the fiber. |
void |
disconnect(Lambda lambda)
Disconnects the lambda with from the corresponding lambda. |
void |
disconnectAddPort(int addDropLambdaID)
Command sent from the upper layer to the OXC switching requesting that it disconnects the add port. |
void |
disconnectDropPort(int addDropLambdaID)
Command sent from the upper layer to the OXC switching requesting that it disconnects the virtual input lambda from the connected input lambda. |
protected void |
drop(java.lang.String message)
Method called when OXC switch drops a packet. |
int[] |
getAddDropIDs()
Gets all add-drop-lambda port ids. |
AddDropLambda |
getAddDropLambda(int id)
Determines the AddDropLambda and returns it. |
ONIC |
getAttachedONIC(int onicID)
Find an ONIC from its ID |
ONIC |
getAttachedOnicFromIP(int onicIP)
Find an ONIC from its IP adress |
ONIC[] |
getAttachedONICs()
Get the attached ONICs |
int |
getConcatType()
Get the concatenation type for this OXCSwitch. |
int[][] |
getConnectionsInfo()
Get the lambdas' ID that are used in the connections. |
private int |
getHostID()
Determines the host id. |
int |
getNoConverters()
Determine the number of converters in the switch. |
int |
getNoONICs()
Number of ONIC that belong the OXC switch. |
java.util.Vector |
getNotUsedAddLambdas()
Get the list of free addLambdas |
java.util.Vector |
getNotUsedDropLambdas()
Get the list of free dropLambdas |
int |
getNoUsedAddLambdas()
Number of lambdas at add port. |
int |
getNoUsedConverters()
Determine the number of used converters. |
int |
getNoUsedDropLambdas()
Number of lambdas at drop port. |
int[] |
getUsedAddIDs()
Get the id's of the add lambdas. |
java.util.Vector |
getUsedAddLambdas()
Get the list of lambdas at the Add port. |
int[] |
getUsedDropIDs()
Get the id's of the drop lambdas. |
java.util.Vector |
getUsedDropLambdas()
Get the list of lambdas at Drop port. |
private void |
incUsedConverters()
Increases the number of used converters. |
void |
init()
Initialization routine, called by the ProtocolGraph after instantiation. |
boolean |
isConnected(Lambda lambda)
Determines if the lambda is connected or not. |
boolean |
isConverter()
Determines if the switch has the capability to convert lambdas. |
boolean |
isConverterAvailable()
Check if there is a converter available |
boolean |
isDebug()
Return if the debug information must be displayed. |
void |
opened(ProtocolSession onic)
Add a new opened ONIC to the interfaceSet. |
boolean |
push(ProtocolMessage message,
ProtocolSession fromSession)
Push the message to the good protocol session. |
private boolean |
pushDown(ProtocolMessage message,
ProtocolSession fromSession)
Push the message to the good protocol session. |
private boolean |
pushFromONIC(ProtocolMessage message,
ProtocolSession fromSession)
pushes the message up or back down depending on the entry of the table. |
void |
removeConversion()
Remove all the connections that use lambda conversion |
void |
removeONIC(ONIC onic)
Remove the given onic |
void |
setConcatType(int newType)
Defines the concatenation capability of the OXCSwitch. |
void |
setDebug(boolean value)
Set the attribute debug |
void |
setGraph(ProtocolGraph graph)
Set the protocol graph in which this session is configured. |
void |
setNoConverters(int noConv)
Set the number of converters. |
java.lang.String |
toDML()
Return a String with the options of this protocolSession does not include noConverters if infinite (default value) |
java.lang.String |
toString()
The textual representation of this switch. |
| Methods inherited from class SSF.OS.ProtocolSession |
close, closed, debugIdentifier, inGraph, open, pushAfterDelay, pushAfterDelayFailed, version |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int INTERFACE_SET_STARTING_SIZE
public static final java.lang.String SESSION_NAME
public static final int NO_CONCATENATION
public static final int STANDARD_CONCATENATION
public static final int VIRTUAL_CONCATENATION
private int concatType
private int hostID
private int interfaceCount
private boolean autoCreateAddDrop
private int noConverters
private int noUsedConverters
private int noUsedAddLambdas
private int noUsedDropLambdas
private boolean debug
private SwitchingTable switchingTable
private ONIC[] interfaceSet
private java.util.Hashtable addDropLambdas
| Constructor Detail |
public OXCSwitch()
| 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 - configuration
com.renesys.raceway.DML.configException - when a configuration exception occurs.
public void init()
throws ProtocolException
init in class ProtocolSessionProtocolException
public void connect(Lambda inLambda,
Lambda outLambda)
throws InvalidConnectionException
inLambda - The input lambda.outLambda - The output lambda.
InvalidConnectionException - if parameters are invalid.
public void connect(Fiber inFiber,
Fiber outFiber)
throws InvalidConnectionException
inFiber - The input fiber.outFiber - The output fiber.
InvalidConnectionException - if parameters are invalid.
public void connectAddPort(int addDropLambdaID,
int onicID,
int fiberID,
int lambdaID)
throws InvalidConnectionException
addDropLambdaID - The id of the ADD lambda.onicID - The onic of the lambda that has to be assigned as addLambda.fiberID - The fiber of the lambda that has to be assigned as
addLambda.lambdaID - The id of the lambda.
InvalidConnectionException - if parameters are invalid.
public void connectDropPort(int addDropLambdaID,
int onicID,
int fiberID,
int lambdaID)
throws InvalidConnectionException
addDropLambdaID - The id of the DROP lambda.onicID - The onic of the lambda that has to be assigned as dropLambda.fiberID - The fiber of the lambda that has to be assigned as
dropLambda.lambdaID - The id of the lambda.
InvalidConnectionException - if parameters are invalid.public void disconnect(Lambda lambda)
lambda - the Lambda that has to be disconnected.public void disconnect(Fiber fiber)
fiber - The Fiber that has to be disconnected.
public void disconnectAddPort(int addDropLambdaID)
throws InvalidConnectionException
addDropLambdaID - the id if the add/drop lambda.
InvalidConnectionException - if parameters are invalid.
public void disconnectDropPort(int addDropLambdaID)
throws InvalidConnectionException
addDropLambdaID - The id of the add/drop lambda port.
InvalidConnectionException - The addDropLambdaID is not a drop
lambda.public ONIC getAttachedONIC(int onicID)
onicID - The id of the ONIC.
public ONIC[] getAttachedONICs()
public ONIC getAttachedOnicFromIP(int onicIP)
onicIP - The ip of the ONIC.
public int getNoONICs()
private int getHostID()
public java.util.Vector getUsedDropLambdas()
public java.util.Vector getNotUsedDropLambdas()
public java.util.Vector getUsedAddLambdas()
public java.util.Vector getNotUsedAddLambdas()
public int[][] getConnectionsInfo()
public boolean isConverterAvailable()
public int getNoConverters()
public int getNoUsedConverters()
public boolean isConverter()
private final void incUsedConverters()
private final void decUsedConverters()
public void setDebug(boolean value)
value - The value for the attribute debugpublic boolean isDebug()
public boolean isConnected(Lambda lambda)
lambda - the lambda that has to be checked.
public void removeConversion()
public void setConcatType(int newType)
newType - The concatenation type.public int getConcatType()
public void opened(ProtocolSession onic)
throws ProtocolException
opened in class ProtocolSessiononic - The new ONIC opened.
ProtocolException - If an exception occurs.protected void drop(java.lang.String message)
message - The message header.
public boolean push(ProtocolMessage message,
ProtocolSession fromSession)
throws ProtocolException
push in class ProtocolSessionmessage - The OpticalFrameHeader-message that has to be pushed.fromSession - The ProtocolSession that calls this push method.
ProtocolException - The message has the wrong format.
private boolean pushFromONIC(ProtocolMessage message,
ProtocolSession fromSession)
throws ProtocolException
message - The OpticalFrameHeader messgae.fromSession - The protocol session which sent the message.
ProtocolException - If a protocol session exception occurs.
private boolean pushDown(ProtocolMessage message,
ProtocolSession fromSession)
throws ProtocolException
message - The message received.fromSession - The protocol session which sent the message.
ProtocolException - If a protocol session exception occurs.public void removeONIC(ONIC onic)
onic - The ONIC to remove
IllegalDataException - if the onic does not belong to this host.public int createNewAddDropLambda()
public boolean deleteAddDropLambda(int id)
id - The id of this lambda.
public AddDropLambda getAddDropLambda(int id)
id - The id of the AddDropLambda.
public java.lang.String toDML()
toDML in interface DMLDump
public void setGraph(ProtocolGraph graph)
throws ProtocolException
setGraph in class ProtocolSessiongraph - The ExtRouter that is attached to this ProtocolSession.
ProtocolException - if the session is already configured in a
protocol graphpublic java.lang.String toString()
toString in class java.lang.Objectpublic int[] getAddDropIDs()
getAddDropIDs in interface AddDropConfigurationpublic int[] getUsedAddIDs()
getUsedAddIDs in interface AddDropConfigurationpublic int[] getUsedDropIDs()
getUsedDropIDs in interface AddDropConfigurationpublic int getNoUsedAddLambdas()
getNoUsedAddLambdas in interface AddDropConfigurationpublic int getNoUsedDropLambdas()
getNoUsedDropLambdas in interface AddDropConfigurationpublic void setNoConverters(int noConv)
noConv - The new number of converter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||