Class SwitchPort

java.lang.Object
   |
   +----VisiModel.ATMPort
           |
           +----SwitchPort

public class SwitchPort
extends ATMPort
Class definition for a port on an ATM switch.

Version:
$Revision: 1.10 $, $Date: 2000/10/31 20:32:03 $
Author:
John Cavanaugh, Mike Spengler, Joseph Thomas

Variable Index

 o alive
The last time this port was reported active.
 o bwAllocIn
The port's allocated input bandwidth.
 o bwAllocOut
The port's allocated output bandwidth.
 o bwIn
The port's input bandwidth.
 o bwOut
The port's output bandwidth.
 o cellsIn
The number of cells the port has received.
 o cellsOut
The number of cells the port has transmitted.
 o inVCLs
A list of the inbound VCL endpoints associated with the port.
 o outVCLs
A list of the outbound VCL endpoints associated with the port.
 o paths
List of the virtual paths that originate at the port.
 o uptime
The port's uptime.

Constructor Index

 o SwitchPort(String, ATMSwitch, long, long, long, long, long, long, long)
Constructs a switch port.

Method Index

 o addInVCL(VCLEndIn)
Add an inbound VCL endpoint to the port.
 o addOutVCL(VCLEndOut)
Add an outbound VCL endpoint to the port.
 o addPath(int, CollectorNode)
Adds a virtual path to the port.
 o delete()
Deletes this port (and its subcomponents).
 o deleteInVCL(int, int)
Delete an inbound VCL endpoint from the port.
 o deleteInVCL(VCLEndIn)
Delete an inbound VCL endpoint from the port.
 o deleteOutVCL(int, int)
Delete an outbound VCL endpoint from the port.
 o deleteOutVCL(VCLEndOut)
Delete an outbound VCL endpoint from the port.
 o deletePath(int)
Delete a virtual path from the port.
 o deletePath(PathOrigin)
Delete a virtual path from the port.
 o dumpStateComponent(FIFO)
Dumps the current state of this switch port's components.
 o getActive()
Gets the last time this port was considered active.
 o getInputAllocatedBW()
Gets the port's allocated input bandwidth.
 o getInputBandwidth()
Gets the port's input bandwidth.
 o getInputCells()
Gets the number of cells the port has received.
 o getInVCL(int, int)
Get an inbound VCL endpoint associated with the port.
 o getOutputAllocatedBW()
Gets the port's allocated output bandwidth.
 o getOutputBandwidth()
Gets the port's output bandwidth.
 o getOutputCells()
Gets the number of cells the port has transmitted.
 o getOutVCL(int, int)
Get an outbound VCL endpoint associated with the port.
 o getPath(int)
Get a virtual path that originates at the port.
 o getUptime()
Gets the port's uptime.
 o refreshActive()
Refreshes the port's active time.
 o scanVCC()
Scans through all of this port's VCL endpoints, looking for VCLs which can be combined to form complete VCC paths.
 o toString()
Get a string describing the SwitchPort object.
 o update(long, long, long, long, long, long, long)
Updates the port's counters.
 o updatePathInfo(PeerAddress, CollectorNode)
Updates the information for a path originating on this port.
 o weedOut(NodeEnd)
Checks a port and its contents to detect and delete components which have disappeared from the node.

Variables

 o paths
 private VectorIter paths
List of the virtual paths that originate at the port.

 o inVCLs
 private VectorIter inVCLs
A list of the inbound VCL endpoints associated with the port.

 o outVCLs
 private VectorIter outVCLs
A list of the outbound VCL endpoints associated with the port.

 o alive
 private long alive
The last time this port was reported active.

 o uptime
 private long uptime
The port's uptime.

 o bwIn
 private long bwIn
The port's input bandwidth.

 o bwAllocIn
 private long bwAllocIn
The port's allocated input bandwidth.

 o cellsIn
 private long cellsIn
The number of cells the port has received.

 o bwOut
 private long bwOut
The port's output bandwidth.

 o bwAllocOut
 private long bwAllocOut
The port's allocated output bandwidth.

 o cellsOut
 private long cellsOut
The number of cells the port has transmitted.

Constructors

 o SwitchPort
 public SwitchPort(String name,
                   ATMSwitch sw,
                   long uptime,
                   long bwIn,
                   long bwAllocIn,
                   long cellsIn,
                   long bwOut,
                   long bwAllocOut,
                   long cellsOut)
Constructs a switch port.

Parameters:
name - The name of the port.
sw - The local switch the port is attached to.
uptime - The time the port has been up, in hundredths of a second.
bwIn - The port's input bandwidth.
bwAllocIn - The port's allocated input bandwidth.
cellsIn - The number of cells the port has received.
bwOut - The port's output bandwidth.
bwAllocOut - The port's allocated output bandwidth.
cellsOut - The number of cells the port has transmitted.

Methods

 o weedOut
 public boolean weedOut(NodeEnd ne)
Checks a port and its contents to detect and delete components which have disappeared from the node.

Parameters:
ne - update record which ends the update cycle
Returns:
true if this port was deleted
 o scanVCC
 public void scanVCC()
