gov.nist.antd.optical
Class OXCEdgeRouter

java.lang.Object
  |
  +--com.renesys.raceway.SSF.Entity
        |
        +--SSF.OS.ProtocolGraph
              |
              +--SSF.Net.Host
                    |
                    +--SSF.Net.Router
                          |
                          +--SSF.Net.ExtRouter
                                |
                                +--gov.nist.antd.optical.OXCEdgeRouter
All Implemented Interfaces:
com.renesys.raceway.DML.Configurable, FailureInformation
Direct Known Subclasses:
OXC

public class OXCEdgeRouter
extends ExtRouter

This class represents the optical cross connector (OXC). This class only can be in a relationship to ONIC and to NICs.

 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.

Author:
borchert
, rouil

Field Summary
private  java.util.Vector srg
          The Vector containing the Shared Risk Groups this Node belongs to.
 
Fields inherited from class SSF.Net.ExtRouter
inConfiguration, protNames
 
Fields inherited from class SSF.Net.Host
hostConfig, ID, interfaceAddresses, interfaceNumbers, net, nhi, nhi_context
 
Fields inherited from class SSF.OS.ProtocolGraph
description
 
Fields inherited from class com.renesys.raceway.SSF.Entity
 
Constructor Summary
OXCEdgeRouter(Net net, java.lang.String nhi, int id)
          Constructor of an OXCEdgeRouter.
 
Method Summary
 void addSrg(int newSrg)
          Set the Shared Risk Group for this optical node.
 void addSrg(java.lang.Integer newSrg)
          Set the Shared Risk Group for this optical node.
 void addSrg(java.util.Vector newSrg)
          Add the Shared Risk Group for this node.
protected  void checkAndAddIP(com.renesys.raceway.DML.Configuration cfg)
          Check if ip protocol is defined, if not, add the default SSF.OS.IP
 void config(com.renesys.raceway.DML.Configuration cfg)
          Configuration of a Optical Cross Connect.
 void configOptional(com.renesys.raceway.DML.Configuration cfg)
          Configures the optional settings.
 java.util.Vector getSRG()
          Determines the shared risk groups the node belongs to.
 void init()
          Initialize all the protocols in the graph when the simulation begins.
 boolean isAvailableConverter()
          Check if there is a converter available
 boolean isConverter()
          Determines if the OXCEdgeRouter has the capability to convert lambdas.
 boolean isInSrg(int srg)
          Determines if the node belongs to the given shared risk group.
 boolean isInSrg(java.lang.Integer srg)
          Determines if the node belongs to the given shared risk group.
 boolean isInSrlg(int srlg)
          Determines if one of the nodes links belong 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.
 void removeSrg(int srg)
          Remove the Shared Risk Group for this OXCEdgeRouter.
 void removeSrg(java.lang.Integer srg)
          Remove the Shared Risk Group for this OXCEdgeRouter
 void setSRG(java.util.Vector newSRG)
          Replaces the internal Vector with a clone of the new one.
 
Methods inherited from class SSF.Net.ExtRouter
getID, getInterfaceAddresses, getInterfaceCount, getInterfaceCount, getNameOfProtocols, getNet, isFailure, isLog, notifyONIC, removeProtocolSession, sendMessage, SessionForName, setFailure, setID, setInterfaceCount, setLog
 
Methods inherited from class SSF.Net.Host
defined_in_network, global_nhi_to_ip, local_nhi_to_ip, toString
 
Methods inherited from class SSF.OS.ProtocolGraph
cpu
 
Methods inherited from class com.renesys.raceway.SSF.Entity
alignment, alignTo, coalignedEntities, inChannels, 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

srg

private java.util.Vector srg
The Vector containing the Shared Risk Groups this Node belongs to.

Constructor Detail

OXCEdgeRouter

public OXCEdgeRouter(Net net,
                     java.lang.String nhi,
                     int id)
              throws DuplicateIDException
Constructor of an OXCEdgeRouter.

Parameters:
net - network within which the OXCEdgeRouter is to be configured.
nhi - NHI address of the containing network.
id - integer OXCEdgeRouter ID.
Throws:
DuplicateIDException
Method Detail

addSrg

public void addSrg(java.util.Vector newSrg)
Add the Shared Risk Group for this node. This method does not check the Objects in the Vector. They MUST be instances of Integer.

Parameters:
newSrg - A vector of SRG that the risk share.

addSrg

public void addSrg(int newSrg)
Set the Shared Risk Group for this optical node.

Parameters:
newSrg - The number of the srg that has to be added

removeSrg

public void removeSrg(int srg)
Remove the Shared Risk Group for this OXCEdgeRouter.


removeSrg

public void removeSrg(java.lang.Integer srg)
Remove the Shared Risk Group for this OXCEdgeRouter


setSRG

public void setSRG(java.util.Vector newSRG)
Replaces the internal Vector with a clone of the new one.

Parameters:
newSRG - The new shared risk group Vector
Throws:
java.lang.NullPointerException - If the given SRG is null

addSrg

public void addSrg(java.lang.Integer newSrg)
Set the Shared Risk Group for this optical node. the group only will be added locally if the node isn't already member of the same srlg.

Parameters:
newSrg - The number of the srg that has to be added

getSRG

public java.util.Vector getSRG()
Determines the shared risk groups the node belongs to.

Returns:
a clone of the internal Vector with all srg (node + link)

isInSrlg

public boolean isInSrlg(int srlg)
Determines if one of the nodes links belong to the given shared risk link group.

Parameters:
srlg - The number of the shared risk link group.
Returns:
True if the node belongs to the group; otherwise false.

isInSrlg

public boolean isInSrlg(java.lang.Integer srlg)
Determines if the link belongs to the given shared risk link group.

Parameters:
srlg - The number of the shared risk link group.
Returns:
True if the link belongs to the group; otherwise false.

isInSrg

public boolean isInSrg(int srg)
Determines if the node belongs to the given shared risk group.

Parameters:
srg - The number of the shared risk group.
Returns:
True if the node belongs to the group; otherwise false.

isInSrg

public boolean isInSrg(java.lang.Integer srg)
Determines if the node belongs to the given shared risk group.

Parameters:
srg - The number of the shared risk group.
Returns:
True if the node belongs to the group; otherwise false.

configOptional

public void configOptional(com.renesys.raceway.DML.Configuration cfg)
                    throws com.renesys.raceway.DML.configException
Configures the optional settings.

Parameters:
cfg - The Configuration that contains the setup.
Throws:
com.renesys.raceway.DML.configException - Will we throws if the configuration contains errors.

config

public void config(com.renesys.raceway.DML.Configuration cfg)
            throws com.renesys.raceway.DML.configException
Configuration of a Optical Cross Connect.

REQUIRED ATTRIBUTES:

OPTIONAL ATTRIBUTES:

Specified by:
config in interface com.renesys.raceway.DML.Configurable
Overrides:
config in class ExtRouter
Parameters:
cfg - the configuration object.
Throws:
com.renesys.raceway.DML.configException - if a configuration error occurs.

isConverter

public boolean isConverter()
Determines if the OXCEdgeRouter has the capability to convert lambdas.

Returns:
True if the switch has converter capabilities.

isAvailableConverter

public boolean isAvailableConverter()
Check if there is a converter available

Returns:
True if there is a converter available

checkAndAddIP

protected void checkAndAddIP(com.renesys.raceway.DML.Configuration cfg)
Check if ip protocol is defined, if not, add the default SSF.OS.IP

Parameters:
cfg - The DML configuration

init

public void init()
Initialize all the protocols in the graph when the simulation begins.

Overrides:
init in class Host