org.openflow.protocol
Class OFPhysicalPort

java.lang.Object
  extended by org.openflow.protocol.OFPhysicalPort

public class OFPhysicalPort
extends java.lang.Object

Represents ofp_phy_port

Author:
David Erickson (daviderickson@cs.stanford.edu) - Mar 25, 2010, Srini Seetharaman (srini.seetharaman@gmail.com)

Nested Class Summary
static class OFPhysicalPort.OFPortConfig
           
static class OFPhysicalPort.OFPortFeatures
           
static class OFPhysicalPort.OFPortSpeed
          Represents the speed of a port
static class OFPhysicalPort.OFPortState
           
 
Field Summary
protected  int advertisedFeatures
           
protected  int config
           
protected  int currentFeatures
           
protected  int currSpeed
           
protected  byte[] hardwareAddress
           
protected  int maxSpeed
           
static int MINIMUM_LENGTH
           
protected  java.lang.String name
           
static int OFP_ETH_ALEN
           
static int OFP_MAX_PORT_NAME_LEN
           
protected  int peerFeatures
           
protected  int portNumber
           
protected  int state
           
protected  int supportedFeatures
           
 
Constructor Summary
OFPhysicalPort()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int getAdvertisedFeatures()
           
 int getConfig()
           
 int getCurrentFeatures()
           
 int getCurrSpeed()
           
 byte[] getHardwareAddress()
           
 int getMaxSpeed()
           
 java.lang.String getName()
           
 int getPeerFeatures()
           
 int getPortNumber()
           
 int getState()
           
 int getSupportedFeatures()
           
 int hashCode()
           
 void readFrom(java.nio.ByteBuffer data)
          Read this message off the wire from the specified ByteBuffer
 OFPhysicalPort setAdvertisedFeatures(int advertisedFeatures)
           
 OFPhysicalPort setConfig(int config)
           
 OFPhysicalPort setCurrentFeatures(int currentFeatures)
           
 OFPhysicalPort setCurrSpeed(int currSpeed)
           
 OFPhysicalPort setHardwareAddress(byte[] hardwareAddress)
           
 OFPhysicalPort setMaxSpeed(int maxSpeed)
           
 OFPhysicalPort setName(java.lang.String name)
           
 OFPhysicalPort setPeerFeatures(int peerFeatures)
           
 OFPhysicalPort setPortNumber(int portNumber)
           
 OFPhysicalPort setState(int state)
           
 OFPhysicalPort setSupportedFeatures(int supportedFeatures)
           
 java.lang.String toString()
           
 void writeTo(java.nio.ByteBuffer data)
          Write this message's binary format to the specified ByteBuffer
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MINIMUM_LENGTH

public static int MINIMUM_LENGTH

OFP_ETH_ALEN

public static int OFP_ETH_ALEN

OFP_MAX_PORT_NAME_LEN

public static int OFP_MAX_PORT_NAME_LEN

portNumber

protected int portNumber

hardwareAddress

protected byte[] hardwareAddress

name

protected java.lang.String name

config

protected int config

state

protected int state

currentFeatures

protected int currentFeatures

advertisedFeatures

protected int advertisedFeatures

supportedFeatures

protected int supportedFeatures

peerFeatures

protected int peerFeatures

currSpeed

protected int currSpeed

maxSpeed

protected int maxSpeed
Constructor Detail

OFPhysicalPort

public OFPhysicalPort()
Method Detail

getPortNumber

public int getPortNumber()
Returns:
the portNumber

setPortNumber

public OFPhysicalPort setPortNumber(int portNumber)
Parameters:
portNumber - the portNumber to set

getHardwareAddress

public byte[] getHardwareAddress()
Returns:
the hardwareAddress

setHardwareAddress

public OFPhysicalPort setHardwareAddress(byte[] hardwareAddress)
Parameters:
hardwareAddress - the hardwareAddress to set

getName

public java.lang.String getName()
Returns:
the name

setName

public OFPhysicalPort setName(java.lang.String name)
Parameters:
name - the name to set

getConfig

public int getConfig()
Returns:
the config

setConfig

public OFPhysicalPort setConfig(int config)
Parameters:
config - the config to set

getState

public int getState()
Returns:
the state

setState

public OFPhysicalPort setState(int state)
Parameters:
state - the state to set

getCurrentFeatures

public int getCurrentFeatures()
Returns:
the currentFeatures

setCurrentFeatures

public OFPhysicalPort setCurrentFeatures(int currentFeatures)
Parameters:
currentFeatures - the currentFeatures to set

getAdvertisedFeatures

public int getAdvertisedFeatures()
Returns:
the advertisedFeatures

setAdvertisedFeatures

public OFPhysicalPort setAdvertisedFeatures(int advertisedFeatures)
Parameters:
advertisedFeatures - the advertisedFeatures to set

getSupportedFeatures

public int getSupportedFeatures()
Returns:
the supportedFeatures

setSupportedFeatures

public OFPhysicalPort setSupportedFeatures(int supportedFeatures)
Parameters:
supportedFeatures - the supportedFeatures to set

getPeerFeatures

public int getPeerFeatures()
Returns:
the peerFeatures

setPeerFeatures

public OFPhysicalPort setPeerFeatures(int peerFeatures)
Parameters:
peerFeatures - the peerFeatures to set

getCurrSpeed

public int getCurrSpeed()
Returns:
the currSpeed

setCurrSpeed

public OFPhysicalPort setCurrSpeed(int currSpeed)
Parameters:
currSpeed - the curr_speed to set

getMaxSpeed

public int getMaxSpeed()
Returns:
the maxSpeed

setMaxSpeed

public OFPhysicalPort setMaxSpeed(int maxSpeed)
Parameters:
maxSpeed - the max_speed to set

readFrom

public void readFrom(java.nio.ByteBuffer data)
Read this message off the wire from the specified ByteBuffer

Parameters:
data -

writeTo

public void writeTo(java.nio.ByteBuffer data)
Write this message's binary format to the specified ByteBuffer

Parameters:
data -

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object