Scans through all of this port's VCL endpoints, looking for VCLs which can be combined to form complete VCC paths.

 o delete
 public void delete()
Deletes this port (and its subcomponents).

Overrides:
delete in class ATMPort
 o getPath
 public PathOrigin getPath(int vpi)
Get a virtual path that originates at the port.

Parameters:
vpi - The VPI of the path.
Returns:
The PathOrigin with the specified VPI, or null if it was not found.
 o updatePathInfo
 public void updatePathInfo(PeerAddress pa,
                            CollectorNode peer)
Updates the information for a path originating on this port.

Parameters:
pa - PeerAddress update record
peer - remote peer node
 o addPath
 public void addPath(int vpi,
                     CollectorNode peer)
Adds a virtual path to the port.

Parameters:
vpi - the VPI value for the new path
peer - remote peer node
 o deletePath
 public void deletePath(PathOrigin path)
Delete a virtual path from the port.

Parameters:
path - The virtual path to be deleted.
 o deletePath
 public void deletePath(int vpi)
Delete a virtual path from the port.

Parameters:
vpi - The VPI of the path.
 o getInVCL
 public VCLEndIn getInVCL(int vpi,
                          int vci)
Get an inbound VCL endpoint associated with the port.

Parameters:
vpi - The VPI of the VCL.
vci - The VCI of the VCL.
Returns:
The VCLEndpoint with the given VPI and VCI, or null if none exists.
 o addInVCL
 public void addInVCL(VCLEndIn vcl)
Add an inbound VCL endpoint to the port.

Parameters:
vcl - The VCL endpoint to add.
 o deleteInVCL
 public void deleteInVCL(VCLEndIn vcl)
Delete an inbound VCL endpoint from the port.

Parameters:
vcl - The VCL endpoint to delete.
 o deleteInVCL
 public void deleteInVCL(int vpi,
                         int vci)
Delete an inbound VCL endpoint from the port.

Parameters:
vpi - The VPI of the VCL endpoint to delete.
vci - The VCI of the VCL endpoint to delete.
 o getOutVCL
 public VCLEndOut getOutVCL(int vpi,
                            int vci)
Get an outbound VCL endpoint associated with the port.

Parameters:
vpi - The VPI of the VCL.
vci - The VCI of the VCL.
Returns:
The VCLEndpoint with the given VPI and VCI, or null if none exists.
 o addOutVCL
 public void addOutVCL(VCLEndOut vcl)
Add an outbound VCL endpoint to the port.

Parameters:
vcl - The VCL endpoint to add.
 o deleteOutVCL
 public void deleteOutVCL(VCLEndOut vcl)
Delete an outbound VCL endpoint from the port.

Parameters:
vcl - The VCL endpoint to delete.
 o deleteOutVCL
 public void deleteOutVCL(int vpi,
                          int vci)
Delete an outbound VCL endpoint from the port.

Parameters:
vpi - The VPI of the VCL endpoint to delete.
vci - The VCI of the VCL endpoint to delete.
 o getActive
 public long getActive()
Gets the last time this port was considered active.

Returns:
the last time this port was considered active
 o refreshActive
 public void refreshActive()
Refreshes the port's active time.

 o update
 public void update(long uptime,
                    long bwIn,
                    long bwAllocIn,
                    long cellsIn,
                    long bwOut,
                    long bwAllocOut,
                    long cellsOut)
Updates the port's counters.

Parameters:
uptime - The time the port has been up, in hundredths of a second.
bwIn - The port's input bandwidth.
bwAllocIn - The port's allocated input bandwidth.
cellsIn - The number of cells the port has received.
bwOut - The port's output bandwidth.
bwAllocOut - The port's allocated output bandwidth.
cellsOut - The number of cells the port has transmitted.
 o dumpStateComponent
 public void dumpStateComponent(FIFO f)
Dumps the current state of this switch port's components.

Parameters:
f - where to queue the ModelUpdate objects representing the model's current state
 o getUptime
 public long getUptime()
Gets the port's uptime.

Returns:
The port's uptime.
 o getInputBandwidth
 public long getInputBandwidth()
Gets the port's input bandwidth.

Returns:
The port's input bandwidth.
 o getInputAllocatedBW
 public long getInputAllocatedBW()
Gets the port's allocated input bandwidth.

Returns:
The port's allocated input bandwidth.
 o getInputCells
 public long getInputCells()
Gets the number of cells the port has received.

Returns:
The number of cells the port has received.
 o getOutputBandwidth
 public long getOutputBandwidth()
Gets the port's output bandwidth.

Returns:
The port's output bandwidth.
 o getOutputAllocatedBW
 public long getOutputAllocatedBW()
Gets the port's allocated output bandwidth.

Returns:
The port's allocated output bandwidth.
 o getOutputCells
 public long getOutputCells()
Gets the number of cells the port has transmitted.

Returns:
The number of cells the port has transmitted.
 o toString
 public String toString()
Get a string describing the SwitchPort object.

Returns:
A string describing the SwitchPort object.
Overrides:
toString in class ATMPort