org.openflow.protocol
Class OFPortStatus

java.lang.Object
  extended by org.openflow.protocol.OFMessage
      extended by org.openflow.protocol.OFPortStatus

public class OFPortStatus
extends OFMessage

Represents an ofp_port_status message

Author:
David Erickson (daviderickson@cs.stanford.edu)

Nested Class Summary
static class OFPortStatus.OFPortReason
           
 
Field Summary
protected  OFPhysicalPort desc
           
static int MINIMUM_LENGTH
           
protected  byte reason
           
 
Fields inherited from class org.openflow.protocol.OFMessage
length, OFP_VERSION, type, version, xid
 
Constructor Summary
OFPortStatus()
           
 
Method Summary
 void computeLength()
          This method is called during the writeTo method for serialization and is expected to set the length of the message.
 boolean equals(java.lang.Object obj)
           
 OFPhysicalPort getDesc()
           
 byte getReason()
           
 int hashCode()
           
 void readFrom(java.nio.ByteBuffer data)
          Read this message off the wire from the specified ByteBuffer
 OFPortStatus setDesc(OFPhysicalPort desc)
           
 OFPortStatus setReason(byte reason)
           
 OFPortStatus setReason(OFPortStatus.OFPortReason reason)
           
 void writeTo(java.nio.ByteBuffer data)
          Write this message's binary format to the specified ByteBuffer
 
Methods inherited from class org.openflow.protocol.OFMessage
getLength, getLengthU, getType, getVersion, getXid, setLength, setLengthU, setType, setVersion, setXid, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MINIMUM_LENGTH

public static int MINIMUM_LENGTH

reason

protected byte reason

desc

protected OFPhysicalPort desc
Constructor Detail

OFPortStatus

public OFPortStatus()
Method Detail

getReason

public byte getReason()
Returns:
the reason

setReason

public OFPortStatus setReason(byte reason)
Parameters:
reason - the reason to set

setReason

public OFPortStatus setReason(OFPortStatus.OFPortReason reason)
Parameters:
reason - the reason to set

getDesc

public OFPhysicalPort getDesc()
Returns:
the desc

setDesc

public OFPortStatus setDesc(OFPhysicalPort desc)
Parameters:
desc - the desc to set

readFrom

public void readFrom(java.nio.ByteBuffer data)
Description copied from class: OFMessage
Read this message off the wire from the specified ByteBuffer

Overrides:
readFrom in class OFMessage

writeTo

public void writeTo(java.nio.ByteBuffer data)
Description copied from class: OFMessage
Write this message's binary format to the specified ByteBuffer

Overrides:
writeTo in class OFMessage

hashCode

public int hashCode()
Overrides:
hashCode in class OFMessage

equals

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

computeLength

public void computeLength()
Description copied from class: OFMessage
This method is called during the writeTo method for serialization and is expected to set the length of the message. If your class manually sets the length you should override this to do nothing.

Overrides:
computeLength in class OFMessage