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
-
alive
- The last time this port was reported active.
-
bwAllocIn
- The port's allocated input bandwidth.
-
bwAllocOut
- The port's allocated output bandwidth.
-
bwIn
- The port's input bandwidth.
-
bwOut
- The port's output bandwidth.
-
cellsIn
- The number of cells the port has received.
-
cellsOut
- The number of cells the port has transmitted.
-
inVCLs
- A list of the inbound VCL endpoints associated with the port.
-
outVCLs
- A list of the outbound VCL endpoints associated with the port.
-
paths
- List of the virtual paths that originate at the port.
-
uptime
- The port's uptime.
-
SwitchPort(String, ATMSwitch, long, long, long, long, long, long, long)
- Constructs a switch port.
-
addInVCL(VCLEndIn)
- Add an inbound VCL endpoint to the port.
-
addOutVCL(VCLEndOut)
- Add an outbound VCL endpoint to the port.
-
addPath(int, CollectorNode)
- Adds a virtual path to the port.
-
delete()
- Deletes this port (and its subcomponents).
-
deleteInVCL(int, int)
- Delete an inbound VCL endpoint from the port.
-
deleteInVCL(VCLEndIn)
- Delete an inbound VCL endpoint from the port.
-
deleteOutVCL(int, int)
- Delete an outbound VCL endpoint from the port.
-
deleteOutVCL(VCLEndOut)
- Delete an outbound VCL endpoint from the port.
-
deletePath(int)
- Delete a virtual path from the port.
-
deletePath(PathOrigin)
- Delete a virtual path from the port.
-
dumpStateComponent(FIFO)
- Dumps the current state of this switch port's components.
-
getActive()
- Gets the last time this port was considered active.
-
getInputAllocatedBW()
- Gets the port's allocated input bandwidth.
-
getInputBandwidth()
- Gets the port's input bandwidth.
-
getInputCells()
- Gets the number of cells the port has received.
-
getInVCL(int, int)
- Get an inbound VCL endpoint associated with the port.
-
getOutputAllocatedBW()
- Gets the port's allocated output bandwidth.
-
getOutputBandwidth()
- Gets the port's output bandwidth.
-
getOutputCells()
- Gets the number of cells the port has transmitted.
-
getOutVCL(int, int)
- Get an outbound VCL endpoint associated with the port.
-
getPath(int)
- Get a virtual path that originates at the port.
-
getUptime()
- Gets the port's uptime.
-
refreshActive()
- Refreshes the port's active time.
-
scanVCC()
- Scans through all of this port's VCL endpoints, looking for VCLs
which can be combined to form complete VCC paths.
-
toString()
- Get a string describing the SwitchPort object.
-
update(long, long, long, long, long, long, long)
- Updates the port's counters.
-
updatePathInfo(PeerAddress, CollectorNode)
- Updates the information for a path originating on this port.
-
weedOut(NodeEnd)
- Checks a port and its contents to detect and delete
components which have disappeared from the node.
paths
private VectorIter paths
- List of the virtual paths that originate at the port.
inVCLs
private VectorIter inVCLs
- A list of the inbound VCL endpoints associated with the port.
outVCLs
private VectorIter outVCLs
- A list of the outbound VCL endpoints associated with the port.
alive
private long alive
- The last time this port was reported active.
uptime
private long uptime
- The port's uptime.
bwIn
private long bwIn
- The port's input bandwidth.
bwAllocIn
private long bwAllocIn
- The port's allocated input bandwidth.
cellsIn
private long cellsIn
- The number of cells the port has received.
bwOut
private long bwOut
- The port's output bandwidth.
bwAllocOut
private long bwAllocOut
- The port's allocated output bandwidth.
cellsOut
private long cellsOut
- The number of cells the port has transmitted.
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.
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
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.
delete
public void delete()
- Deletes this port (and its subcomponents).
- Overrides:
- delete in class ATMPort
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.
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
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
deletePath
public void deletePath(PathOrigin path)
- Delete a virtual path from the port.
- Parameters:
- path - The virtual path to be deleted.
deletePath
public void deletePath(int vpi)
- Delete a virtual path from the port.
- Parameters:
- vpi - The VPI of the path.
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.
addInVCL
public void addInVCL(VCLEndIn vcl)
- Add an inbound VCL endpoint to the port.
- Parameters:
- vcl - The VCL endpoint to add.
deleteInVCL
public void deleteInVCL(VCLEndIn vcl)
- Delete an inbound VCL endpoint from the port.
- Parameters:
- vcl - The VCL endpoint to delete.
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.
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.
addOutVCL
public void addOutVCL(VCLEndOut vcl)
- Add an outbound VCL endpoint to the port.
- Parameters:
- vcl - The VCL endpoint to add.
deleteOutVCL
public void deleteOutVCL(VCLEndOut vcl)
- Delete an outbound VCL endpoint from the port.
- Parameters:
- vcl - The VCL endpoint to delete.
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.
getActive
public long getActive()
- Gets the last time this port was considered active.
- Returns:
- the last time this port was considered active
refreshActive
public void refreshActive()
- Refreshes the port's active time.
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.
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
getUptime
public long getUptime()
- Gets the port's uptime.
- Returns:
- The port's uptime.
getInputBandwidth
public long getInputBandwidth()
- Gets the port's input bandwidth.
- Returns:
- The port's input bandwidth.
getInputAllocatedBW
public long getInputAllocatedBW()
- Gets the port's allocated input bandwidth.
- Returns:
- The port's allocated input bandwidth.
getInputCells
public long getInputCells()
- Gets the number of cells the port has received.
- Returns:
- The number of cells the port has received.
getOutputBandwidth
public long getOutputBandwidth()
- Gets the port's output bandwidth.
- Returns:
- The port's output bandwidth.
getOutputAllocatedBW
public long getOutputAllocatedBW()
- Gets the port's allocated output bandwidth.
- Returns:
- The port's allocated output bandwidth.
getOutputCells
public long getOutputCells()
- Gets the number of cells the port has transmitted.
- Returns:
- The number of cells the port has transmitted.
toString
public String toString()
- Get a string describing the SwitchPort object.
- Returns:
- A string describing the SwitchPort object.
- Overrides:
- toString in class ATMPort